-3
To use Speech recognition with microphone, I need to install Pyaudio, more when running the installation pip install pyaudio
I get the following error:
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\grave\\AppData\\Local\\Temp\\pip-install-svyt8sdr\\pyaudio_a8a346e98970466681cc9c80c30e69cd\\setup.py'"'"'; __file__='"'"'C:\\Users\\grave\\AppData\\Local\\Temp\\pip-install-svyt8sdr\\pyaudio_a8a346e98970466681cc9c80c30e69cd\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\grave\AppData\Local\Temp\pip-record-mu8_l4wl\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\pyaudio'
cwd: C:\Users\grave\AppData\Local\Temp\pip-install-svyt8sdr\pyaudio_a8a346e98970466681cc9c80c30e69cd\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\python39\include -Ic:\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\python39\include\pyconfig.h(117): warning C4005: 'MS_WIN64': redefini‡Æo de macro
src/_portaudiomodule.c: note: consulte a defini‡Æo anterior de 'MS_WIN64'
src/_portaudiomodule.c(29): fatal error C1083: NÆo ‚ poss¡vel abrir arquivo incluir: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\grave\\AppData\\Local\\Temp\\pip-install-svyt8sdr\\pyaudio_a8a346e98970466681cc9c80c30e69cd\\setup.py'"'"'; __file__='"'"'C:\\Users\\grave\\AppData\\Local\\Temp\\pip-install-svyt8sdr\\pyaudio_a8a346e98970466681cc9c80c30e69cd\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\grave\AppData\Local\Temp\pip-record-mu8_l4wl\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\pyaudio' Check the logs for full command output.
and when executing pip install PyAudio-0.2.11-cp39-cp39-win_amd64
receiving:
ERROR: Could not find a version that satisfies the requirement PyAudio-0.2.11-cp39-cp39-win_amd64
ERROR: No matching distribution found for PyAudio-0.2.11-cp39-cp39-win_amd64
I have installed here:
Python 3.9, speech_recognition, Google API Client Library for Python and pywin.
thank you very much, it worked.
– GRAVENA