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

433 Views Asked by At

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: ");
for(Voice voice : Voice.getAvailableVoices()) {
    System.out.println(voice.getName());
}

marytts.setVoice("dfki-prudence-hsmm"); //Causes Voice not exist error

Basically my code just prints "Voices:" and apperently there are non. I have the jar file of the voice but I am just unable to get it recognized by MaryTTS. Does anyone has an idea on how to do it with IntelliJ and where I need to put the jar?

0

There are 0 best solutions below