[问题] google 语音辨识 uri问题 当音档超过1分

楼主: wanson (望生)   2017-11-03 20:18:31
最近在尝试语音辨识
我使用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')
想请问是否有人可以教导 是我那边有错误?
作者: goldflower (金色小黄花)   2017-11-04 01:09:00
现在应该都要key了?可能可以考虑改用CMU Sphinx
作者: TitanEric (泰坦)   2017-11-04 17:39:00
可以切割后再丢给api呀
作者: snowman9436   2017-11-05 00:12:00
一则声音档的上限是65秒,超过会出现问题有问题的话在FB的PYTHON TAIWAN那个版比较多人回

Links booklink

Contact Us: admin [ a t ] ucptt.com