Speech recognition: Difference between revisions
Line 31: | Line 31: | ||
=== A solution: === | === A solution: === | ||
Install Ubuntu in Windows and follow the instructions of the | Install Ubuntu in Windows and follow the instructions of the Ubuntu version<br /> | ||
https://tutorials.ubuntu.com/tutorial/tutorial-ubuntu-on-windows#0 | https://tutorials.ubuntu.com/tutorial/tutorial-ubuntu-on-windows#0 | ||
* Open the start page and search for CMD (Command Prompt). Open it and type ''bash''. Now you are in the Ubuntu environment. | |||
* Install git: ''sudo apt install git'' | |||
* Install python3: | |||
*:''sudo apt-get update''<br /> | |||
*:''sudo apt-get install python3.6'' | |||
* Install the dependencies: | |||
*:''sudo apt-get install pocketsphinx pocketsphinx-en-us''<br /> | |||
=== B solution: === | === B solution: === |
Revision as of 11:03, 6 July 2018
Ubuntu/ Mac
Requirements: Python 3.3+
https://pypi.python.org/pypi/SpeechRecognition
- SpeechRecognition 3.8.1
- pip install SpeechRecognition
- To quickly try it out, run python -m speech_recognition after installing.
- PyAudio (for microphone users):
- Install PyAudio using APT: execute sudo apt-get install python-pyaudio python3-pyaudio in a terminal.
- Pocketsphinx:
- One way:
- install dependencies: sudo apt-get install gcc automake autoconf libtool bison swig python-dev libpulse-dev
- Follow the instructions: https://bangladroid.wordpress.com/2017/02/16/installing-cmu-sphinx-on-ubuntu/
- Another way (not sure if it is different or supplementary):
- pip3 install pocketsphinx
- Test+Errors:
- Try this: pocketsphinx_continuous
- If you find this error error while loading shared libraries: libpocketsphinx.so.3: cannot open shared object file: No such file or directory do this sudo nano /etc/ld.so.conf and add
- include usr/local/lib
- include usr/
- Install other languages
- One way:
- Pocketsphinx Python:
- pip install --upgrade pip setuptools wheel
- pip install --upgrade pocketsphinx
- Examples:
- Transcribe an audio file: run python3 audio_transcribe.py
- Save audio data to an audio file: run python3 write_audio.py
Windows
A solution:
Install Ubuntu in Windows and follow the instructions of the Ubuntu version
https://tutorials.ubuntu.com/tutorial/tutorial-ubuntu-on-windows#0
- Open the start page and search for CMD (Command Prompt). Open it and type bash. Now you are in the Ubuntu environment.
- Install git: sudo apt install git
- Install python3:
- sudo apt-get update
- sudo apt-get install python3.6
- sudo apt-get update
- Install the dependencies:
- sudo apt-get install pocketsphinx pocketsphinx-en-us
- sudo apt-get install pocketsphinx pocketsphinx-en-us
B solution:
- Install python3: https://tutorial.djangogirls.org/en/installation/
- Install git: https://git-scm.com/download/win
- Install pocketsphinx: https://cmusphinx.github.io/wiki/tutorialpocketsphinx/#windows OR
- Install Windows SDC
- Install Visual C++ 2015 Tools for Windows Desktop
Mac
(haven't tried it) https://github.com/watsonbox/homebrew-cmu-sphinx