×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Aug 2004
    Location
    Macedonia,Greece
    Posts
    54

    Generate sound(voice) from a String

    Hello everybody.

    I would like to generate sound from a String at Symbian devices automaticaly. I wil receive the value of this String remotely and then it will be generated/converted to a sound.

    The String will not be very long (3 to 4 words).

    For example,
    Code:
    String test="Hello everybody";
    I am going to use Nokia N73 and Nokia N93 for testing.

    Is it possible via J2ME API, or Nokia API?
    Or do I need any other external library?

    Regards,
    kalgik

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Generate sound(voice) from a String

    At least in Java ME you need to create an audio file yourself based on the string contants, there is no library readily available for you on the platform for this. There might be some 3rd party libraries close enough, which you could then edit to work with your requirements.

    The easiest solution could be to create a tone sequence based on the string data...

    Hartti

  3. #3
    Regular Contributor
    Join Date
    Aug 2004
    Location
    Macedonia,Greece
    Posts
    54

    Re: Generate sound(voice) from a String

    What do you mean by creating a tone sequence based on the string data?

    Can you tell how I can create a tone sequence?

    Regards,
    Kalgik

  4. #4
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Generate sound(voice) from a String

    First you have to come up with a algorithm to change the string (characters) in to tone information. This is something you have to decide. Do you want to use single characters to set the pitch and keep the duration and volume constant for each of the notes played? Do you want to change the duration based on the character values, but keep other values constant. Do you want to two characters for each note (one for pitch and one for tone).

    Then you need to decide what is to formula to change the characters to required values. Do you have a lookup table for pitch values or do you have a mathematical formula to do the conversion...

    You could then play each tone separately with Manager.playTone() method call (see MMAPI documentation) or create a tone sequence and play them using a ToneControl.

    Please check the MMAPI documents for more information
    http://www.forum.nokia.com/main/reso...ultimedia.html
    http://java.sun.com/javame/reference/apis/jsr135/
    http://developers.sun.com/mobility/allarticles/#mmapi

    Hartti

Similar Threads

  1. Replies: 4
    Last Post: 2007-02-27, 12:04
  2. How to use Gauge/Process Bar when using HttpConnection?
    By Tanya in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2006-12-28, 07:59
  3. global root overflow(please help)
    By sushant_125 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2004-05-14, 08:24
  4. Personal
    By JSmith77 in forum PersonalJava
    Replies: 4
    Last Post: 2003-07-30, 12:52
  5. D211 new linux driver 1.04 not working !!
    By franz_meyer in forum Multimodecards
    Replies: 1
    Last Post: 2002-12-12, 08:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×