SHARE
TWEET

ibm watson speech-api sample call

rowntreerob Feb 6th, 2015 1,194 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. beacon$ curl -v -X POST  -k   "https://gateway.watsonplatform.net:8443/speech-to-text-beta/api/v1/recognize" \
  2. --header "Transfer-Encoding: chunked" \
  3. --header "Content-Type: audio/x-flac; rate=22050" \
  4. --data-binary @11.rec -o bluemix-speech -u e39e:Fl7Yo  
  5.  
  6. * About to connect() to gateway.watsonplatform.net port 8443 (#0)
  7. *   Trying 23.246.237.54...
  8.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  9.                                  Dload  Upload   Total   Spent    Left  Speed
  10.   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* connected
  11. * Connected to gateway.watsonplatform.net (23.246.237.54) port 8443 (#0)
  12. * successfully set certificate verify locations:
  13. *   CAfile: /etc/ssl/certs/ca-certificates.crt
  14.   CApath: none
  15. { [data not shown]
  16. * SSL connection using AES256-SHA
  17. * Server certificate:
  18. *        subject: C=US; ST=New York; L=Armonk; O=International Business Machines Corporation; CN=gateway.watsonplatform.net
  19. *        start date: 2014-09
  20. *        expire date: 2017-09
  21. *        subjectAltName: gateway.watsonplatform.net matched
  22. *        issuer: C=US; O
  23. *        SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
  24. * Server auth using Basic with user 'f38e'
  25. > POST /speech-to-text-beta/api/v1/recognize HTTP/1.1
  26. > Authorization: Basic ZTM5ZTA2ZTItZDM4Ny00MTBlLWE3MTctZDNiM2ZiM2VmMzhlOkJuam5wNGlGbDdZbw==
  27. > User-Agent: curl/7.28.1-DEV
  28. > Host: gateway.watsonplatform.net:8443
  29. > Accept: */*
  30. > Transfer-Encoding: chunked
  31. > Content-Type: audio/x-flac; rate=22050
  32. > Expect: 100-continue
  33. >
  34. < HTTP/1.1 100 Continue
  35. < X-Note: Gateway Ack
  36. } [data not shown]
  37. 100  362k    0     0  100  362k      0  50458  0:00:07  0:00:07 --:--:-- 34030< HTTP/1.1 200 OK
  38. < X-Backside-Transport: OK OK
  39. < Connection: Keep-Alive
  40. < Transfer-Encoding: chunked
  41. < Server: Apache-Coyote/1.1
  42. < Date: Fri, 06 Feb 2015 23:10:54 GMT
  43. < Content-Disposition: inline; filename="result.json"
  44. < X-Zuul: zuul
  45. < X-Zuul-instance: unknown
  46. < X-Zuul-Filter-Executions: Routing[SUCCESS][0ms], ParseHostFilter[SUCCESS][0ms], PreDecoration[SUCCESS][0ms], ZuulNFRequest[SUCCESS][7896ms]
  47. < X-Originating-URL: https://gateway.watsonplatform.net:8443/speech-to-text-beta/api/v1/recognize
  48. < Content-Type: application/json
  49. < X-Client-IP: 108.192.16.200
  50. < X-Global-Transaction-ID: 194934241
  51. <
  52. 100  362k    0     0  100  362k      0  44956  0:00:08  0:00:08 --:--:-- 13779{ [data not shown]
  53. 100  362k    0   324  100  362k     39  44945  0:00:08  0:00:08 --:--:--     0
  54. * Connection #0 to host gateway.watsonplatform.net left intact
  55. * Closing connection #0
  56.  
  57. ===RESPONSE===
  58.  
  59. {
  60.    "results": [
  61.       {
  62.          "alternatives": [
  63.             {
  64.                "transcript": "harley how are you we have to go down to the store and see if we can get the groceries for this week so we can bring them back in the car "
  65.             }
  66.          ],
  67.          "final": true
  68.       }
  69.    ],
  70.    "result_index": 0
  71. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top