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
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

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name SpeechToText_Example

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Package Details

Author(s)

  • mikko@lavento.com

Tags

Google Speech GoogleCloud API Speech-to-text

Dependencies

This script has no dependencies.

FileList

Version History

Version Downloads Last updated
1.0.0 (current version) 122 9/18/2019