Google Cloud Speech API: Qwik Start(日本語)
- cloud shell を使ってみる
- API キーを作成
- 音声を確認
- https://storage.cloud.google.com/speech-demo/brooklyn.wav
- ow old is the brooklyn bridge ですかね・
- API リクエストを作成する
{ "config": { "encoding":"FLAC", "language_code": "en-US" }, "audio": { "uri":"gs://cloud-samples-tests/speech/brooklyn.flac" } }
- POST
curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json "https://speech.googleapis.com/v1/speech:recognize?key=${API_KEY}"`
- レスポンス確認
{ "results": [ { "alternatives": [ { "transcript": "how old is the Brooklyn Bridge", "confidence": 0.9835046 } ] } ] }