[asterisk-users] Speech recognition in asterisk using google voice API

Lefteris Zafiris zaf.000 at gmail.com
Sat Jan 7 06:22:24 CST 2012


On 01/07/2012 09:34 AM, Bruce B wrote:
> Added two new features to the script: Timeout value and speechdata type.
> 
> *exten => s,n,agi(speech-recog.agi,en-US,3000,phoneNumb)*
> - Will listen for 3 seconds and sanitize return as a single number without
> any spaces in between. This helps when one reads phone number in format
> 415-554-2323 and google returns, "415 554 2323" as result which is not very
> usable.
> 
> *exten => s,n,agi(speech-recog.agi,en-US,20000,string)*
> - Will listen for 20 second and return result as provided by Google
> untouched.
> 
> It would be great to see them in future versions as I seem to need them
> dearly in a real life scenario.
> 
> Updated script attached.
> 
> -Bruce

Thank you Bruce for the testing and the suggestions.
Both features added in the script. Timeout can now be set by the user,
also -1 means no timeout and the recording keeps going till # is pressed.
Space gets stripped between digits, this is now the default behavior and
there's no need to determine the 'speechdata' type.
The updated code can be found here:
https://github.com/zaf/asterisk-speech-recog/tarball/master

Next on my TODO list is to make use of the asterisk speech recognition
API (https://wiki.asterisk.org/wiki/display/AST/Speech+Recognition+API)
This will make the application actually usable for real case scenarios
and not a proof of concept as it is now.

----------------
Lefteris Zafiris



More information about the asterisk-users mailing list