cmu sphinx:TranscriberDemo显示非英语模型配置的异常

时间:2017-12-17 12:18:14

标签: speech-recognition cmusphinx non-english

TranscriberDemo (参考资料来源:sourceforge.net/projects/cmusphinx/files/sphinx4/5prealpha/)在配置与非英语语言相关的模型时显示以下异常(sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models /Russian/zero_ru_cont_8k_v3.tar.gz)。

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 13568, Size: 13568
    at java.util.ArrayList.rangeCheck(Unknown Source)
    at java.util.ArrayList.get(Unknown Source)
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Pool.get(Pool.java:55)
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.createSenonePool(Sphinx3Loader.java:428)
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.loadModelFiles(Sphinx3Loader.java:313)
    at edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader.load(Sphinx3Loader.java:252)
    at edu.cmu.sphinx.frontend.AutoCepstrum.newProperties(AutoCepstrum.java:118)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518)
    at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:163)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponentList(PropertySheet.java:432)
    at edu.cmu.sphinx.frontend.FrontEnd.newProperties(FrontEnd.java:160)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:296)
    at edu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer.newProperties(SimpleAcousticScorer.java:47)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:296)
    at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.newProperties(WordPruningBreadthFirstSearchManager.java:213)
    at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchManager.newProperties(WordPruningBreadthFirstLookaheadSearchManager.java:156)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:296)
    at edu.cmu.sphinx.decoder.AbstractDecoder.newProperties(AbstractDecoder.java:81)
    at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:36)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518)
    at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:296)
    at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:86)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:518)
    at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.java:163)
    at edu.cmu.sphinx.api.Context.<init>(Context.java:73)
    at edu.cmu.sphinx.api.Context.<init>(Context.java:45)
    at edu.cmu.sphinx.api.AbstractSpeechRecognizer.<init>(AbstractSpeechRecognizer.java:44)
    at edu.cmu.sphinx.api.StreamSpeechRecognizer.<init>(StreamSpeechRecognizer.java:35)
    at edu.cmu.sphinx.demo.transcriber.TranscriberDemo.streamSpeechDemo(TranscriberDemo.java:66)
    at edu.cmu.sphinx.demo.transcriber.TranscriberDemo.main(TranscriberDemo.java:32)

我的模型配置如下:

static String acousticModelPath = "resource:/edu/cmu/sphinx/models/ru/ru";
static String dictionaryPath    = "resource:/edu/cmu/sphinx/models/ru/ru.dic";
static String languageModelPath = "resource:/edu/cmu/sphinx/models/ru/ru.lm";
static String streamPath      = "E:\\ews\\sphinx4-5prealpha-src\\sphinx4-5prealpha-src\\sphinx4-data\\src\\main\\resources\\edu\\cmu\\sphinx\\models\\ru\\decoder-test.wav";

0 个答案:

没有答案