这是我尝试从Google API网站运行的代码:
import speech_recognition as sr
r = sr.Recognizer()
with sr.Mircophone() as source:
print("Say something!")
audio = r.listen(source)
try:
print("You said: " +
r.recognixe_google(audio))
except LookupError:
print("Could not understand audio")
我得到的错误是:
Traceback (most recent call last):
File "/home/pi/Talkatronic/Talk-a-
tronic.py”,第4行,在 使用sr.Mircophone()作为来源: AttributeError:模块“ speech_recognition” 没有属性“麦克风”
我在这里看到了另一篇文章,该文章具有非常相似的代码,并且具有完全相同的错误,但是,没有任何修复程序对我有用。谁能帮忙