Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
srivasadi
Posts: 13
Registered: ‎07-20-2010
My Device: 9550

Problems in setting Voice Properties using Speech library in 5.0

Hi All,

 

I am experimenting Text-to-speech using Blackberry 5.0. The text to speech is working fine in all 5.0 simulators except 9550. I dont know why??

 

I am trying to set the female voice, age using SynthesizerProperties and Voice but its not working. Please have a look on my code and correct me if i wrong in setting up female voice.

 

public void tts(String description){
            try {
              
              Synthesizer  synth = (Synthesizer) EngineManager
                        .createEngine(SynthesizerMode.DEFAULT);

                SynthesizerProperties synthesizerProperties = synth
                        .getSynthesizerProperties();
                Voice voice = new Voice(null, null, Voice.GENDER_FEMALE,
                        Voice.AGE_TEENAGER, Voice.VARIANT_DONT_CARE);
               
                synthesizerProperties.setVoice(voice);

                synth.allocate();
                synth.speak(description, null);

 

                synth.deallocate();
            } catch (Exception e) {
                e.printStackTrace();
            }

        }

 

Is it possible to set up female voice, age according to jsapi 2.0??

 

Thanks in advance,

 

Sri

Please use plain text.
Developer
AlexXF
Posts: 323
Registered: ‎03-10-2010
My Device: Bold 9780, DevAlpha
My Carrier: Vodafone CZ

Re: Problems in setting Voice Properties using Speech library in 5.0

TTS is not available for 3rd party developers (RIM only)

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Problems in setting Voice Properties using Speech library in 5.0

Or if your making an assistive-service app (from what I remember).

 

As @AlexXF said (most) 3rd party devs don't have access to this library, so we can't really help you with it.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Contributor
srivasadi
Posts: 13
Registered: ‎07-20-2010
My Device: 9550

Re: Problems in setting Voice Properties using Speech library in 5.0

Thanks AlexXF and rcmaniac25,

 

I developed TTS app on 9700 simulator using above code.  Its working fine. Text to speech is working other simulators of 5.0 except 9550.

 

But my problem is, I set the female voice but TTS working on 9700 simulator with male voice irrespective of voice settings.

 

Does it work on 9700 device??

 

 

Please use plain text.