I am trying to build speech recognition application in ubuntu . And went through the tutorial and downloaded both sphinxbase and pocketsphinx from https://sourceforge.net/projects/cmusphinx/files/ and installed them using the correct guidelines from their readme files for installation. Now am building the decoding script which is as below -
from os import environ, path
from pocketsphinx.pocketsphinx import *
from sphinxbase.sphinxbase import *
but the terminal is showing following errors-
File "sphin.py", line 4, in <module>
from pocketsphinx.pocketsphinx import *
ImportError: No module named pocketsphinx.pocketsphinx
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to build speech recognition application in ubuntu . And went through the tutorial and downloaded both sphinxbase and pocketsphinx from https://sourceforge.net/projects/cmusphinx/files/ and installed them using the correct guidelines from their readme files for installation. Now am building the decoding script which is as below -
from os import environ, path
from pocketsphinx.pocketsphinx import *
from sphinxbase.sphinxbase import *
hmdir="/usr/local/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k"
lmd="/usr/local/share/pocketsphinx/model/en_US/wsj0vp.5000.DMP"
dictd="/usr/local/share/pocketsphinx/model/en_US/cmu07a.dic"
def decodeSpeech(hmmd,lmdir,dictp,wavfile):
wavfile="rec.wav"
recognised=decodeSpeech(hmdir,lmd,dictd,wavfile)
print recognised
but the terminal is showing following errors-
File "sphin.py", line 4, in <module>
from pocketsphinx.pocketsphinx import *
ImportError: No module named pocketsphinx.pocketsphinx