Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR:Allocation of search manager resources failed #101

Open
FriedaSmith opened this issue Jul 27, 2020 · 0 comments
Open

ERROR:Allocation of search manager resources failed #101

FriedaSmith opened this issue Jul 27, 2020 · 0 comments

Comments

@FriedaSmith
Copy link

FriedaSmith commented Jul 27, 2020

SpeechAligner aligner = new SpeechAligner("resource:/edu/cmu/sphinx/models/en-us/en-us",
"resource:/edu/cmu/sphinx/models/en-us/cmudict-en-us.dict",
"resource:/edu/cmu/sphinx/models/en-us/en-us.lm.bin");

When I use the language model in Sphinx4-5prealpha, the following exception occurs:
Exception in thread "main" java.lang.RuntimeException: Allocation of search manager resources failed
at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.allocate(WordPruningBreadthFirstSearchManager.java:247)
at edu.cmu.sphinx.decoder.AbstractDecoder.allocate(AbstractDecoder.java:103)
at edu.cmu.sphinx.recognizer.Recognizer.allocate(Recognizer.java:164)
at edu.cmu.sphinx.api.SpeechAligner.align(SpeechAligner.java:112)
at edu.cmu.sphinx.api.SpeechAligner.align(SpeechAligner.java:67)
at dataprocessing.SpeechRecognition.main(SpeechRecognition.java:35)
Caused by: java.io.StreamCorruptedException: invalid stream header: 54726965
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.(Unknown Source)
at edu.cmu.sphinx.fst.ImmutableFst.loadModel(ImmutableFst.java:169)
at edu.cmu.sphinx.linguist.g2p.G2PConverter.(G2PConverter.java:87)
at edu.cmu.sphinx.linguist.dictionary.TextDictionary.allocate(TextDictionary.java:190)
at edu.cmu.sphinx.linguist.lextree.LexTreeLinguist.allocate(LexTreeLinguist.java:332)
at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.allocate(WordPruningBreadthFirstSearchManager.java:243)
... 5 more

But when the language is null, it can work. What can I do to use the language model?
SpeechAligner aligner = new SpeechAligner("resource:/edu/cmu/sphinx/models/en-us/en-us",
"resource:/edu/cmu/sphinx/models/en-us/cmudict-en-us.dict",
null);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant