我正在尝试使用freetts运行程序.我能够编译程序但是我无法使用kevin或mbrola语音我最后得到了输出消息
系统属性"mbrola.base"未定义.不会使用MBROLA的声音.
LINE UNAVAILABLE:格式为pcm_signed 16000.0 Hz 16位1通道大端
import javax.speech.*;
import javax.speech.synthesis.*;
import java.util.*;
class freetts {
public static void main(String[] args) {
try{
Calendar calendar = new GregorianCalendar();
String sayTime = "It is " + calendar.get(Calendar.HOUR) + " " + calendar.get(Calendar.MINUTE) + " " + (calendar.get(Calendar.AM_PM)==0 ? "AM":"PM");
Synthesizer synth = Central.createSynthesizer(null);
synth.allocate();
synth.resume();
synth.speakPlainText(sayTime, null);
synth.waitEngineState(Synthesizer.QUEUE_EMPTY);
synth.deallocate();
}
catch(Exception e){
e.printStackTrace();
}
}
}
Run Code Online (Sandbox Code Playgroud) 什么文本语音和语音识别库可用于Clojure?到目前为止我发现了
https://github.com/klutometis/speech-recognition
https://github.com/klutometis/speech-synthesis
这两者都使用谷歌,因此依赖于网络.
我正在寻找那些不依赖互联网工作的人
speech-recognition clojure text-to-speech speech-synthesis libraries
任何人都可以共享一些用于在Java中将Speech转换为文本的代码片段.
我将创建一个文本到语音转换器,它可以在Windows和基于Linux的系统中执行.有人可以帮我回答以下问题;
请分享您的经验.