同步语音-尝试使用自定义语言模型时出现“密钥不存在”

时间:2018-12-27 17:25:02

标签: c# speech-recognition

我试图在我的C#项目中使用Syn Speech,但是在使其正常工作时遇到了很多问题。尽管为example found on the docs上找到的西班牙文文件更改了模型文件,但我还是逐行CMU Sphinx's Sourceforge进行了跟踪,但是在调用GetResult()之后会引发错误:

StreamSpeechRecognizer System.Collections.Generic.KeyNo
tFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Syn.Speech.Linguist.Language.NGram.SimpleNGramModel.GetProb(WordSequence w
ordSequence)
at Syn.Speech.Linguist.Language.NGram.SimpleNGramModel.GetProbability(WordSeq
uence wordSequence)
at Syn.Speech.Linguist.LexTree.LexTreeState.CreateWordStateArc(WordNode wordN
ode, HMMNode lastUnit, LexTreeState previous)
at Syn.Speech.Linguist.LexTree.LexTreeWordState.GetSuccessors()
at Syn.Speech.Decoders.Search.WordPruningBreadthFirstLookaheadSearchManager.C
ollectSuccessorTokens(Token token)
at Syn.Speech.Decoders.Search.WordPruningBreadthFirstSearchManager.GrowBranch
es()
at Syn.Speech.Decoders.Search.WordPruningBreadthFirstSearchManager.LocalStart
()
at Syn.Speech.Decoders.Search.WordPruningBreadthFirstLookaheadSearchManager.L
ocalStart()
at Syn.Speech.Decoders.Search.WordPruningBreadthFirstSearchManager.StartRecog
nition()
at Syn.Speech.Decoders.Decoder.Decode(String referenceText)
at Syn.Speech.Recognizers.Recognizer.Recognize(String referenceText)
at Syn.Speech.Recognizers.Recognizer.Recognize()
at Syn.Speech.Api.AbstractSpeechRecognizer.GetResult()

关于为什么发生这种情况的任何想法/如何解决?谢谢!

0 个答案:

没有答案