Despite having installed PyAudio, because of the microphone, got another error:
Traceback (most recent call last):
File "/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/anaconda3/lib/python3.6/site-packages/speech_recognition/__main__.py", line 4, in <module>
m = sr.Microphone()
File "/anaconda3/lib/python3.6/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 "/anaconda3/lib/python3.6/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
Expected behaviour
A moment of silence, please...
Set minimum energy threshold to 600.4452854381937
Say something!
Actual behaviour
It does not detect any default microphone even though there is just one input device working properly because it was tested by executing the commands arecord and then aplay.
python -c "import speech_recognition as sr;print(sr.Microphone.list_microphone_names())"
[]
System information
My system is Linux version 4.19.0-4-amd64
My Python version is Python 3.6.8 :: Anaconda, Inc.
My Pip version is pip 19.0.3 from /anaconda3/lib/python3.6/site-packages/pip (python 3.6)
My SpeechRecognition library version is 3.6.3
My PyAudio library version is 0.2.11
My working microphones are: (Checked by running arecord -L.)
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
Steps to reproduce
Then, execute the following commands:
Expected behaviour
Actual behaviour
It does not detect any default microphone even though there is just one input device working properly because it was tested by executing the commands arecord and then aplay.
System information
My system is
Linux version 4.19.0-4-amd64
My Python version is
Python 3.6.8 :: Anaconda, Inc.
My Pip version is
pip 19.0.3 from /anaconda3/lib/python3.6/site-packages/pip (python 3.6)
My SpeechRecognition library version is
3.6.3
My PyAudio library version is
0.2.11
My working microphones are: (Checked by running
arecord -L
.)