0

Getting ImportError: No module named speech_recognition, Code Snippet:

# for speech-to-text
import speech_recognition as sr

# for text-to-speech
from gtts import gTTS

# for language model
import transformers

import os
import time

# for data
import os
import datetime
import numpy as np

I have already tried pip3 install SpeechRecognition and pip install SpeechRecognition

pip3 install SpeechRecognition
Requirement already satisfied: SpeechRecognition in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (3.8.1)
WARNING: You are using pip version 21.3.1; however, version 22.1.2 is available.
You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.

I am using Python 3.8

molbdnilo
  • 64,751
  • 3
  • 43
  • 82
  • Does this answer your question? [ImportError: No module named 'speech\_recognition' in python IDLE](https://stackoverflow.com/questions/41797920/importerror-no-module-named-speech-recognition-in-python-idle) – Sayan Jul 25 '22 at 05:21
  • I have tried the solutions of the mentioned link(https://stackoverflow.com/questions/41797920/importerror-no-module-named-speech-recognition-in-python-idle), but it didn't work – Kshitij Sinha Jul 25 '22 at 06:02
  • Maybe you can try to create a new conda [environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands), install the only needed packages and try again. The reason that I'm saying this is because the issue feels like it's about confusion of some packages. Conda can help with a fresh start. – Sezai Burak Kantarcı Jul 25 '22 at 06:20
  • Are you running your program using the `python3` executable right? – Giuppox Jul 25 '22 at 07:16

0 Answers0