Sunday, November 17, 2024
Google search engine
HomeLanguagesIntroduction and Installation of Uberi/Speechrecognition in Python

Introduction and Installation of Uberi/Speechrecognition in Python

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. Installation Use this command in cmd or terminal make sure Python is installed and Python path is also stored in pc.

pip install speechrecognition

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

python setup.py install

Prerequisites

  • 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
virtualenv 
\Scripts\activate
\Scripts\pip.exe install google-api-python-client
  • in CMD. 2) Debian Linux: Execute
pip install virtualenv
virtualenv 
\Scripts\activate
\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 https://github.com/cmusphinx/pocketsphinx-python

  • 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 setup.py install
  • 2) Linux: Run for Python 2,
pip install pocketsphinx 
  • for Python 3.
pip3 install pocketsphinx

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments