最近在尝试语音辨识
我使用google 的辨识SpeechRecognition
其中的函数为r.recognize_google
网络上看到人讨论当档案超过一分钟左右无法辨识
我上他的网站看到
https://cloud.google.com/speech/quotas
可以使用cloud 的uri
因此我尝试将档案上传到google cloud platform
根据uri的概念的uri 为下
gs://speechrecognition21/test.wav
我的code如以下
import speech_recognition as sr
# obtain path to "english.wav" in the same folder as this script
AUDIO_FILE = "gs://speechrecognition21/test.wav"
# use the audio file as the audio source
r = sr.Recognizer()
with sr.AudioFile(AUDIO_FILE) as source:
audio = r.record(source) # read the entire audio file
r.recognize_google(audio, language='en-US')
想请问是否有人可以教导 是我那边有错误?