Simple espeak java wrapper, no JNI, no native libraries, no headache.
You should install espeak to use this wrapper!
Espeak espeak = new Espeak();
espeak.speak("Hello World!");
Voice manVoice = new Voice();
manVoice.setName("en-us");
manVoice.setAmplitude(100);
manVoice.setPitch(30);
manVoice.setSpeed(100);
manVoice.setVariant(true, 3);
Espeak man = new Espeak(manVoice);
man.speak("Hello World!");
Voice chineseVoice = new Voice();
chineseVoice.setName("zh");
chineseVoice.setAmplitude(100);
chineseVoice.setPitch(30);
chineseVoice.setSpeed(100);
chineseVoice.setVariant("f2");
Espeak woman = new Espeak(chineseVoice);
woman.speak("Nǐ hǎo, shìjiè!");
<dependency>
<groupId>com.harium.hci</groupId>
<artifactId>espeak</artifactId>
<version>1.0.3</version>
</dependency>
This library calls espeak via Process. Everytime you call to Espeak.speak it creates a new thread to execute the process.