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, 2019 in Python by Hannah
• 18,040 points
248 views
I have done this way but it failed .

1 answer to this question.

0 votes

Hi @Hannah, replace 

import SpeechRecognition as sr

with

import speech_recognition as sr
answered Oct 3, 2019 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, 2019 in Python by Greg
1,361 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, 2019 in Python by Layla
4,427 views
0 votes
1 answer

how to solve the error : "ImportError: No module named Tkinter" in python.

Hi@Umama, If you are using Linux system, then ...READ MORE

answered Apr 27 in Python by MD
• 24,660 points
470 views
0 votes
1 answer

Python error “ImportError: No module named”

Hii, Based on your description, I guess this ...READ MORE

answered 2 days ago in Python by Niroj
• 23,950 points
20 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, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 963 views
0 votes
0 answers
+4 votes
6 answers
0 votes
1 answer
0 votes
2 answers

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

sudo apt-get install python3-tk Then, >> import tkinter # ...READ MORE

answered Nov 9, 2019 in Python by Icetutor
• 160 points
5,810 views