Speech to text

speech_to_text(file: <binary>, encoding: <opt_string>, rate_hertz: <opt_integer>, audio_channels: <opt_integer>)
    -> { result: <text> }

with parameters:

  • file: binary file data
  • encoding: default: OGG_OPUS. Supported audio codecs: MP3, FLAC, LINEAR16, MULAW, AMR, AMR_WB, OGG_OPUS, SPEEX_WITH_HEADER_BYTE
  • rate_hertz: default: 48000
  • audio_channels: defeault: 1

For more information, see https://cloud.google.com/speech-to-text/docs/encoding