-2

I am trying to develop a Speech to Text Application. As a test I ran the following with these results:

wget -U "Mozilla/5.0" --post-file /home/pi/good-morning-google.flac --header "Content-Type: audio/x-flac; rate=44100" -O - "https://www.google.com/speech-api/v2/recognize?lang=en-us&key=mykey" > stt.txt

--2016-05-22 23:38:29-- https://www.google.com/speech-api/v2/recognize?lang=en-us&key=mykey Resolving www.google.com (www.google.com)... 216.58.219.164, 2607:f8b0:4002:c03::69

Connecting to www.google.com (www.google.com)|216.58.219.164|:443... connected. HTTP request sent, awaiting response... 200 OK

Length: unspecified [application/json]

Saving to: ‘STDOUT’

  • [ <=> ] 14 --.-KB/s in 0s

2016-05-22 23:38:31 (529 KB/s) - written to stdout [14]

Stt.txt {"result":[]}

anyone know why results were null?

Hankp
  • 47
  • 5

1 Answers1

0

In my opinion, it is a file format issue.

You have to send WAV file instead of FLAC ...

[ FLAC and MP3 format are not supported <=> need a file conversion (representing cost) on the server side ]

You may take a look here (to see a working example)

Community
  • 1
  • 1
A. STEFANI
  • 6,707
  • 1
  • 23
  • 48