google-speech-api

com.google.api.gax.rpc.UnavailableException: io.grpc.StatusRuntimeException: UNAVAILABLE: Credentials failed to obtain metadata :cloud speech

雨燕双飞 提交于 2020-03-25 16:36:06
问题 i've done a speech to text configuration using google's cloud speech api in java, this works on other machine but the same setup does not work on my machine. i've installed google cloud platform tools from eclipse market place also i've set the environment credential variable for run time. can anyone please help ? 来源: https://stackoverflow.com/questions/59845869/com-google-api-gax-rpc-unavailableexception-io-grpc-statusruntimeexception-una

Creating suitable WAV files for Google Speech API

让人想犯罪 __ 提交于 2020-02-23 09:15:11
问题 I'm using pyaudio to record my voice as wav file. I'm using following code: def voice_recorder(): FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 22050 CHUNK = 1024 RECORD_SECONDS = 4 WAVE_OUTPUT_FILENAME = "first.wav" audio = pyaudio.PyAudio() # start Recording stream = audio.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK) print "konusun..." frames = [] for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)): data = stream.read(CHUNK) frames.append(data)

Creating suitable WAV files for Google Speech API

爷,独闯天下 提交于 2020-02-23 09:15:09
问题 I'm using pyaudio to record my voice as wav file. I'm using following code: def voice_recorder(): FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 22050 CHUNK = 1024 RECORD_SECONDS = 4 WAVE_OUTPUT_FILENAME = "first.wav" audio = pyaudio.PyAudio() # start Recording stream = audio.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK) print "konusun..." frames = [] for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)): data = stream.read(CHUNK) frames.append(data)

Using Gstreamer with Google speech API (Streaming Transcribe) in C++

荒凉一梦 提交于 2020-02-02 13:42:51
问题 I am using the Google Speech API from cloud platform for getting speech-to-text of a streaming audio. I have already done the REST API calls using curl POST requests for a short audio file using GCP. I have seen the documentation of the Google Streaming Recognize, which says "Streaming speech recognition is available via gRPC only." I have gRPC (also protobuf) installed in my OpenSuse Leap 15.0 . Here is the screenshot of the directory. Next I am trying to run the streaming_transcribe example

Using Gstreamer with Google speech API (Streaming Transcribe) in C++

强颜欢笑 提交于 2020-02-02 13:38:30
问题 I am using the Google Speech API from cloud platform for getting speech-to-text of a streaming audio. I have already done the REST API calls using curl POST requests for a short audio file using GCP. I have seen the documentation of the Google Streaming Recognize, which says "Streaming speech recognition is available via gRPC only." I have gRPC (also protobuf) installed in my OpenSuse Leap 15.0 . Here is the screenshot of the directory. Next I am trying to run the streaming_transcribe example

Convert .m4a to .wav

只愿长相守 提交于 2020-01-25 07:06:10
问题 I need to convert buffer audio file .m4a to buffer audio file .wav for send to google speech api by NodeJS var toWav = require('audiobuffer-to-wav') var xhr = require('xhr') var context = new AudioContext() // request the MP3 as binary xhr({ uri: 'audio/track.mp3', responseType: 'arraybuffer' }, function (err, body, resp) { if (err) throw err // decode the MP3 into an AudioBuffer audioContext.decodeAudioData(resp, function (buffer) { // encode AudioBuffer to WAV var wav = toWav(buffer) // do

How to increase listen time in google speech api?

随声附和 提交于 2020-01-24 11:49:11
问题 I have made a working speech to text program using the google speech to text api that records speech and copies it into a .txt however, the Google speech api does not listen for very long (approx 9 seconds) is there any way to increase this, or a better api for use in python that can write while listening? import time import speech_recognition as sr import sys import fileinput r=sr.Recognizer() #tells the program to use a mic and to listen with sr.Microphone() as source: audio=r.listen(source

How to increase listen time in google speech api?

半城伤御伤魂 提交于 2020-01-24 11:49:05
问题 I have made a working speech to text program using the google speech to text api that records speech and copies it into a .txt however, the Google speech api does not listen for very long (approx 9 seconds) is there any way to increase this, or a better api for use in python that can write while listening? import time import speech_recognition as sr import sys import fileinput r=sr.Recognizer() #tells the program to use a mic and to listen with sr.Microphone() as source: audio=r.listen(source

portaudio.h: No such file or directory

半腔热情 提交于 2020-01-24 03:29:06
问题 I got the following error while trying to install pyaudio using pip3 in ubuntu 16.04: Collecting pyaudio Downloading PyAudio-0.2.11.tar.gz Installing collected packages: pyaudio Running setup.py install for pyaudio ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mxgvewdb/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install -

How to import google cloud speech recognition in Google App Engine (python)

假装没事ソ 提交于 2020-01-11 06:50:52
问题 I want to use google.cloud library on my Google App Engine python application. In my local all my tests work since I installed this library on my local. I was expecting it to be supported in GAE by default but it's not supported. This the error I got: from google.cloud import speech ImportError: No module named cloud I had a look at adding 3rd party libraries at https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27 After following the instructions I got