1

From Sphinx4's demo in TranscriberDemo.java, hypothesis are gotten for each chunk of sound -- is there a faster way to get one final hypothesis at the end of processing?

    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();
user2657795
  • 79
  • 1
  • 1
  • 4

0 Answers0