Skip to content

ERROR:Allocation of search manager resources failed #101

Description

@FriedaSmith

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions