Hi. Im using the current sphinx4-5prealpha and I'm trying to get a hang of it. My aim is to create a speech to text program using sphinx and I am using the en-us acoustic model, en-us-lm as language model, and cmu07a as dictionary. The program runs but the thing is that it doesn't show results and after a few minutes it just runs out of memory. I have allocated memory for it just like the transcriber demo. Here is my code:
import java.net.URL;
import edu.cmu.sphinx.api.Configuration;
import edu.cmu.sphinx.api.Context;
import edu.cmu.sphinx.api.Microphone;
import edu.cmu.sphinx.api.SpeechResult;
import edu.cmu.sphinx.recognizer.Recognizer;
import edu.cmu.sphinx.result.WordResult;
import edu.cmu.sphinx.api.LiveSpeechRecognizer;
public class TranscriberLive {
public static void main(String[] args) throws Exception {
This shows after 5 minutes or more after running the program.
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.collectSuccessorTokens(WordPruningBreadthFirstSearchManager.java:667)
at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.growBranches(WordPruningBreadthFirstSearchManager.java:392)
at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.growNonEmittingBranches(WordPruningBreadthFirstSearchManager.java:436)
at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.recognize(WordPruningBreadthFirstSearchManager.java:308)
at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.recognize(WordPruningBreadthFirstSearchManager.java:282)
at edu.cmu.sphinx.decoder.Decoder.decode(Decoder.java:65)
at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:110)
at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:126)
at edu.cmu.sphinx.api.AbstractSpeechRecognizer.getResult(AbstractSpeechRecognizer.java:50)
at TranscriberLive.main(TranscriberLive.java:25)
It doesn't show results and I'm stumped again. Any help will be much appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. Im using the current sphinx4-5prealpha and I'm trying to get a hang of it. My aim is to create a speech to text program using sphinx and I am using the en-us acoustic model, en-us-lm as language model, and cmu07a as dictionary. The program runs but the thing is that it doesn't show results and after a few minutes it just runs out of memory. I have allocated memory for it just like the transcriber demo. Here is my code:
}
}
This shows after 5 minutes or more after running the program.
It doesn't show results and I'm stumped again. Any help will be much appreciated.
You need to increase java heap memory. Such configuration requires about 2Gb of memory in heap.