google-cloud-speech

Google Cloud Speech API for UWP application

梦想的初衷 提交于 2021-01-28 13:13:13
问题 I'm trying to develop a Speech to Text UWP application (Universal Window Platform) which get voice from microphone and steam to Google Cloud Speech Service. But it seems that Google cloud Speech API has not supported UWP application. The error below occurred when I install client library to my project using Nuget: Install-Package : Package Google.Cloud.Speech.V1 1.0.1 is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-x86. Package Google.Cloud.Speech.V1 1.0.1 supports: -

No language code from asynchronous speech recognition response with alternative language code

那年仲夏 提交于 2021-01-04 04:25:12
问题 I am trying to use the new beta alternative languages functionality that allows to give a set of languages when creating the transcription job and getting back the detected language along with the transcription results in that language. When I run the code example from the documentation page (synchronous) everything runs fine and the detected language code is returned in the results: from google.cloud import speech_v1p1beta1 as speech client = speech.SpeechClient() speech_file = 'resources

No language code from asynchronous speech recognition response with alternative language code

谁都会走 提交于 2021-01-04 04:22:05
问题 I am trying to use the new beta alternative languages functionality that allows to give a set of languages when creating the transcription job and getting back the detected language along with the transcription results in that language. When I run the code example from the documentation page (synchronous) everything runs fine and the detected language code is returned in the results: from google.cloud import speech_v1p1beta1 as speech client = speech.SpeechClient() speech_file = 'resources

grpc : call was half-closed error

只愿长相守 提交于 2020-12-12 10:25:12
问题 I'm using Google Cloud Platform Speech API. I'm developing using sample source. https://github.com/GoogleCloudPlatform/android-docs-samples/tree/master/speech/Speech almost the same as sample source. except many start/stop of VoiceRecorder in my app. I got this error in samsung devices. I didn't get this error in huawei devices. com.google.common.base.Preconditions.checkState (Preconditions.java:444) io.grpc.internal.ClientCallImpl.sendMessage (ClientCallImpl.java:389) io.grpc

How to end Google Speech-to-Text streamingRecognize gracefully and get back the pending text results?

ⅰ亾dé卋堺 提交于 2020-11-25 02:09:11
问题 I'd like to be able to end a Google speech-to-text stream (created with streamingRecognize), and get back the pending SR (speech recognition) results. In a nutshell, the relevant Node.js code: // create SR stream const stream = speechClient.streamingRecognize(request); // observe data event const dataPromise = new Promise(resolve => stream.on('data', resolve)); // observe error event const errorPromise = new Promise((resolve, reject) => stream.on('error', reject)); // observe finish event

google cloud speech ImportError: cannot import name 'enums'

房东的猫 提交于 2020-06-01 06:57:08
问题 I'm using google-cloud-speech api for my project . I'm using pipenv for virtual environment i installed google-cloud-speech api with pipenv install google-cloud-speech and pipenv update google-cloud-speech i followed this docs https://cloud.google.com/speech-to-text/docs/reference/libraries This is my code: google.py: # !/usr/bin/env python # coding: utf-8 import argparse import io import sys import codecs import datetime import locale import os from google.cloud import speech_v1 as speech

How can I authorize Google Speech-to-text from Google Apps script?

折月煮酒 提交于 2020-05-14 08:48:09
问题 I'm trying to execute google-speech-to-text from apps script. Unfortunately, I cannot find any examples for apps script or pure HTTP, so I can run it using simple UrlFetchApp. I created a service account and setup a project with enabled speech-to-text api, and was able to successfully run recognition using command-line example curl -s -H "Content-Type: application/json" \ -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \ https://speech.googleapis.com/v1/speech

How can I authorize Google Speech-to-text from Google Apps script?

早过忘川 提交于 2020-05-14 08:47:32
问题 I'm trying to execute google-speech-to-text from apps script. Unfortunately, I cannot find any examples for apps script or pure HTTP, so I can run it using simple UrlFetchApp. I created a service account and setup a project with enabled speech-to-text api, and was able to successfully run recognition using command-line example curl -s -H "Content-Type: application/json" \ -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \ https://speech.googleapis.com/v1/speech

Can the Google Speech API be configured to return only numbers / letters?

荒凉一梦 提交于 2020-05-13 07:14:47
问题 Can the Google Speech API be configured to only return numbers and letters, as opposed to full words? The use case is translating Canadian postal codes. Ex. M 1 B 0 R 3. Google may return "Em 1 Be 0 Are 3" We have tried: Using speechContexts and feeding in letters A - Z, as individual phrases. This improved the accuracy for us. We did not have much success passing in individual numbers (ex 1, 2, 3). Specifying the codec and sample rate of our WAV file using the encoding and sampleRateHertz

How to get SSML <mark> timestamps from Google Cloud text-to-speech API

只谈情不闲聊 提交于 2020-05-10 03:20:06
问题 I want to use SSML markers through the Google Cloud text-to-speech API to request the timing of these markers in the audio stream. These timestamps are necessary in order to provide cues for effects, word/section highlighting and feedback to the user. I found this question which is relevant, although the question refers to the timestamps for each word and not the SSML <mark> tag. The following API request returns OK but shows the lack of the requested marker data. This is using the Cloud Text