Speech recognition: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 18: Line 18:
## Test+Errors:
## Test+Errors:
##*Try this: <small>pocketsphinx_continuous</small>
##*Try this: <small>pocketsphinx_continuous</small>
##*If you find this error <pre style="color: red">error while loading shared libraries: libpocketsphinx.so.3: cannot open shared object file: No such file or directory</pre> do this <small>sudo nano /etc/ld.so.conf</small> and add  
##*If you find this error <span style="color: red">error while loading shared libraries: libpocketsphinx.so.3: cannot open shared object file: No such file or directory</span> do this <small>sudo nano /etc/ld.so.conf</small> and add  
:::<small>include usr/local/lib</small>
:::<small>include usr/local/lib</small>
:::<small>include usr/</small>
:::<small>include usr/</small>
# Transcribe an audio file: execute <small>python3 [https://github.com/Uberi/speech_recognition/blob/master/examples/audio_transcribe.py audio_transcribe.py]</small>
# Transcribe an audio file: execute <small>python3 [https://github.com/Uberi/speech_recognition/blob/master/examples/audio_transcribe.py audio_transcribe.py]</small>

Revision as of 18:23, 21 March 2018

/////under construction/////

For Ubuntu:

Requirements: Python2.6, 2.7, or 3.3+
https://pypi.python.org/pypi/SpeechRecognition

  1. Install SpeechRecognition 3.8.1
    • pip install SpeechRecognition
    • To quickly try it out, run python -m speech_recognition after installing.
  2. PyAudio (for microphone users):
    • Install PyAudio using APT: execute sudo apt-get install python-pyaudio python3-pyaudio in a terminal.
  3. Install pocketsphinx:
    1. One way:
    2. Another way (not sure if it is different or supplementary):
      • pip3 install pocketsphinx
    3. 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/
  1. Transcribe an audio file: execute python3 audio_transcribe.py