Google Cloud Speech API Request Request Error

I get this error when I access the Google Cloud Speech API: "error": {"code": 400, "message": "The request contains an invalid argument". "status": "INVALID_ARGUMENT

My curl command looks like this: curl -s -h "Content-Type: application / json" -H "Authorization: Bearer xxxxxxx" \ https://speech.googleapis.com/v1beta1/speech:syncrecognize -d @ synchronization request. json

and my configuration file as follows:

      {
  'config': {
      'encoding':'FLAC',
      'sampleRate': 16000,
      'languageCode': 'de-DE'
  },
  'audio': {
      'uri':'https://storage.googleapis.com/project_name/xxxx_Ger16.flac'
  }
}

What is missing or invalid in the request? Thank.

+4
source share
1 answer

, , JSON, . , audio.uri gs://bucket_name/object_name.

audio RecognitionAudio. .

+4

Source: https://habr.com/ru/post/1674227/


All Articles