How to develop a Python Speech recognition project like Jarvis on Mac OS X

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.

Finally I got https://pypi.python.org/pypi/SpeechRecognition/

(SpeechRecognition works only for the Linux distributions and Windows.)


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:


  1. Install Xcode in Unix Development mode
  2. Install Xcode - Command Line tools (Type 'xcode-select —install' in the terminal )
  3. Install Port or Brew (port  [or] Brew  )
  4. brew install portaudio --force [or] sudo port install portaudio (for loading mic drivers)
  5. sudo pip install PyAudio [or] sudo easy_install PyAudio (Mic Sources)
  6. sudo pip install SpeechRecognition [or] sudo easy_install SpeechRecognition
  7. sudo port install flac

Once you have finished with install, these are 
  1. mdfind flac | grep -i 'bin' - Copy the location of flac installed
  2. 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