Can somebody fix this code? I have tried to add PyAudio, but nothing seems to work. I would greatly appreciate it if someone would fix this for me.
Traceback (most recent call last):
File "main.py", line 2, in <module>
ModuleNotFoundError: No module named 'pyaudio'
Did you use
pip install pyaudio in the terminal?
I have tried, but whenever I do that it will suddenly stop. The text will turn red and it will give me a list of complex errors that I do not understand.
~/Speech-Recognition-Tests$ pip install pyaudio
Looking in indexes: https://package-proxy.replit.com/pypi/simple/
Using cached https://package-proxy.replit.com/pypi/packages/91/a0/f439da954d78a987298cb8d1ca1b141c53b1d1d1c7a50e17198ed061b9ac/PyAudio-0.2.13.tar.gz (46 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /home/runner/Speech-Recognition-Tests/venv/bin/python3 /home/runner/Speech-Recognition-Tests/venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpm_v_pr_r
Complete output (18 lines):
copying src/pyaudio/__init__.py -> build/lib.linux-x86_64-cpython-310/pyaudio
building 'pyaudio._portaudio' extension
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/nix/store/xf0ssp8s6xjz710q33hspj5dphqhmmc1-libxcrypt-4.4.30/include -fPIC -I/usr/local/include -I/usr/include -I/home/runner/Speech-Recognition-Tests/venv/include -I/nix/store/hd4cc9rh83j291r5539hkf6qd8lgiikb-python3-3.10.8/include/python3.10 -c src/pyaudio/device_api.c -o build/temp.linux-x86_64-cpython-310/src/pyaudio/device_api.o
src/pyaudio/device_api.c:9:10: fatal error: portaudio.h: No such file or directory
9 | #include "portaudio.h"
error: command '/nix/store/dq0xwmsk1g0i2ayg6pb7y87na2knzylh-gcc-wrapper-11.3.0/bin/gcc' failed with exit code 1
ERROR: Failed building wheel for pyaudio
Failed to build pyaudio
ERROR: Could not build wheels for pyaudio which use PEP 517 and cannot be installed directly
When I try to pip install pyaudio, I get this:
replit doesn’t support audio in console repls so all of those packages throw errors
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.