0

new to the site.
I've installed pygsr (which is a way of using Google's voice api in python) and well.. it went kinda wrong. this is the code I used

from pygsr import Pygsr
speech = Pygsr()
speech.record(3) # duration in seconds (3)
phrase, complete_response = speech.speech_to_text('en_EN') # select the language
print phrase

and thats the error

Traceback (most recent call last):
File "C:/Python27/Voice testing.py", line 4, in <module>
phrase, complete_response = speech.speech_to_text('en_EN') # select the language
File "build\bdist.win32\egg\pygsr\__init__.py", line 49, in speech_to_text
audio = open(file_upload, "rb").read()
IOError: [Errno 2] No such file or directory: 'audio.flac'

I've installed both sox and pyaudio, using python 2.7 can anyone figure out what's wrong? or recommend another python module which gives access to the google api for speech recognition.

Thanks!

  • @Parfait Looks the same, but as you can see I've installed sox ([Sox installed picture](http://prnt.sc/crbvq5)) but its still isnt working.. thats why I've opened a new question :). btw I think it doesnt recognize sox, when I try to import it, it gives me a wierd error that I do not have sox installed, eventhough I've just installed it.. – Nitzan Shwartz Oct 08 '16 at 13:50
  • you installed wrong sox, it's not a python package but a separate software. You have to install it with installer https://sourceforge.net/projects/sox/files/sox/14.4.2/sox-14.4.2-win32.exe – Nikolay Shmyrev Oct 08 '16 at 20:47
  • @NikolayShmyrev Oh, I understand.. Thank you, that worked! – Nitzan Shwartz Oct 09 '16 at 05:39

0 Answers0