Skip to content

Instantly share code, notes, and snippets.

@penk
Created December 20, 2012 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save penk/4343933 to your computer and use it in GitHub Desktop.
Save penk/4343933 to your computer and use it in GitHub Desktop.
#!/bin/bash
arecord -f cd -t wav -r 16000 -d 5 | flac -f - -o sample.flac
wget -q -U "Mozilla/5.0" --post-file sample.flac --header="Content-Type: audio/x-flac; rate=16000" -O - \
"http://www.google.com/speech-api/v1/recognize?lang=en-us&client=chromium"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment