google-cloud-speech

Fetch “transcript” values from Google speech api

◇◆丶佛笑我妖孽 提交于 2019-12-11 12:26:07
问题 I am trying to fetch the "transcript" value from the following result: { transcript: "1 2 3 4" confidence: 0.902119 words { start_time { nanos: 200000000 } end_time { nanos: 700000000 } word: "1" } words { start_time { nanos: 700000000 } end_time { nanos: 900000000 } word: "2" } words { start_time { nanos: 900000000 } end_time { seconds: 1 } word: "3" } words { start_time { seconds: 1 } end_time { seconds: 1 nanos: 300000000 } word: "4" } } The code I am writing to get it is : for result in

Get progress of a long_running_recognize operation (Google Cloud Speech API)

删除回忆录丶 提交于 2019-12-11 07:28:13
问题 My code is pretty simple. It runs long_running_recognize on a single channel FLAC audio file and stores the result using the Google Cloud Speech API. I'm trying to find a way to get the current progress of the long_running_recognize operation. I found some documentation on the topic but I'm having trouble making any sense of it. client = speech.SpeechClient() operation = client.long_running_recognize( audio = speech.types.RecognitionAudio( uri = str('gs://speech-clips/'+self.audio_fqid), ),

Google Speech API how to pickup results of my asyncrecognize request

三世轮回 提交于 2019-12-11 05:32:21
问题 I executed the following curl -s -k -H "Content-Type: application/json" -H "Authorization: Bearer ${MY_ACCESS_TOKEN} " https://speech.googleapis.com/v1beta1/speech:asyncrecognize -d @json/automator.json which returned { "name": "376034185739864225" } I tried using the interactive GET available here` passing in that name value above, (about 12 hours later), but got back { "error": { "code": 404, "message": "Requested entity was not found.", "status": "NOT_FOUND" } } Am I missing something?

Streaming audio buffer from a web page to C# Google Cloud Speech to Text SDK and receiving 400 errors

半腔热情 提交于 2019-12-11 04:37:42
问题 I have a requirement to add speech-to-text from a web page. I cannot find enough documentation to tell me what the best approach would be. I have read posts and reviewed samples Stream Audio from C#. UPDATE: I have converted to WAV format on the client before sending to the server. The result is a file that is recognized as WAV with no output. UPDATE[20181004]: I can successfully send record and save a full WAV file and then send it to Google Speech API branch_Record-in-browser-before-sending

What is the Endpoint/Port used for Google Cloud Speech API

﹥>﹥吖頭↗ 提交于 2019-12-11 02:34:43
问题 For using Google Cloud Speech API via the streaming API(Performing Streaming Speech Recognition on an Audio Stream), what are the endpoints/ports we need to enable/whitelist? The reason being asked is, we are running this on a restricted device, and need to open only the required outbound endpoints/ports. 回答1: You should whitelist *.googleapis.com and accounts.google.com . These all are using https protocol. The actual endpoint for speech is https://speech.googleapis.com/v1/speech, but you

use Google Application Default Credentials without json file

不问归期 提交于 2019-12-10 17:35:46
问题 I have created a console app using c#. I used google cloud speech api. I followed this sample application to create the app. To authenticate speech api, I wrote the following code in main method Environment.SetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS", "path-to-json-file", EnvironmentVariableTarget.Process); Everything works fine. My problem, I have to ship the exe along with the json file. I do not want to expose the json file. How can I embed the json file content in code or

Authenticating Google Cloud Speech via GRPC on Android using an API key

假如想象 提交于 2019-12-10 15:33:58
问题 I've managed to get Google Cloud Speech working for my Android app using a service account in streaming mode via GRPC. However, according to what I've read, I shouldn't deploy an Android app with these credentials in them (currently stored as a JSON file in a resource) for security reasons. The correct thing is to create an API key, as described here: https://cloud.google.com/speech/docs/common/auth This allows me to restrict access to my specific Android app. However, I have been unable to

google cloud speech api returning empty result

别说谁变了你拦得住时间么 提交于 2019-12-10 14:48:53
问题 I have been using the Chromium Google Speech API and switched over to using the Google Cloud Speech API recently. Ever since the Google cloud speech API got announced, the performance seems to have degraded in terms of the accuracy of recognition. Also I see that there are more and more "empty results" coming back for audio streamed. I stream audio simultaneously to multiple different services and Google Cloud Speech API is returning empty result while some of the other services are returning

Error: 5 NOT_FOUND: Requested entity was not found on LongRunningRecognize

拟墨画扇 提交于 2019-12-08 04:54:44
问题 I'm trying to transcribe an audio file with the node.js client Google Speech to Text and Google Cloud Function. Unfortunately I get this error : Error: 5 NOT_FOUND: Requested entity was not found I supposed it comes from authentification problem, but i am not sure. First, I tried without credentials assuming that GCF will use ADC (Application Default Credentials). After, I added client_email et private_key from service account to SpeechClient options param, but it didn't work. I added

how to play .opus audio file in android?

﹥>﹥吖頭↗ 提交于 2019-12-07 13:43:31
问题 I'm developing an app for Recognize speech using google cloud speech APi and recording audio simultaneously. git link I tried to play recorded .opus audio file getting IOException W/System.err: java.io.IOException: setDataSource failed. Any idea?? Thanks!! 回答1: A user on the android stack exchange mentioned being able to play opus files when they have a .ogg extension in newer versions of Android. Rename your .opus files to .ogg. 回答2: I don't know about that specific error, but the Supported