Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in GCP by (19.7k points)
recategorized by

I'm playing with Google Speech Recognition API

After a successfully Getting started I'm trying to understand and made some changes in this first example but I don't know what "gs" protocol is and how to set it to use my own audio file.

sync-request.json

{

  "config": {

      "encoding":"FLAC",

      "sample_rate": 16000

  },

  "audio": {

      "uri":"gs://cloud-samples-tests/speech/brooklyn.flac"

  }

}

I tried to change the gs protocol to the HTTP protocol but doesn't work.

Thanks in advance. 

closed

1 Answer

+1 vote
by (62.9k points)
selected by
 
Best answer

You can access the file that you mention as follows:

https://storage.googleapis.com/cloud-samples-tests/speech/brooklyn.flac

So, if you create and upload your own file in Google Storage like I'm doing while trying to test the same API you are using, the "equivalence" is the following:

https://storage.googleapis.com/ 

translates to

gs://

and vice-versa.

I hope this helps.

Browse Categories

...