标签: python speech-recognition
我想离线使用谷歌api语音识别,这是我的代码,但它只能在线工作。
import speech_recognition as sr r = sr.Recognizer() with sr.Microphone() as source: print ('Say Something!') audio = r.listen(source) print ('Done!') text = r.recognize_google(audio) print(text)