Skip to content
Related Articles

Related Articles

Introduction and Installation of Uberi/Speechrecognition in Python

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 05 Jan, 2022

One of the best library for speech recognition in Python and uses various engines and API to perform speech recognition online as well as offline. 

Use this command in cmd or terminal make sure Python is installed and Python path is also stored in pc.  

pip install speechrecognition

Download resources from PyPI and extract it in a folder and then run following command in cmd or terminal. 

python install


  • Python 
    Make sure python is installed and path of Python is stored in system too. 
  • 2. PyAudio 
    PyAudio is need only when the input is from microphone. Make sure PyAudio version is PyAudio version 0.2.11 or above. If not installed, everything in the library will still work, except attempting to instantiate a Microphone object will raise an AttributeError. 

    Installation : 
    1) Windows: Execute the below command in the cmd. 

pip install pyaudio
  • 2) Debian Linux: Execute the below command in the terminal. 
sudo apt-get install python-pyaudio python3-pyaudio
  • Google API Client Library for Python 
    Google API Client library is only needed when one want to use Google Cloud speech api. 
    Installation : 
    1) Windows: Execute 
pip install virtualenv
\Scripts\pip.exe install google-api-python-client
  • in CMD. 
    2) Debian Linux: Execute 
pip install virtualenv
\Scripts\pip.exe install google-api-python-client
  • in a terminal 
  • Flac Encoder 
    A FLAC encoder is required to encode the audio data to send to the API. If using Windows (x86 or x86-64), OS X (Intel Macs only, OS X 10.6 or higher), or Linux (x86 or x86-64), this is already bundled with this library – you do not need to install anything. 
  • PocketSphinx 
    PocketSphinx-Python is required if and only if you want to use the Sphinx recognizer 
    Installation : 
    1) Windows: Download the full PocketSphinx-Python source code by running 

git clone –recursive –depth 1

  • Note: Downloading the ZIP archive from GitHub will not work. 
    Run the below command in the PocketSphinx-Python source code folder to compile and install PocketSphinx. 
python install
  • 2) Linux: Run 
    for Python 2, 
pip install pocketsphinx 
  • for Python 3. 
pip3 install pocketsphinx

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!