Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

transcribe is a Python command line script that translates audio to text using the Google Cloud Service Speech API.



You can copy the file to a local directory and use it from there.

For basic use:

python gs://myBucketName/myAudioFile.flac

Command Line Arguments

positional arguments:
  gsc_uri             gcs_uri for audio file to be recognized
  apikey              File path for .json file with gcs api key

optional arguments:
  -h, --help          show this help message and exit
  -l, --language      Language of audio recording
  -c, --confidences   Optionally return json file with transcription confidence levels.


You can specify the language of the audio file to be translated. There are many options available.

python gs://myBucketName/SpanishAudio.wav -l es-ES

Options are available for many language dialects (indicated by the code in all caps).

python gs://myBucketName/MexicanSpanishAudio.wav -l es-MX

You can choose to write a second file to your current directory with the confidence levels for chunks of translation. Note that the script only returns the most likely translation.

python gs://myBucketName/EgyptianArabic.wav -l ar-EG

For more information on the script, check out this Speech2Text notebook.

You can’t perform that action at this time.