I am trying to convert speech to text using the REST full service. I am using .wav file (PCM 16 bit Mono 16000 HZ)
URL: https://speech.googleapis.com/v1p1beta1/speech:recognize
JSON request:
{
"config": {
"enableAutomaticPunctuation": "true",
"encoding": "LINEAR16",
"languageCode": "en-US",
"model": "default"
},
"audio": {
"content": "QzpcU3BlZWNoVG9UZXh0XGVuZ2xpc2hcUENNXEVORy1DUk0tRE9XTlRJTUUud2F2"
}
}
Error:
"error": {
"code": 400,
"message": "Invalid recognition 'config': bad sample rate hertz.",
"status": "INVALID_ARGUMENT"
}
Could you please help to resolve this error?