This page contains code samples for Speech-to-Text. To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.
Streaming speech recognition with punctuation
Performs streaming speech recognition on raw PCM audio data.
Synchronously recognizes punctuation
Performs transcription with automatic punctuation on raw PCM audio data.
Transcribe a local file using an enhanced speech recognition (beta)
Transcribe a local audio file, where you specify an enhanced model.
Transcribe a local file with auto punctuation (beta)
Transcribe a local audio file, including auto punctuation.
Transcribe a multi-channel file in Cloud Storage (beta)
Transcribe an audio file stored in Cloud Storage that includes more than one channel.
Transcription of a file in Cloud Storage with diarization
Recognize multiple speakers in an audio file stored in Cloud Storage.
Try it for yourself
If you're new to Google Cloud, create an account to evaluate how Speech-to-Text performs in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.Try Speech-to-Text free