VoxForge
Now, is that for the arecord mic test, or is that for sphinx? I tried appending both commands (mic test and pocketsphinx demo commands) with that option, but still neither work. Maybe it's that I'm not sure what my computer thinks the name of this mic is...
Is "-abcdev <micname>" something I need to insert in the sphinx code somewhere? If so, where? I've been poring over the code for days and I can't seem to find anything regarding mics, or even where/how to tell sphinx to read from an already existing audio file.
::sigh::
Thanks.
--- (Edited on 5/15/2009 5:22 pm [GMT-0500] by Visitor) ---
This is the command line option of pocketsphinx_continuous. It's adcdev, not abcdev, please not it.
To get the list of possible devices use
aplay -L
The default device name is "default"
--- (Edited on 5/17/2009 8:59 am [GMT-0500] by nsh) ---
when i run
pocketsphinx_wsj
I get
Warning: Could not find Mic element
I've done the following to test my microphone
arecord -f S16_LE -r 8000 -D default > record.wav
microphone is working fine, but when i run
pocketsphinx_wsj -adcdev default
I stll get
Warning: Could not find Mic element
pocketsphinx_wsj -adcdev pulseaudio
and other experiments have all returned error.
I'm using ubuntu 10.04 LT
Any suggestions?
--- (Edited on 9/19/2010 3:18 pm [GMT-0500] by Visitor) ---
hi
this post is for all the newbie's who cant get pocketsphinx installed on ubuntu....
1) goto "ubuntu software center" under applications for gnome2 and type pocketsphinx. About a dozen packages will appear. safe shot i downloaded all of them and installed them. but i guess only about 3 would suffice not sure which ones
2) now copy paste this code that i got from jaggu's webpage on pocketsphinx into a text file and save it as "filename.py"....
#!/usr/bin/env python
import sys,os
def decodeSpeech(hmmd,lmdir,dictp,wavfile):
"""
Decodes a speech file
"""
try:
import pocketsphinx as ps
import sphinxbase
except:
print """Pocket sphinx and sphixbase is not installed
in your system. Please install it with package manager.
"""
speechRec = ps.Decoder(hmm = hmmd, lm = lmdir, dict = dictp)
wavFile = file(wavfile,'rb')
wavFile.seek(44)
speechRec.decode_raw(wavFile)
result = speechRec.get_hyp()
return result[0]
if __name__ == "__main__":
hmdir = "/usr/share/pocketsphinx/model/hmm/wsj1"
lmd = "/usr/share/pocketsphinx/model/lm/wsj/wlist5o.3e-7.vp.tg.lm.DMP"
dictd = "/usr/share/pocketsphinx/model/lm/wsj/wlist5o.dic"
wavfile = "/home/ram/1.wav"
recognised = decodeSpeech(hmdir,lmd,dictd,wavfile)
print "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
print recognised
print "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
3) once you have done that you need to record an audio file of a short sentence("hello how are you") and save it as test1.wav or someothr name....
4) okay now there is a small modification that you need to do on the code.
open it up using gedit or vi editor.... then parse through the file and look for
hmdir = "/usr/share/pocketsphinx/model/hmm/wsj1"
lmd = "/usr/share/pocketsphinx/model/lm/wsj/wlist5o.3e-7.vp.tg.lm.DMP"
dictd = "/usr/share/pocketsphinx/model/lm/wsj/wlist5o.dic"
wavfile = "/home/ram/1.wav"
simultaneously open your terminal and enter the following command "pkg-config --variable=modeldir pocketsphinx". this will return the installation path.
modify the installation path for the four variables accordingly and point the variable "wavefile" to the location of the wavefile
5) now run the code using the following command "python filename.py" assuming that the python interpreter is installed on your comp.the recogonition is very crude.... can someone help me with that please.....
--- (Edited on 6/16/2011 4:48 am [GMT-0500] by ramkumar) ---
ah finally i figure out that the wave file to be used should be 16khz 16bit mono wave format...... a small script would enable us to make the file..... the recogonition error margin is pretty slim. impressive..... :)
--- (Edited on 7/3/2011 1:09 am [GMT-0500] by Visitor) ---