我正在尝试使用REST全套服务将语音转换为文本。我正在使用.wav文件(PCM 16位Mono 16000 HZ)
URL:https://speech.googleapis.com/v1p1beta1/speech:recognize
JSON请求:
{
"config": {
"enableAutomaticPunctuation": "true",
"encoding": "LINEAR16",
"languageCode": "en-US",
"model": "default"
},
"audio": {
"content": "QzpcU3BlZWNoVG9UZXh0XGVuZ2xpc2hcUENNXEVORy1DUk0tRE9XTlRJTUUud2F2"
}
}
错误:
"error": {
"code": 400,
"message": "Invalid recognition 'config': bad sample rate hertz.",
"status": "INVALID_ARGUMENT"
}
请您帮忙解决此错误吗?
"config": {
...,
"sampleRateHertz": 16000
}