Created
October 21, 2012 20:06
-
-
Save gabonator/3928324 to your computer and use it in GitHub Desktop.
Google speech api with non-english language
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 OK | |
Content-Type: application/json; charset=utf-8 | |
Content-Disposition: attachment | |
Date: Sun, 21 Oct 2012 20:03:54 GMT | |
Expires: Sun, 21 Oct 2012 20:03:54 GMT | |
Cache-Control: private, max-age=0 | |
X-Content-Type-Options: nosniff | |
X-Frame-Options: SAMEORIGIN | |
X-XSS-Protection: 1; mode=block | |
Server: GSE | |
Transfer-Encoding: chunked | |
{"status":0,"id":"4cf5d146f677f4a95f7bb3370983fe32-1","hypotheses":[{"utterance":"ahoj ako sa máš","confidence":0.90439355},{"utterance":"ahoj ako sa maš"},{"utterance":"ahoj ako sa mas"},{"utterance":"ahoj ako samas"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set path=%path%;C:\Programs\Video\ffmpeg\bin\;C:\Data\Work\speech\curl2\ | |
rem Convert wave to flac | |
ffmpeg -i ahoj.wav -acodec flac ahoj.flac | |
rem Make POST request with attachment, sk-SK for Slovak language, en-EN for english | |
curl -o ahoj.txt -k -i -X POST -H "Content-Type:audio/x-flac; rate=44100" -T ahoj.flac "https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=sk-SK&maxresults=10&pfilter=0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment