Menu

errors while running examplefile

Help
loek
2016-07-12
2016-07-14
  • loek

    loek - 2016-07-12

    I had some problems with importing pocketsphinx but I reinstalled and now its oke.
    Only now I get this error while running the example file.
    I really don't have a clue whats going on.

    INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='live', VARNORM='no', AGC='none'
    INFO: cmn.c(97): mean[0]= 12.00, mean[1..12]= 0.0
    ERROR: "acmod.c", line 83: Folder 'pocketsphinx/model/en-us/en-us' does not contain acoustic model definition 'mdef'
    Traceback (most recent call last):
    File "example.py", line 15, in <module>
    decoder = Decoder(config)
    File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py", line 271, in init
    this = _pocketsphinx.new_Decoder(*args)
    RuntimeError: new_Decoder returned -1</module>

     
    • loek

      loek - 2016-07-12

      I looked in :~/pocketsphinx-python-master/pocketsphinx but there is not a dir with data what is written in the python examplefile.
      How can I retrieve the data dir somewhere.

       

      Last edit: loek 2016-07-12
      • Nickolay V. Shmyrev

        You need to clone pocketsphinx-python recursively with git, not download zip, then required files will be cloned properly.

         
        • loek

          loek - 2016-07-12

          Thank you. I give it a try :)

           
          • loek

            loek - 2016-07-12

            Now it is working when downloading with github. At least with the example.py file I see a lot off info scrolling on my screen. But with the dir tests I tried several examples and now I get the error:

            Traceback (most recent call last):
            File "test_lm.py", line 4, in <module>
            import sphinxbase as sb
            File "/usr/local/lib/python2.7/dist-packages/pocketsphinx-0.1.0-py2.7-linux-armv7l.egg/sphinxbase/init.py", line 32, in <module>
            from .sphinxbase import *
            ImportError: No module named sphinxbase</module></module>

            I search for sphinxbase and its there the sphinxbase.so and also sphinxbase.py

            Any ideas ?

             
            • loek

              loek - 2016-07-12

              I did this: export SPHINXBASE=/path/to/sphinxbase # change this to your sphinxbase source tree
              But now I get another error about test_decoder import_decoder

               
  • loek

    loek - 2016-07-12

    File "test_lm.py", line 6, in <module>
    from .test_decoder import Decoder
    ValueError: Attempted relative import in non-package</module>

     
    • loek

      loek - 2016-07-13

      I googled today about pocketsphinx and decoder but could not find anything.
      Can somebody tell me what is name off the decoder file.or module
      I search for decoder and find tree decoders what is in /usr/lib/
      Or maybe I need to set a path for the decoder module.

      Thanks

       
      • Nickolay V. Shmyrev

        Google for

        ValueError: Attempted relative import in non-package

         

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.