import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
audio = r.listen(source)
try:
print("JARVIS : "+r.recognize_google(audio))
except Exception:
print("Something went Wrong !!!!!!")
错误= ALSA库脉冲.c:243:(pulse_connect)PulseAudio:无法连接:连接被拒绝 ALSA lib pcm_usb_stream.c:486:(_ snd_pcm_usb_stream_open)卡的无效类型 ALSA lib pcm_usb_stream.c:486:(_ snd_pcm_usb_stream_open)卡类型无效