0
$\begingroup$

I need to fix this python code to my project

There is the code:

https://www.alexkras.com/transcribing-audio-file-to-text-with-google-cloud-speech-api-and-python/

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?

$\endgroup$
  • $\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
1
$\begingroup$

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 | |
$\endgroup$

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