I need to fix this python code to my project

There is the code:


Here the error:

Traceback (most recent call last): File "source_file.py", line 1, in import speech_recognition as sr ImportError: No module named speech_recognition

Someone can help me?

  • $\begingroup$ Hi and welcome to this community! Can you please ask this question on Data Science SE (or Stack Overflow), and then delete this question from this website, because it is off-topic here. $\endgroup$ – nbro May 7 '19 at 23:36

Looks like you didn't install the required library - go to your console, type pip install SpeechRecognition then try again. Library documentation here, and don't forget to add SpeechRecognition to the requirements.txt for your project, to avoid future repetitions.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.