tjtjtjのメモ

自分のためのメモです

Google Cloud Speech API: Qwik Start(日本語)

{
  "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
        }
      ]
    }
  ]
}