Menu

Making use of pocketsphinx

Help
Bahgat A
2017-07-07
2017-07-08
  • Bahgat A

    Bahgat A - 2017-07-07

    Hi everyone, I already have pocketsphinx prealpha5 running on my computer without any complaints. The problem is I can't import it into python in order to make use of it. I can only run pocketsphinx from the comand window. I've spent along time trying to make the pocketsphinx module work but it never did for one reason or another. Currently, I'm trying to use the subprocess.Popen or subprocess.check_output functions in python to make it work. I see a lot of people here using python, are you all using that module or are you trying something else? I want to run pocketsphinx in kws mode while making use of the output in python. Any help or tips are appreciated. Thanks!

     
  • G10DRAS

    G10DRAS - 2017-07-08

    Search "pocketsphinx python" in google.

     
  • Bahgat A

    Bahgat A - 2017-07-08

    Thanks for the insight. I've never heard of that search engine before. It doesn't exist in my dimension, but I think I can create link to your dimension and start using it. Thanks!

     
  • Bahgat A

    Bahgat A - 2017-07-13

    So I run this code

    import subprocess
    
    yyy=subprocess.check_output(['C:\\sphinx\\pocketsphinx\\bin\\Release\\Win32\\pocketsphinx_continuous.exe','-inmic yes', '-hmm  model\\en-us\\en-us',
                                 ' -lm model\\en-us\\en-us.lm.bin', '-dict  model\\en-us\\cmudict-en-us.dict'])
     yyy.wait()
    
    print('returncode:', yyy.returncode)
    

    and I get this error

    Traceback (most recent call last):
      File "C:\Project_COBRA\COBRA_BRIGHT.py", line 38, in <module>
        ' -lm model\\en-us\\en-us.lm.bin', '-dict  model\\en-us\\cmudict-en-us.dict'])
      File "C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 336, in check_output
        **kwargs).stdout
      File "C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 418, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['C:\\sphinx\\pocketsphinx\\bin\\Release\\Win32\\pocketsphinx_continuous.exe', '-inmic yes', '-hmm  model\\en-us\\en-us', ' -lm model\\en-us\\en-us.lm.bin', '-dict  model\\en-us\\cmudict-en-us.dict']' returned non-zero exit status 1.
    

    Anyone know what an exit status of 1 means? I know it differs from one program to another, but what does it mean for pocketsphinx?

     

    Last edit: Bahgat A 2017-07-13
    • Nickolay V. Shmyrev

      Exit status 1 means error

       

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.