Skip to content

Instantly share code, notes, and snippets.

@code-R
Created December 3, 2018 13:27
Show Gist options
  • Save code-R/edaa18414a40c0aa4ec0dc6c08de416c to your computer and use it in GitHub Desktop.
Save code-R/edaa18414a40c0aa4ec0dc6c08de416c to your computer and use it in GitHub Desktop.

download the script

wget https://gist.github.com/code-R/f1465e166c47a676bcab110d29624197

download the audio file

wget https://vzo-in-data.s3.amazonaws.com/backups/gcloud_test.wav?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=36000&X-Amz-Credential=AKIAJPJNRFHD5RZCP77A%2F20181203%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Date=20181203T130420Z&X-Amz-Signature=c9b1e5b89c6972af1654a21cf98600ddffe99c96ccdfd1a535eabc8ed26b9c15

and then run the script you have downloaded

pip3 install google-cloud-speech==0.36.0 (if you dont have pip3 try pip install google-cloud-speech==0.36.0)

python speech_to_text.py

this will give you instructions on how to setup service_account/project and enable speech api on the service account

https://cloud.google.com/docs/authentication/getting-started

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment