Skip to content

Instantly share code, notes, and snippets.

@fennb
Created August 11, 2011 06:20
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fennb/1139015 to your computer and use it in GitHub Desktop.
Save fennb/1139015 to your computer and use it in GitHub Desktop.
#!/bin/bash
# FLAC encoded example
curl \
--data-binary @example.flac \
--header 'Content-type: audio/x-flac; rate=16000' \
'https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&pfilter=2&lang=en-US&maxresults=6'
# Speex encoded example
curl \
--data-binary @example.spx \
--header 'Content-type: audio/x-speex-with-header-byte; rate=16000' \
'https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&pfilter=2&lang=en-US&maxresults=6'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment