OSError:没有默认输入设备可用
"C:\Users\ASUS PC\AppData\Local\Programs\Python\Python36\python.exe" "C:/Users/ASUS PC/Downloads/Music/Music/Voice-Based-Mail-Syatem-master/Voice-Based-Mail-Syatem-master/send_mail.py"
Traceback (most recent call last):
File "C:/Users/ASUS PC/Downloads/Music/Music/Voice-Based-Mail-Syatem-master/Voice-Based-Mail-Syatem-master/send_mail.py", line 14, in <module>
with sr.Microphone() as source:
File "C:\Users\ASUS PC\AppData\Local\Programs\Python\Python36\lib\site-packages\speech_recognition\__init__.py", line 86, in __init__
device_info = audio.get_device_info_by_index(device_index) if device_index is not None else audio.get_default_input_device_info()
File "C:\Users\ASUS PC\AppData\Local\Programs\Python\Python36\lib\site-packages\pyaudio.py", line 949, in get_default_input_device_info
device_index = pa.get_default_input_device()
OSError: No Default Input Device Available
Process finished with exit code 1
先生,我正在使用Windows10 OS 如何在sr.microphone()中添加索引值 以及如何解决该错误