0
votes

I have a problem installing SpeechRecognition in python 3.7.

I installed PyAudio through Pip, and am attempting to do real-time voice recording. However, when I run the code, I get the following message:

Please build and install the PortAudio Python bindings first. An exception has occurred, use %tb to see the full traceback. SystemExit: -1 C:\Users\samah\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py:3333: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)

When I tried to install PortAudio I faced another problem:

**ERROR: Command errored out with exit status 1:
 command: 'c:\users\samah\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\samah\\AppData\\Local\\Temp\\pip-install-s4vozy9x\\audio.coders\\setup.py'"'"'; __file__='"'"'C:\\Users\\samah\\AppData\\Local\\Temp\\pip-install-s4vozy9x\\audio.coders\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
     cwd: C:\Users\samah\AppData\Local\Temp\pip-install-s4vozy9x\audio.coders\
Complete output (5 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\samah\AppData\Local\Temp\pip-install-s4vozy9x\audio.coders\setup.py", line 5, in <module>
    import ConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.**
1

1 Answers

0
votes

It looks like you are also missing the module 'ConfigParser' in your Python distribution so as you attempt to install PortAudio it fails to find it and thus can't complete the install.

Could you check if configparser in fact is installed?

pip freeze

And if not manually install with

pip install configparser