Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Note the result , technically is illegal json payload because there are 2 message payloads just concatenated ( no ArrayObject wrapper to enclose them according to the RULE for a json response ).
- Therefor , apache handlers for CHUNKED encoded response entities will return ILLEGAL JSON with 2 roots. The first root is just the empty "result" message.
- POST should include attr values of the audio clip you are sending...
- POST -H "Content-Type: audio/x-flac; rate=16000" \ -T seg_1.flac
- Actual post on curl below:
- > POST /speech-api/v2/recognize?output=json&lang=en-us&key=....NXig HTTP/1.1
- > User-Agent: curl/7.28.1-DEV
- > Host: www.google.com
- > Accept: */*
- > Content-Type: audio/x-flac; rate=16000;
- > Content-Length: 192561
- > Expect: 100-continue
- >
- * Done waiting for 100-continue
- * We are completely uploaded and fine
- < HTTP/1.1 200 OK
- < Content-Type: application/json; charset=utf-8
- < Content-Disposition: attachment
- < Cache-Control: no-transform
- < X-Content-Type-Options: nosniff
- < Pragma: no-cache
- < Date: Tue, 25 Feb 2014 20:04:30 GMT
- < Server: S3 v1.0
- < X-XSS-Protection: 1; mode=block
- < X-Frame-Options: SAMEORIGIN
- < Alternate-Protocol: 443:quic
- < Transfer-Encoding: chunked
- <
- {"result":[]}
- {"result":[{"alternative":[{"transcript":"now it was the favorite pastime the woman of course never play with strictly a man's game"},{"transcript":"now it was the favorite pastime the woman of course never play with strictly a mans game"},{"transcript":"now it was the favorite pastime the woman of course never played with strictly a man's game"},{"transcript":"now it was the favorite pastime the woman of course never played with strictly a mans game"},{"transcript":"now it was the favorite pastime the woman of course never played it was strictly a man's game"}],"final":true}],"result_index":0}
- * Connection #0 to host www.google.com left intact
- * Closing connection #0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement