Menu

Accuracy of acoustic model with Python is lower

Help
2020-01-13
2020-01-13
  • Mariano Baci

    Mariano Baci - 2020-01-13

    I create an acoustic model with CMU Sphinx for my school robot project in my native language and it works very well when I start it from cmd, but when I try to use this acoustic model in my python code the accuracy is much lower.
    This is my python code:
    import os
    from pocketsphinx import LiveSpeech, get_model_path

    model_path = get_model_path()

    speech = LiveSpeech(
    verbose=False,
    sampling_rate=16000,
    buffer_size=2048,
    no_search=False,
    full_utt=False,
    hmm=os.path.join(model_path, r'C:\sphinx\albot\output\albot.ci_cont'),
    lm=os.path.join(model_path, r'C:\sphinx\albot\output\albot.lm.DMP'),
    dic=os.path.join(model_path, r'C:\sphinx\albot\output\albot.dic')
    )

    for phrase in speech:
    print(phrase)

    What should I change?
    Thanks in advance!

     
    • Nickolay V. Shmyrev

      Probably you do not have enough data. CI model is useless anyway, you need to train CD models.

       
  • Mariano Baci

    Mariano Baci - 2020-01-13

    But it work very well when I use it from cmd, it recognizes precisely almost any word. That's why i think i have enough data. It doesn't work well just when I use it with python.
    By the way what is CI and Cd model?

     
  • Mariano Baci

    Mariano Baci - 2020-01-13

    So?

     
    • Nickolay V. Shmyrev

      ci = context-independent
      cd = context-dependent

      you can check tutorial for details

      ci model most likely means you do not have enoughd data.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.