I'm attempting to get speech recognition for searching working for a project I'm working on. At the minute, I'm only focussing on getting the speech recognition working and I'm using pygsr to do this. I found a post about pygsr on here earlier but I'm currently struggling to get it to work. This is the code that I'm using:
from pygsr import Pygsr
speech = Pygsr()
speech.record(3)
phrase, complete_response =speech.speech_to_text('en_US')
print phrase
After spending a while installing the library with OS X, I finally got it to actually sort of work. It detected the library and worked seemingly but then I would get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 4, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pygsr/__init__.py", line 33, in record
data = stream.read(self.chunk)
File "/Library/Python/2.7/site-packages/pyaudio.py", line 605, in read
return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981
I have no idea if this is due to something I'm doing wrong or if I can't use pygsr on OS X. If there is no way for this to work, does anyone have any recommendations for a speech recognition library for OS X that uses Python 2.7?