View source for Google Voice Recognition
From Openmoko
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Template used on this page:
Return to Google Voice Recognition.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Template used on this page:
Return to Google Voice Recognition.
Because the performance of your Freerunner is too poor for voice recognition, the Google Voice API can be used to convert an recorded Audio file into a text string. Be aware that the audio file will be transmitted to Google, so need to have Internet access on your freerunner FR to submit the audio file.
NOTE: You must be aware of the fact, that the follow script is running on your freerunner but it is not a standalone voice recognition software and so you might not want to use this tool for private audio files. |
For using the Google Voice API and the script you need to have the following package installed on your freerunner:
The script code can be tested on any Linux machine with SoX, SED, WGET installed. Modifiy the script according to your demands and storage of your audio files
#!/bin/sh echo "1 SoX Sound Exchange - Convert WAV to FLAC with 16000" sox message.wav message.flac rate 16k echo "2 Submit to Google Voice Recognition" wget -q -U "Mozilla/5.0" --post-file message.flac --header="Content-Type: audio/x-flac; rate=16000" -O - "http://www.google.com/speech-api/v1/recognize?lang=de-de&client=chromium" > message.ret echo "3 SED Extract recognized text" cat message.ret | sed 's/.*utterance":"//' | sed 's/","confidence.*//' > message.txt echo "4 Remove Temporary Files" rm message.flac rm message.ret echo "5 Show Text " cat message.txt
The WGET code was derived from http://www.commandlinefu.com/commands/view/8043/google-voice-recognition-api