Reputation: 1
I have used the following code to create voice using FreeTTs and Mbrola.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
Voice voice;
VoiceManager vm = VoiceManager.getInstance();
System.setProperty(“mbrola.base”, “C:\\mb\\”);
voice=vm.getVoice(“mbrola_us3″);
voice.allocate();
voice.speak(“hello”);
voice.deallocate();
}
I saved the required files in c:\mb
but I receive the following exception:
Exception in thread “Thread-3″ java.lang.NoSuchMethodError: com.sun.speech.freetts.Voice.log(Ljava/lang/String;)V
at de.dfki.lt.freetts.mbrola.MbrolaAudioOutput.processUtterance(MbrolaAudioOutput.java:58)
at com.sun.speech.freetts.Voice.runProcessor(Voice.java:595)
at com.sun.speech.freetts.Voice.outputUtterance(Voice.java:536)
at com.sun.speech.freetts.Voice.access$200(Voice.java:81)
at com.sun.speech.freetts.Voice$1.run(Voice.java:496)
BUILD STOPPED (total time: 1 minute 54 seconds)
Can you help me how to fix the problem?
Upvotes: 0
Views: 255
Reputation: 5748
NoSuchMethodError at compile time means the method does not exists or the method does not accept the String parameter.
I think its this method - voice.speak(“hello”);
is the poblem or better you can use a try .. catch block and get the problem result using e.toString()
Upvotes: 0