| The Following 35 Users Say Thank You to mc_teo For This Useful Post: | ||
Alfred, bipinbn, Boemien, bonapart, casper27, cfh11, chemist, clasificado, corduroysack, deegore, demolition, djdas, drangina, ejasmudar, fw190, gazza_d, gionni88, Hec, joerg_rw, johnel, Joseph9560, karimko, leojab, MartinK, mece, Mentalist Traceur, misiak, phap, Pigro, skykooler, strange1712, theonelaw, tlex26, vetsin, woody14619 | ||
|
|
04-27-2011
, 11:26 AM
|
|
|
Posts: 632 |
Thanked: 320 times |
Joined on Mar 2010
@ Abidjan
|
#2
|
|
|
04-27-2011
, 11:44 AM
|
|
|
Posts: 862 |
Thanked: 4,178 times |
Joined on Mar 2010
@ SOL 3
|
#3
|
| The Following 5 Users Say Thank You to joerg_rw For This Useful Post: | ||
|
|
04-27-2011
, 11:48 AM
|
|
Posts: 464 |
Thanked: 511 times |
Joined on Oct 2010
|
#4
|
| The Following User Says Thank You to skykooler For This Useful Post: | ||
|
|
04-27-2011
, 12:28 PM
|
|
Posts: 105 |
Thanked: 97 times |
Joined on Feb 2011
@ India
|
#5
|
|
|
04-27-2011
, 12:50 PM
|
|
Posts: 102 |
Thanked: 21 times |
Joined on Apr 2010
|
#6
|
|
|
04-27-2011
, 02:20 PM
|
|
|
Posts: 1,062 |
Thanked: 958 times |
Joined on May 2010
@ Boston, MA
|
#7
|
|
|
04-28-2011
, 01:36 PM
|
|
|
Posts: 862 |
Thanked: 4,178 times |
Joined on Mar 2010
@ SOL 3
|
#8
|
|
|
04-30-2011
, 08:15 PM
|
|
Posts: 7 |
Thanked: 47 times |
Joined on Aug 2010
|
#9
|
|
|
06-16-2011
, 02:40 PM
|
|
|
Posts: 1,546 |
Thanked: 1,760 times |
Joined on Oct 2009
@ Boston
|
#10
|
![]() |
| Thread Tools | Search this Thread |
|
I downloaded all the .debs from http://repository.maemo.org/extras-d.../pocketsphinx/ into a new directory, removing any i386 specific .debs.
As root, I ran "dpkg -i *" and they tried to install, but were stopped, due to unment dependencies. (for me it was just python2.5-dbg)
This sucessfully ran, and installed pocketsphinx.
To try it out and make sure everything has installed correctly, run "pocketsphinx_continuous", and wait for everything to load. When prompted with "Ready..." say something clearly in the phones direction, (I used "Hello"). After another load of text there should be "000000001: hello (-12345676)".
To get the gstreamer hooks working, I had to install the package "gstreamer-tools".
After this I raw the Script here from the CMUSphinx example, tweaked to work for pulseaudio, http://pastebin.com/zCYzX65Z
Press the "Speak" button, then say your few words, and the textbox with update to show what you have said.
N.B. It uses the en_US acoustic model by default, therefore I had a good few mistakes at first which I attrute to my Irish accent.
This is another little sample that uses the JSGF grammer specification, and tries to interpret speech from a .wav file saved locally. (This needs to be recorded at 8khz mono, also)
==File grammer.jsgf==
#JSGF V1.0;
grammar goforward;
public <move> = go <direction> <distance> [meter | meters];
<direction>= forward | backward;
<distance>= (one | two | three | four | five | six | seven | eight | nine | ten | twenty)+;
#!/usr/bin/python
import pocketsphinx as ps
decoder = ps.Decoder(jsgf=’/path/to/your/jsgf/grammar.jsgf’,samprate=’8000′)
fh = open(“myrecording.wav”, “rb”)
nsamp = decoder.decode_raw(fh)
hyp, uttid, score = decoder.get_hyp()
print “Got result %s %d” % (hyp, score)
Last edited by chemist; 04-27-2011 at 11:17 AM. Reason: topic