SpeechToText_Example
1.0.0
Speech to Text API example using Google's cloud.
pre-requisites: assumption that these are done: https://cloud.google.com/speech-to-text/docs/quickstart-client-libraries
API shorter than minute (not used in this example). Strangely experimenting under 30 second audios were accepted, not 30-60sec audios.
https://speech.googleapis.com/v1/speech
longer than minute aud
pre-requisites: assumption that these are done: https://cloud.google.com/speech-to-text/docs/quickstart-client-libraries
API shorter than minute (not used in this example). Strangely experimenting under 30 second audios were accepted, not 30-60sec audios.
https://speech.googleapis.com/v1/speech
longer than minute aud
Speech to Text API example using Google's cloud.
pre-requisites: assumption that these are done: https://cloud.google.com/speech-to-text/docs/quickstart-client-libraries
API shorter than minute (not used in this example). Strangely experimenting under 30 second audios were accepted, not 30-60sec audios.
https://speech.googleapis.com/v1/speech
longer than minute audio file
https://speech.googleapis.com/v1/speech:longrunningrecognize
xxxxxxx gcloud commands for debugging reason xxxxxxx
Problem: Using rest-api via powershell, the errors you get, tells nothing: 400 bad request.
Debugging with gcloud console gives exact errors like no access to bucket etc.
list what account you are using
basically should be the same than you are using in your .json key file
gcloud auth list
setting the usable account
speechtotext@speechtotext-<numbers>.iam.gserviceaccount.com
gcloud auth activate-service-account speechtotext@speechtotext-<numbers>.iam.gserviceaccount.com --key-file="C:\Skriptit\SpeechToText\speechtotext-<numbers>-72583c2223fe.json"
Testing the API
helpful site: https://cloud.google.com/speech-to-text/docs/async-recognize speech-async-recognize-gcs-gcloud
gcloud ml speech recognize-long-running gs://<yourbucket>_bucket/Test.flac --language-code=en-US --async
Getting th status of the work
gcloud ml speech operations describe 591271978XXXX801384
gcloud ml speech operations wait 1727881XXXX9022087
Show more
pre-requisites: assumption that these are done: https://cloud.google.com/speech-to-text/docs/quickstart-client-libraries
API shorter than minute (not used in this example). Strangely experimenting under 30 second audios were accepted, not 30-60sec audios.
https://speech.googleapis.com/v1/speech
longer than minute audio file
https://speech.googleapis.com/v1/speech:longrunningrecognize
xxxxxxx gcloud commands for debugging reason xxxxxxx
Problem: Using rest-api via powershell, the errors you get, tells nothing: 400 bad request.
Debugging with gcloud console gives exact errors like no access to bucket etc.
list what account you are using
basically should be the same than you are using in your .json key file
gcloud auth list
setting the usable account
speechtotext@speechtotext-<numbers>.iam.gserviceaccount.com
gcloud auth activate-service-account speechtotext@speechtotext-<numbers>.iam.gserviceaccount.com --key-file="C:\Skriptit\SpeechToText\speechtotext-<numbers>-72583c2223fe.json"
Testing the API
helpful site: https://cloud.google.com/speech-to-text/docs/async-recognize speech-async-recognize-gcs-gcloud
gcloud ml speech recognize-long-running gs://<yourbucket>_bucket/Test.flac --language-code=en-US --async
Getting th status of the work
gcloud ml speech operations describe 591271978XXXX801384
gcloud ml speech operations wait 1727881XXXX9022087
Installation Options
Owners
Package Details
Author(s)
- mikko@lavento.com
Tags
Google Speech GoogleCloud API Speech-to-text
Dependencies
This script has no dependencies.
FileList
- SpeechToText_Example.nuspec
- SpeechToText_Example.ps1
Version History
Version | Downloads | Last updated |
---|---|---|
1.0.0 (current version) | 136 | 9/18/2019 |