import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print("Talk")
audio_text = r.listen(source)
print("Time over, thanks")
try:
print("Text: "+r.recognize_google(audio_text))
except:
print("Sorry, I did not get that")
Traceback (most recent call last):
File "c:\Users\LEGION\Desktop\sp.py", line 1, in <module>
import speech_recognition as sr
File "C:\Users\LEGION\AppData\Roaming\Python\Python313\site-packages\speech_recognition\__init__.py", line 7, in <module>
import aifc
ModuleNotFoundError: No module named 'aifc'
我不知道这里发生了什么。我还重新安装了库和 python,但我给了我同样的错误,所以请帮助我!
DeprecationWarning:'aifc' 已弃用并计划在 Python 3.13 中删除