Menu

[seg.word for seg in decoder.seg()] return None

Help
Loc Le Duc
2015-11-04
2015-11-07
  • Loc Le Duc

    Loc Le Duc - 2015-11-04

    Hi

    After I train Acoustic Model with few sample sentences as per the instruction in the topic:
    https://sourceforge.net/p/cmusphinx/discussion/sphinx4/thread/f7fa87f5/

    I continuous try to decoder using python. I'm flowing this example:
    https://github.com/bambocher/pocketsphinx-python

    The example run exactly. But when i try to decoder my projects, the results return None.

    This is my code:

    from os import environ, path
    
    from pocketsphinx.pocketsphinx import *
    from sphinxbase.sphinxbase import *
    
    # Create a decoder with certain model
    config = Decoder.default_config()
    config.set_string('-hmm', 'model_parameters/dkmt.ci_cont')
    config.set_string('-lm', 'etc/dkmt.lm.DMP')
    config.set_string('-dict', 'etc/dkmt.dic')
    decoder = Decoder(config)
    
    # Decode streaming data.
    decoder.start_utt()
    stream = open('test.wav', 'rb')
    while True:
      buf = stream.read(1024)
      if buf:
        decoder.process_raw(buf, False, False)
      else:
        break
    decoder.end_utt()
    print ('Best hypothesis segments: ', [seg.word for seg in decoder.seg()])
    

    Resuls in terminal:

    ('Best hypothesis segments: ', [])

    I have attached all results in the terminal in this link:
    https://www.dropbox.com/s/ra7o8k7aruxkapt/terminal?dl=0

    Can anyone help me to sort out the issue.

    Thanks and Regards,
    DucLoc.

     

    Last edit: Loc Le Duc 2015-11-04
    • Nickolay V. Shmyrev

      You need to add a line

       -cmninit 69,3,-4
      

      into the file dkmt.ci_cont/feat.params

       
  • Loc Le Duc

    Loc Le Duc - 2015-11-05

    Thank you very much, Nickolay V. Shmyrev.
    Can you help me to explain the number in the line?

    -cmninit 69,3,-4

    And one more question, do you have any document to learn Sphinx? I want to improve the accuracy and adapt with other people who will use my system.
    Thank you very much.

     
    • Loc Le Duc

      Loc Le Duc - 2015-11-05

      Oh, I had found it in the terminal.
      But do you suggest any document to learn Sphinx? I want to learn about the issue and develop it for my system.
      Thank you very much.

       
      • Nickolay V. Shmyrev

        Our documentation is here

        http://cmusphinx.sourceforge.net/wiki

         

Log in to post a comment.