What audio file types does Google Cloud Speech API recognize?

EDIT May 2020: seems things improved and this answer is no longer correct: see new docs for details about supported formats (including WAV).


As of 2016 the WAVe format does not seem to be supported. These formats are documented as supported though:

  • LINEAR16 Uncompressed 16-bit signed little-endian samples. This is the only encoding that may be used by speech.asyncrecognize.
  • FLAC This is the recommended encoding for speech.syncrecognize and StreamingRecognize because it uses lossless compression; therefore recognition accuracy is not compromised by a lossy codec. Only 16-bit samples are supported. Not all fields in STREAMINFO are supported
  • MULAW 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
  • AMR Adaptive Multi-Rate Narrowband codec. sampleRate must be 8000 Hz.
  • AMR_WB Adaptive Multi-Rate Wideband codec. sampleRate must be 16000 Hz.

https://cloud.google.com/speech/reference/rest/v1beta1/RecognitionConfig#AudioEncoding