我使用以下代码使用 FreeTTs 和 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();
}
我保存了所需的文件,c:\mb
但收到以下异常:
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)
你能帮我解决这个问题吗?