I’m trying to do a virtual assistant AI like Iron Man’s Jarvis with a voice on Python with VS Code and couldn’t solve this for almost in the last month.
It keeps giving me the same errors even though that I changed the editor.
Faruk-MacBook-Air:~ Jason$ /usr/local/bin/python3 "/Users/Faruk/Desktop/ü/VS Code/Jarvis AI/Jarvis AI.py"
Traceback (most recent call last):
File "/Users/Faruk/Desktop/ü/VS Code/Jarvis AI/Jarvis AI.py", line 50, in <module>
get_audio()
File "/Users/Faruk/Desktop/ü/VS Code/Jarvis AI/Jarvis AI.py", line 21, in get_audio
with sr.Microphone() as source:
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/speech_recognition/__init__.py", line 80, in __init__
self.pyaudio_module = self.get_pyaudio()
^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/speech_recognition/__init__.py", line 111, in get_pyaudio
from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'
These are the errors I’m keep getting all the time. I imported everything. PyAudio, Playsound, openai, google gTTS, SpeechRecognition.
I also tried in PyCharm. Same errors in there too.
How can I solve this.? If you have already done that before. I’ve been trying to solve for the last month.
Muhammet Faruk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.