Skip to content

Instantly share code, notes, and snippets.

@Unitecho
Created March 3, 2013 06:21
Show Gist options
  • Select an option

  • Save Unitecho/5074920 to your computer and use it in GitHub Desktop.

Select an option

Save Unitecho/5074920 to your computer and use it in GitHub Desktop.

Revisions

  1. Unitecho created this gist Mar 3, 2013.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@

    rec -c 2 -r 16000 -s -t wav - | flac - -f --best --sample-rate 16000 -o out.flac
    #arecord -f cd -t wav -d 5 -r 16000 | flac - -f --best --sample-rate 16000 -o out.flac


    wget --post-file='out.flac' --header='Content-Type: audio/x-flac; rate=16000;' \
    -O 'recognized.json' \
    'https://www.google.com/speech-api/v1/recognize?lang=fr-FR'

    ll
    cat recognized.json