valvale97
Posts: 51
Joined: Sat Feb 09, 2013 11:13 pm

Google API Speech -> Text

Sat Mar 09, 2013 9:48 pm

Hi, i'm trying to use this code to recognize my voice with raspberry py.
https://github.com/pranavrc/audio-transcribe
when i run:

Code: Select all

python speech.py test.wav
it gives me this error:

Code: Select all

 
Failed to get binary data.
Traceback (most recent call last):
  File "speech.py", line 26, in <module>
    size_of_audio = os.path.getsize(fileName)
  File "/usr/lib/python2.7/genericpath.py", line 49, in getsize
    return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: 'test.flac'
Any about how to resolve this problem ?

ajbarnes
Posts: 26
Joined: Tue Sep 11, 2012 9:24 pm

Re: Google API Speech -> Text

Sun Mar 10, 2013 7:46 pm

Having not run this, the error indicates the a .flac file does not exist. In the speech.py script pacpl is being called to convert your .wav to .flac on line 16.

This is probably failing, probably pacpl is not on your Pi, so you may need to ensure its package has been obtained.

AJ

Return to “Python”