Speech Recognition Engines

Re: Howto use PocketSphinx
User: flexilux
Date: 5/14/2009 11:58 pm
Views: 126
Rating: 6

Hmmm, this test implies that obviously my mic is not being recognized somehow.  Is there a way to specify the mic to be used?

--- (Edited on 5/14/2009 11:58 pm [GMT-0500] by Visitor) ---

Re: Howto use PocketSphinx
User: nsh
Date: 5/15/2009 1:44 am
Views: 122
Rating: 5

Sure, -adcdev <micname>

--- (Edited on 5/15/2009 1:44 am [GMT-0500] by nsh) ---

Re: Howto use PocketSphinx
User: flexilux
Date: 5/15/2009 5:22 pm
Views: 188
Rating: 6

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.



--- (Edited on 5/15/2009 5:22 pm [GMT-0500] by Visitor) ---

Re: Howto use PocketSphinx
User: nsh
Date: 5/17/2009 8:59 am
Views: 659
Rating: 4

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) ---

Re: Howto use PocketSphinx
User: Novicesortof
Date: 9/19/2010 3:18 pm
Views: 180
Rating: 4

when i run


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) ---

Re: Howto use PocketSphinx
User: kmaclean
Date: 9/24/2010 8:06 pm
Views: 1243
Rating: 6

>Any suggestions?

Try the Sphinx Forum

--- (Edited on 9/24/2010 9:06 pm [GMT-0400] by kmaclean) ---

Re: Howto use PocketSphinx
User: test
Date: 1/28/2016 5:34 am
Views: 2450
Rating: 0


--- (Edited on 1/28/2016 5:34 am [GMT-0600] by Visitor) ---

Re: Howto use PocketSphinx
User: ramkumar
Date: 6/16/2011 4:48 am
Views: 1623
Rating: 8


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



import pocketsphinx as ps

import sphinxbase


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')



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) ---

Re: Howto use PocketSphinx
User: ramkumar
Date: 7/3/2011 1:09 am
Views: 4961
Rating: 6

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) ---

Re: Howto use PocketSphinx
User: Visitor
Date: 5/1/2014 10:35 pm
Views: 1599
Rating: 1


--- (Edited on 5/1/2014 10:35 pm [GMT-0500] by Visitor) ---