Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

'Decoder' is not defined when running example.py #7

Closed
sidja opened this issue Sep 25, 2015 · 5 comments
Closed

'Decoder' is not defined when running example.py #7

sidja opened this issue Sep 25, 2015 · 5 comments

Comments

@sidja
Copy link

sidja commented Sep 25, 2015

Am I missing something ? I get the following message

 Traceback (most recent call last):
 File "example.py", line 10, in <module>
 config = Decoder.default_config()
 NameError: name 'Decoder' is not defined
@nshmyrev
Copy link

You are missing the import of pocketsphinx module in the beginning of the python file.

@sidja
Copy link
Author

sidja commented Sep 25, 2015

I've included import files

 from pocketsphinx.pocketsphinx import *
 from sphinxbase.sphinxbase import *

Now I get the following error message

Traceback (most recent call last):
File "example.py", line 3, in <module>
from pocketsphinx.pocketsphinx import *
ImportError: No module named pocketsphinx

@nshmyrev
Copy link

So this error is pretty self-explaining. You do not have pocketsphinx module installed properly. You can follow installation manual to get it installed.

@sidja
Copy link
Author

sidja commented Sep 25, 2015

Great, thank you for that. It works now. I didn't realise that both the module had to be installed manually first

@leosv123
Copy link

leosv123 commented Mar 7, 2018

hey , can u please give me the guidance how you solved your installation problem i am struck in installing those packages. iam also getting same errors as above

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants