This sample demonstrates how to transcribe audio from a file with voice activity timeouts. It uses the Speech-to-Text API to transcribe the audio and prints the transcript to the console. The sample also prints out speech activity events, such as when speech starts and ends.
Code sample
Python
To learn how to install and use the client library for Speech-to-Text, see Speech-to-Text client libraries. For more information, see the Speech-to-Text Python API reference documentation.
To authenticate to Speech-to-Text, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
What's next
To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.