简体   繁体   中英

How to change voice in FreeTTS - Java

I am running a program in java in which i use FreeTTS Voices, what i want is to change the voice. when i run the program it shows:

"System property "mbrola.base" is undefined. Will not use MBROLA voices."

I use the following code to speak up the text i want

Voice voice;
voice = voiceManager.getVoice(VOICENAME);
voice.allocate();

and then

voice.speak(t4.getText()); 

I tried to find tutorials to insert MBROLA voices. One of the tutorial i found was on their web page: http://freetts.sourceforge.net/mbrola/README.html but i am in windows not don't know anything of MAC therefore i am unable to know how to do it. Other tutorials were on Linux and i therefore even don't understand them. I am using netbeans on windows and i want someone to clearly explain me how to do this. I am a newbie and 14 year old.

If you look at the link you submitted, there's a big message that says: "NOTE: FreeTTS support for MBROLA on the Windows platform has been troublesome in the past, but appears to have been fixed by the MBROLA team. Please refer to the FreeTTS Forum for more information."

Here's a direct link to the forums: http://sourceforge.net/p/freetts/discussion/137669/thread/848a09ab

You have to specify the path to the mbrola folder, either by properties or directly via the code:

System.setProperty("mbrola.base", "c:/.../mbrola");

For more see eg FreeTTS mbrola not able to find path

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM