[Asterisk-Users] Sphinx

Kevin Bockman kbockml at techemail.com
Fri Dec 19 11:26:58 MST 2003


--- Mauricio Nuñez <mauricio at chile.com> wrote:
>/usr/local/bin/decoder2
>#!/bin/sh
>BASE=6403
I changed this to BASE=turtle

>$S2BATCH -nbest 1 -nbestdir /tmp -verbose 0 -adcin TRUE -adcext wav ->ctlfn 
>${CTLFILE} -ctloffset 0 -ctlcount 100000000 -datadir ${TASK} -samp >8000 
>-agcmax TRUE -langwt 6.5 -fwdflatlw 8.5 -rescorelw 9.5 -ugwt 0.5 ->fillpen 
>1e-10 -silpen 0.005 -inspen 0.65 -top 1 -topsenfrm 3 -topsenthresh ->70000 
>-beam 2e-06 -npbeam 2e-06 -lpbeam 2e-05 -lponlybeam 0.0005 -nwbeam >0.0005 
>-fwdflat FALSE -fwdflatbeam 1e-08 -fwdflatnwbeam 0.0003 -bestpath TRUE 
>-kbdumpdir ${TASK} -lmfn ${TASK}/${BASE}.lm -dictfn ${TASK}/${BASE}.dic 
>-noisedict ${HMM}/noisedict -phnfn ${HMM}/phone -mapfn ${HMM}/map ->hmmdir 
>${HMM} -hmmdirlist ${HMM} -8bsen TRUE -sendumpfn ${HMM}/sendump -cbdir >${HMM}

I put all of this on one line

>My php-test.agi:
>festival("ingrese su mensaje");
Festival was saying the text, but giving me an RTP read error.  I commented it out and now it does not.

>record("mensaje","#");
I changed this to /tmp/mensaje.  Not sure where it would have recorded it otherwise.  I did a find on mensaje.wav but it did not find it anywhere until I changed it to /tmp

>$value=file("/tmp/mensaje.hyp");
I'm not seeing this file.  It makes /tmp/goforward.hyp with the folowing:

debian:/tmp# more goforward.hyp 
<s> YOU WHAT TWO ARE YOU ARE 

(I never said anything)

>$value=$value[0];
>$numero=trim(substr($value,strpos($value,">")+1));
>if($numero!="")
>	festival("usted a seleccionado el numero $numero");
>exec($comando);

What I'm not sure about is why you are checking the value before running sphinx.  This would be getting a previous value correct?  Also, I'm not sure how sphinx is getting the file /tmp/mensaje.wav.  This is the big thing that I'm missing.

The script runs for me, festival says the text (when I had it uncommented), gave a beep, recorded the file, then quit.  There was the .wav file and goforward.hyp in /tmp.

Once I understand how sphinx gets the output, I think I will have it figured out if you could help me with that.  I don't understand how sphinx knows the output file (from the .wav) to decode it.

I appreciate your input and help very much.  This is exactly what I was looking for.

Thanks,

Kevin


_____________________________________________________________
Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com



More information about the asterisk-users mailing list