-1

I was trying to implement the speech to text so that it will help in my next project.

So could you please help me with speech recognition?

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\speech_recognition\__init__.py", line 108, in get_pyaudio
    import pyaudio
ModuleNotFoundError: No module named 'pyaudio'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\user\Desktop\PYTHON\Assisstent\speech.py", line 27, in <module>
    takecommand()
  File "c:\Users\user\Desktop\PYTHON\Assisstent\speech.py", line 9, in takecommand
    with sr.Microphone() as source:
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\speech_recognition\__init__.py", line 79, in __init__       
    self.pyaudio_module = self.get_pyaudio()
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\speech_recognition\__init__.py", line 110, in get_pyaudio   
    raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
PS C:\Users\user\Desktop\PYTHON\Assisstent>

1 Answers1

0

install pyaudio:

pip install pyaudio
Sadra
  • 2,480
  • 2
  • 20
  • 32