Hi Folks,
I have been been searching for the Python Speech recognition package especially for Mac OS.
I am not happy with the search results.
But I made it working for the Mac OS X by using flac.
Following are the instructions to make it run and modified code,
Prerequisite:
- Install Xcode in Unix Development mode
- Install Xcode - Command Line tools (Type 'xcode-select —install' in the terminal )
- Install Port or Brew (port [or] Brew )
- brew install portaudio --force [or] sudo port install portaudio (for loading mic drivers)
- sudo pip install PyAudio [or] sudo easy_install PyAudio (Mic Sources)
- sudo pip install SpeechRecognition [or] sudo easy_install SpeechRecognition
-
sudo port install flac
Once you have finished with install, these are
mdfind flac | grep -i 'bin' - Copy the location of flac installed
sudo ln -s /opt/local/bin/flac /Library/Python/2.7/site-packages/speech_recognition/flac-mac - Create soft link to access the flac binary
Following code is the modified version of __init__.py made for Mac OS X.
Make a backup of the previous code.
Comments
Post a Comment