[asterisk-speech-rec] sphinx_test.agi saved empty file in the /tmp
Alex Wang
hadyn_whx at hotmail.com
Sat Aug 7 20:19:54 CDT 2010
Hi
I am working on to plug sphinx2 into asterisk for my home phone system.
The Sphinx2 just works fine and sr_client comes back with right result.
But when I test it with the AGI script in the asterisk. The script just
capture a empty gsm file in the /tmp which bring up fail.
Does anyone got experience about sphinx2? please help.
Thanks
Alex
The part of the code is here..
***************************************************************
sub confirm {
while (my $tries <= 3) {
$tries++;
$AGI->stream_file("/var/lib/asterisk/sounds/say_yes_no",'""');
$AGI->stream_file("beep",'""');
$AGI->record_file("/tmp/$$", 'wav', '0',3000);
------------------------------------------------------------------------
this one suppose to create sound file under /tmp but the file is just
empty, I changed from gsm to wav but it still the same..
------------------------------------------------------------------------
$AGI->stream_file("beep",'""');
#Here is where the magic happens, this is calling the asr sub from sphinx-netclient.pl
#Again, this sub needs to be in this same script. $vresponse will contain the
#transcription of the what the caler said.
my $vresponse = asr("/tmp/$$.wav");
$AGI->verbose("CONFIRM: $vresponse");
next if $vresponse !~ /YES|NO|ACCEPT|CANCEL/;
More information about the asterisk-speech-rec
mailing list