xPain
Posts: 4
Joined: Mon Nov 19, 2018 7:16 am

Install SpeechRecognition in Raspberry

Thu Nov 22, 2018 7:06 am

I installed the SpeechRecognition as instructed at https://github.com/Uberi/speech_recognition

'pip install SpeechRecognition'

Currently I use python 3.5 on my Raspberry Pi 3. The installation has no errors. The next part of the tutorial says that: "To quickly try it out, run 'python -m speech_recognition' after installing." But it seems that the library was not found.

Code: Select all

(env) pi@raspberrypi:~/Desktop/new-project-2 $ pip install SpeechRecognition
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: SpeechRecognition in /home/pi/env/lib/python3.5/site-packages (3.8.1)
(env) pi@raspberrypi:~/Desktop/new-project-2 $ python -m speech_recognition
/usr/bin/python3.5: No module named speech_recognition

It looks like the system is looking for a library somewhere else or I have misplaced the library. Can anyone help me?

ghp
Posts: 1517
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Install SpeechRecognition in Raspberry

Thu Nov 22, 2018 1:47 pm

Hello,
looks as if you hit the problem:
python uses pip (python 2)
python3 uses pip3 (python3).

Whatever is installed with pip is not available in python3.

Try to install the software with 'sudo pip3 install SpeechRecognition'.

Good luck !

Return to “Python”