Python error "ImportError: No module named SpeechRecognition"

0 votes

I have the following python code on pycharm:

import SpeechRecognition as sr

r = sr.Recognizer()

with sr.Microphone() as source:
    audio = sr.listen(source)

I get an error saying the module is not installed:

    import SpeechRecognition as sr
ImportError: No module named SpeechRecognition

But when I list all the packages and modules installed, it says I have the package installed:\

SpeechRecognition             3.8.1
Oct 3 in Python by Hannah
• 14,960 points
7 views

1 answer to this question.

0 votes

Hi @Hannah, replace 

import SpeechRecognition as sr

with

import speech_recognition as sr
answered Oct 3 by Yamini

Related Questions In Python

0 votes
1 answer

Python error "ImportError: No module named pygame.locals"

You need to download and install the ...READ MORE

answered Jun 18 in Python by Greg
169 views
0 votes
1 answer

Python error " import requests ImportError: No module named requests"

Hi @Vasgi, for the code you're trying ...READ MORE

answered Aug 5 in Python by Layla
197 views
+3 votes
1 answer

Tensorflow 1.5 ImportError: No module named tensorflow.python.client

I think it's a bug in Tensorflow ...READ MORE

answered Sep 25, 2018 in Python by charlie_brown
• 7,720 points
2,699 views
0 votes
1 answer

tensorflow 1.5 ImportError: No module named tensorflow.python.client

Some of the modules have changed in ...READ MORE

answered Oct 5, 2018 in Python by Priyaj
• 56,580 points
568 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 272 views
+4 votes
6 answers
0 votes
1 answer
0 votes
1 answer

Python error "ImportError: No module named 'tkinter'"

Try installing it from the terminal with ...READ MORE

answered Aug 9 in Python by Trisha
213 views