sphinx4中的大词汇量语音识别 [英] Large vocabulary speech recognition in sphinx4
问题描述
据我所知,sphinx4需要语法来识别单词.无论如何,有没有不使用语法规则就获得输入的东西,那不是语法中的东西,有点像我在命令,它会写出我要说的话?
As far as I know till now, sphinx4 requires grammar to identify the words. Is there anyway to get the input without using grammar rules, that is not in the grammar, somewhat like I am dictating and it will write what I will say?
推荐答案
据我所知,sphinx4需要语法来识别单词.
As far as I know till now, sphinx4 requires grammar to identify the words.
不,sphinx4支持大词汇量语音识别
No, sphinx4 supports large vocabulary speech recognition
总有没有不使用语法规则就获取输入的信息,那不在语法中,有点像我在命令,它会写出我要说的话?还是有任何算法可以检查它?
Is there anyway to get the input without using grammar rules, that is not in the grammar, somewhat like I am dictating and it will write what I will say? Or any algorithm maybe to check it?
您需要更新sphinx4-5prealpha版本.
You need to update sphinx4-5prealpha version.
You can check transcriber demo for example of large vocabulary speech recognition setup.
代码应如下所示:
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();
}
}
这篇关于sphinx4中的大词汇量语音识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!