marytts

How do I use other voices when using MaryTTS embed?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-10 13:49:08
问题 I want to use MaryTTS embed in my Java application. I have downloaded the jars and put them in my classpath. I can successfully run this test: public static void main(String[] args) throws Exception { MaryInterface marytts = new LocalMaryInterface(); Set<String> voices = marytts.getAvailableVoices(); marytts.setVoice(voices.iterator().next()); AudioInputStream audio = marytts.generateAudio("Hello world."); AudioPlayer player = new AudioPlayer(audio); player.start(); player.join(); } The

How to add MaryTTS Voice (Jar File) to my own jar/load from folder in IntelliJ

大兔子大兔子 提交于 2021-01-29 02:42:48
问题 So I am probably just stupid but I am unable to get MaryTTS (which I just ship with my jar) to load a voice jar file/include it in my own jar and then load it automatically. How can I do this with IntelliJ properly? I have tried extracting the voice into my jar, adding it as a jar file, creating a lib/voices folder inside my jar file's root folder etc. and I can't get it to work. My code looks like this: LocalMaryInterface marytts = new LocalMaryInterface(); System.out.println("Voices: ");

How to solve TypeError: cannot serialize float Python Elementtree

北城以北 提交于 2019-12-07 03:04:14
问题 I got a debugging question. Since I am quite new here, please forgive possible janky walls-of-text. After many hours I finally got elementtree to do what I want, but I cannot output my results, because tree.write("output3.xml") as well as print(ET.tostring(root)) gives me TypeError: cannot serialize 0.029999999999999999 (type float64) I don't know what you guys need to help me out here, all the source code is sorta lengthy. So is the error message. But that's a little easier, so I post it