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 |
|
2011-04-27
, 15:26
|
|
Posts: 770 |
Thanked: 558 times |
Joined on Mar 2010
@ Abidjan
|
#2
|
|
2011-04-27
, 15:44
|
|
Posts: 2,222 |
Thanked: 12,651 times |
Joined on Mar 2010
@ SOL 3
|
#3
|
The Following 5 Users Say Thank You to joerg_rw For This Useful Post: | ||
|
2011-04-27
, 15:48
|
Posts: 482 |
Thanked: 550 times |
Joined on Oct 2010
|
#4
|
The Following User Says Thank You to skykooler For This Useful Post: | ||
|
2011-04-27
, 16:28
|
Posts: 105 |
Thanked: 99 times |
Joined on Feb 2011
@ India
|
#5
|
|
2011-04-27
, 16:50
|
Posts: 102 |
Thanked: 23 times |
Joined on Apr 2010
|
#6
|
|
2011-04-27
, 18:20
|
|
Posts: 1,062 |
Thanked: 961 times |
Joined on May 2010
@ Boston, MA
|
#7
|
|
2011-04-28
, 17:36
|
|
Posts: 2,222 |
Thanked: 12,651 times |
Joined on Mar 2010
@ SOL 3
|
#8
|
|
2011-05-01
, 00:15
|
Posts: 7 |
Thanked: 47 times |
Joined on Aug 2010
|
#9
|
|
2011-06-16
, 18:40
|
|
Posts: 1,559 |
Thanked: 1,786 times |
Joined on Oct 2009
@ Boston
|
#10
|
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; 2011-04-27 at 15:17. Reason: topic