OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

ModuleNotFoundError while running speech_recognition

  • Thread starter Thread starter user25676848
  • Start date Start date
U

user25676848

Guest
Below is problem that I am facing. I am relatively new to python and I am working on an AI project that speaks and takes audio. I am using library pyttsx3 and Speech_recognition. Here I have installed Speech_recognition library it installed perfectly and while writting code and running this problem show ups. What should I do? The library pyttsx3 is running perfectly. But I am facing problem with Second one. This is the problem:

Code:
  Traceback (most recent call last):
  File "e:\Projects\Finer Project\main.py", line 48, in <module>
    takecommand()

  File "e:\Projects\Finer Project\main.py", line 28, in takecommand
    with sr.Microphone() as source:
         ^^^^^^^^^^^^^^^
  
  File "E:\pt\Lib\site-packages\speech_recognition\__init__.py", line 80, in __init__
    self.pyaudio_module = self.get_pyaudio()
                          ^^^^^^^^^^^^^^^^^^
  
  File "E:\pt\Lib\site-packages\speech_recognition\__init__.py", line 111, in get_pyaudio
    from distutils.version import LooseVersion


ModuleNotFoundError: No module named 'distutils'
  1. I was expecting that it should take what I say and respond according to that call. I have installed pyttsx3 for audio it's running perfectly. But my speechrecognition library is not able to recognize voices what should i do?
<p>Below is problem that I am facing. I am relatively new to python and I am working on an AI project that speaks and takes audio. I am using library pyttsx3 and Speech_recognition. Here I have installed Speech_recognition library it installed perfectly and while writting code and running this problem show ups. What should I do? The library pyttsx3 is running perfectly. But I am facing problem with Second one. This is the problem:</p>
<pre><code> Traceback (most recent call last):
File "e:\Projects\Finer Project\main.py", line 48, in <module>
takecommand()

File "e:\Projects\Finer Project\main.py", line 28, in takecommand
with sr.Microphone() as source:
^^^^^^^^^^^^^^^

File "E:\pt\Lib\site-packages\speech_recognition\__init__.py", line 80, in __init__
self.pyaudio_module = self.get_pyaudio()
^^^^^^^^^^^^^^^^^^

File "E:\pt\Lib\site-packages\speech_recognition\__init__.py", line 111, in get_pyaudio
from distutils.version import LooseVersion


ModuleNotFoundError: No module named 'distutils'
</code></pre>
<ol>
<li>I was expecting that it should take what I say and respond according to that call. I have installed pyttsx3 for audio it's running perfectly. But my speechrecognition library is not able to recognize voices what should i do?</li>
</ol>
 
Top