【问题标题】:Large vocabulary speech recognition in sphinx4sphinx4 中的大词汇量语音识别
【发布时间】:2014-09-24 18:24:29
【问题描述】:

据我所知,sphinx4 需要语法来识别单词。反正有没有不使用语法规则来获取输入,那不在语法中,有点像我在口授,它会写我要说的?

【问题讨论】:

    标签: cmusphinx sphinx4


    【解决方案1】:

    据我目前所知,sphinx4 需要语法来识别单词。

    不,sphinx4 支持大词汇量语音识别

    有没有在不使用语法规则的情况下获取输入,这不在语法中,有点像我在听写,它会写下我要说的内容?或者任何算法可以检查它?

    您需要更新 sphinx4-5prealpha 版本。

    您可以查看transcriber demo 的大词汇量语音识别设置示例。

    代码应如下所示:

    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();
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2016-09-16
      • 1970-01-01
      • 2011-11-16
      • 1970-01-01
      • 1970-01-01
      • 2016-07-09
      • 2016-03-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多