Sphinx4 - 有没有更快的方法从音频文件中获取全文?

时间:2016-02-13 19:33:02

标签: cmusphinx sphinx4

TranscriberDemo.java的Sphinx4演示中,得出每个声音块的假设 - 在处理结束时有更快的方法来获得最终假设吗?

    recognizer.startRecognition(stream);
    SpeechResult result;
    while ((result = recognizer.getResult()) != null) {

        System.out.format("Hypothesis: %s\n", result.getHypothesis());

        System.out.println("List of recognized words and their times:");
        for (WordResult r : result.getWords()) {
            System.out.println(r);
        }

        System.out.println("Best 3 hypothesis:");
        for (String s : result.getNbest(3))
            System.out.println(s);

    }
    recognizer.stopRecognition();

0 个答案:

没有答案