Posted: Fri Dec 28, 2007 1:22 am Post subject: [asterisk-speech-rec] PHPAGI
Hello All,
Currently, we have IVR based application written using PHPAGI and we
would like to enhanced it more using Voice recognition. I believe
LumenVox speech recognition software is the best for Asterisk based IVR.
Now is there anyway to integrate LumenVox speech recognition app with
PHPAGI? I want to keep on using PHPAGI as it gives me flexibility to
access DB and do other stuff. The main purpose to use LumenVox is to
give users some flexibility of speaking instead of keying the DTMF when
IVR ask for some input.
Here is an example of PHPAGI: -
#!/usr/bin/php -q
<?php
ob_implicit_flush(true);
set_time_limit(6);
...
do {
$pin_no = $agi->get_data('ivr_voice/EnterPersonalPin', 60000,
6); //IVR will prompt a user to enter PIN Number (DTMF).
$pin_no = $pin_no['result']; // Key input is stored in the
$pin_no variable
....
....
?>
Now how can I use speech to capture the input and store it in $pin_no
variable?
Cheers,
Nitesh
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Fri Dec 28, 2007 1:37 am Post subject: [asterisk-speech-rec] PHPAGI
Quote:
Now is there anyway to integrate LumenVox speech recognition
app with PHPAGI?
Hi Nitesh,
In short the answer to this question is yes. When you use LumenVox speech recognition on Asterisk, you will just make use of the standard Asterisk speech applications exported by res_speech.so.
Now how can I use speech to capture the input and store it in
$pin_no variable?
I am no expert at PHP or the AGI, but basically all you will need to do is use AGI to execute the SpeechBackground() function and then from your application read in the value of the Asterisk $SPEECH_TEXT(0) variable. Perhaps somebody more familiar with PHP and AGI can give you a code snippet of how this is done in PHP.
Posted: Fri Dec 28, 2007 1:38 pm Post subject: [asterisk-speech-rec] PHPAGI
On Thu, 2007-12-27 at 20:18 -0500, Nitesh Divecha wrote:
Quote:
Now is there anyway to integrate LumenVox speech recognition app with
PHPAGI?
As long as PHPAGI exposes the EXEC command, you can call any dialplan
applications from your PHP script, including SpeechBackground() and the
rest of the speech applications.
---
Jared Smith
Community Relations Manager
Digium, Inc.
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
//$agi->exec('Playback','hello-world', 'noanwser');
$agi->stream_file('hello-world');
$code=$agi->exec("SpeechCreate");
$code=$agi->exec("SpeechActivateGrammar","ABNFNumber");
$code=$agi->exec("SpeechStart");
//If($code<0) do something?
$agi->exec("SpeechBackground","vm-msginstruct",5);
$res=$agi->get_variable("SPEECH_TEXT(0)");
$data=$res['data'];
mylog("SR result=".$data);
//append the speech results to the CDR so the logger will include it in
the caller mysql entry
$datalog='SpeechResults:'.$data;
$agi->exec('Set','CDR(userfield)='.$datalog);
//destroy speech object
$agi->exec("SpeechDeactivateGrammar","ABNFNumber");
$agi->exec('SpeechDestroy');
$agi->exec('SayNumber',$data,'f');
?>
This will work with Lumenvox connector installed. Basically all this
does is accept a number and say the Speech result back at the person.
Cheers.
-----Original Message-----
From: asterisk-speech-rec-bounces@lists.digium.com
[mailto:asterisk-speech-rec-bounces@lists.digium.com] On Behalf Of
Stephen Keller
Sent: Thursday, December 27, 2007 6:34 PM
To: Use of speech recognition in Asterisk
Subject: Re: [asterisk-speech-rec] PHPAGI
> Now is there anyway to integrate LumenVox speech recognition
> app with PHPAGI?
>
Hi Nitesh,
In short the answer to this question is yes. When you use LumenVox
speech recognition on Asterisk, you will just make use of the standard
Asterisk speech applications exported by res_speech.so.
> Now how can I use speech to capture the input and store it in
> $pin_no variable?
>
I am no expert at PHP or the AGI, but basically all you will need to do
is use AGI to execute the SpeechBackground() function and then from your
application read in the value of the Asterisk $SPEECH_TEXT(0) variable.
Perhaps somebody more familiar with PHP and AGI can give you a code
snippet of how this is done in PHP.
Posted: Wed Jan 02, 2008 4:17 pm Post subject: [asterisk-speech-rec] PHPAGI
Thanks Stephen,
Videos are really helpful to get started with LumenVox app... Now I just
need to purchase the starter kit and test it out...
Cheers,
Nitesh
Stephen Keller wrote:
Quote:
> Now is there anyway to integrate LumenVox speech recognition
> app with PHPAGI?
>
Hi Nitesh,
In short the answer to this question is yes. When you use LumenVox speech recognition on Asterisk, you will just make use of the standard Asterisk speech applications exported by res_speech.so.
> Now how can I use speech to capture the input and store it in
> $pin_no variable?
>
I am no expert at PHP or the AGI, but basically all you will need to do is use AGI to execute the SpeechBackground() function and then from your application read in the value of the Asterisk $SPEECH_TEXT(0) variable. Perhaps somebody more familiar with PHP and AGI can give you a code snippet of how this is done in PHP.
Posted: Wed Jan 02, 2008 4:21 pm Post subject: [asterisk-speech-rec] PHPAGI
Thanks Jared,
Making some progress... Thanks for your support...
Cheers,
Nitesh
Jared Smith wrote:
Quote:
On Thu, 2007-12-27 at 20:18 -0500, Nitesh Divecha wrote:
> Now is there anyway to integrate LumenVox speech recognition app with
> PHPAGI?
>
As long as PHPAGI exposes the EXEC command, you can call any dialplan
applications from your PHP script, including SpeechBackground() and the
rest of the speech applications.
---
Jared Smith
Community Relations Manager
Digium, Inc.
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum