简体   繁体   English

如何在FreeTTS中改变语音 - Java

[英]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. 我在java中运行一个程序,我使用FreeTTS Voices,我想要的是改变声音。 when i run the program it shows: 当我运行程序时,它显示:

"System property "mbrola.base" is undefined. Will not use MBROLA voices." “系统属性”mbrola.base“未定义。不会使用MBROLA语音。”

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. 我试图找到插入MBROLA语音的教程。 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. 我发现的其中一个教程是在他们的网页上: http//freetts.sourceforge.net/mbrola/README.html但我在Windows中不知道任何MAC,因此我无法知道如何做到这一点。 Other tutorials were on Linux and i therefore even don't understand them. 其他教程在Linux上,因此我甚至不理解它们。 I am using netbeans on windows and i want someone to clearly explain me how to do this. 我在Windows上使用netbeans,我希望有人清楚地解释我如何做到这一点。 I am a newbie and 14 year old. 我是新手,14岁。

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." 如果你查看你提交的链接,就会有一条重要信息:“注意:FreeTTS在Windows平台上对MBROLA的支持在过去很麻烦,但似乎已由MBROLA团队修复。请参考FreeTTS论坛了解更多信息。“

Here's a direct link to the forums: http://sourceforge.net/p/freetts/discussion/137669/thread/848a09ab 这是论坛的直接链接: 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: 您必须通过属性或直接通过代码指定mbrola文件夹的路径:

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

For more see eg FreeTTS mbrola not able to find path 有关更多信息,请参阅例如FreeTTS mbrola无法找到路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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