据我所知到现在为止,sphinx4需要语法识别的话。 反正有获得输入,而无需使用语法规则,未在语法,有点像我口述,它会写我会说什么?
Answer 1:
据我所知到现在为止,sphinx4需要语法识别的话。
不,sphinx4支持大词汇量语音识别
反正有获得输入,而无需使用语法规则,未在语法,有点像我口述,它会写我会说什么? 或任何算法也许检查吗?
您需要更新sphinx4-5prealpha版本。
您可以检查抄录演示例如大词汇量语音识别设置的。
该代码应该是这样的:
package com.example;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import edu.cmu.sphinx.api.Configuration;
import edu.cmu.sphinx.api.SpeechResult;
import edu.cmu.sphinx.api.LiveSpeechRecognizer;
public class TranscriberDemo {
public static void main(String[] args) throws Exception {
Configuration configuration = new Configuration();
configuration
.setAcousticModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us");
configuration
.setDictionaryPath("resource:/edu/cmu/sphinx/models/en-us/cmudict-en-us.dict");
configuration
.setLanguageModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us.lm.bin");
LiveSpeechRecognizer recognizer = new LiveSpeechRecognizer(configuration);
recognizer.startRecognition(true);
SpeechResult result;
while ((result = recognizer.getResult()) != null) {
System.out.format("Hypothesis: %s\n", result.getHypothesis());
}
recognizer.stopRecognition();
}
}
文章来源: Large vocabulary speech recognition in sphinx4