[問題] google 語音辨識 url問題 當音檔超過1分消失

看板Python作者時間8年前 (2017/11/03 20:18), 8年前編輯推噓3(302)
留言5則, 3人參與, 最新討論串1/1
最近在嘗試語音辨識 我使用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') 想請問是否有人可以教導 是我那邊有錯誤? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.211.164 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1509711514.A.7F2.html ※ 編輯: wanson (140.112.211.164), 11/03/2017 20:34:19

11/04 01:09, , 1F
現在應該都要key了?
11/04 01:09, 1F

11/04 01:14, , 2F
可能可以考慮改用CMU Sphinx
11/04 01:14, 2F

11/04 17:39, , 3F
可以切割後再丟給api呀
11/04 17:39, 3F

11/05 00:12, , 4F
一則聲音檔的上限是65秒,超過會出現問題
11/05 00:12, 4F

11/05 00:13, , 5F
有問題的話在FB的PYTHON TAIWAN那個版比較多人回
11/05 00:13, 5F
文章代碼(AID): #1P_5wQVo (Python)