Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- host a flac file on google cloud bucket then ref to it in cli command to recognize speech
- curl -v -X POST -H "Content-Type: application/json" -d '{"config": {"encoding": "FLAC", "languageCode": "en-GB", "sampleRate": 22050}, "audio": {"uri": "gs://com-borneo-speech-test-2/voic_smpl.flac"}}' "https://speech.googleapis.com/v1beta1/speech:syncrecognize?key=AIzapJNHs"
- Note: Unnecessary use of -X or --request, POST is already inferred.
- * Trying 216.58.195.74...
- * Connected to speech.googleapis.com (216.58.195.74) port 443 (#0)
- * found 173 certificates in /etc/ssl/certs/ca-certificates.crt
- * found 697 certificates in /etc/ssl/certs
- * ALPN, offering http/1.1
- * SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
- * server certificate verification OK
- * server certificate status verification SKIPPED
- * common name: *.googleapis.com (matched)
- * server certificate expiration date OK
- * server certificate activation date OK
- * certificate public key: RSA
- * certificate version: #3
- * subject: C=US,ST=California,L=Mountain View,O=Google Inc,CN=*.googleapis.com
- * start date: Thu, 29 Sep 2016 17:13:20 GMT
- * expire date: Thu, 22 Dec 2016 16:37:00 GMT
- * issuer: C=US,O=Google Inc,CN=Google Internet Authority G2
- * compression: NULL
- * ALPN, server accepted to use http/1.1
- > POST /v1beta1/speech:syncrecognize?key=ApJNHs HTTP/1.1
- > Host: speech.googleapis.com
- > User-Agent: curl/7.47.0
- > Accept: */*
- > Content-Type: application/json
- > Content-Length: 144
- >
- * upload completely sent off: 144 out of 144 bytes
- < HTTP/1.1 200 OK
- < Content-Type: application/json; charset=UTF-8
- < Vary: X-Origin
- < Vary: Referer
- < Date: Wed, 05 Oct 2016 23:58:05 GMT
- < Server: ESF
- < Cache-Control: private
- < X-XSS-Protection: 1; mode=block
- < X-Frame-Options: SAMEORIGIN
- < X-Content-Type-Options: nosniff
- < Alt-Svc: quic=":443"; ma=2592000; v="36,35,34,33,32"
- < Accept-Ranges: none
- < Vary: Origin,Accept-Encoding
- < Transfer-Encoding: chunked
- <
- {
- "results": [
- {
- "alternatives": [
- {
- "transcript": "my aunt Ruth just had her 94th birthday and a lot of her relatives and my cousins gathered for a birthday party",
- "confidence": 0.92681831
- }
- ]
- }
- ]
- }
Add Comment
Please, Sign In to add comment