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 problem is that the only voice available is cmu-slt-hsmm
, which makes sense because that's the only voice-
jar I have in the classpath. However, I cannot find anywhere other jars for other voices, which leads me to believe I'm doing something wrong because the Mary GUI can use other voices just fine.
How do I use other voices when using MaryTTS embed?