使用 Azure Speech to Text API v3.0 发布 MP3 进行转录时的有效负载无效
InvalidPayload when posting MP3 for transcription when using Azure Speech to Text API v3.0
{
"contentUrls": [
"https://fsevideos.blob.core.windows.net/video-from-stream/Emails-From-Abroad-Min1.mp3?sv=2020-04-08&st=2021-05-28T11%3A40%3A20Z&se=2021-05-29T11%3A40%3A20Z&sr=b&sp=r&sig=EC7SJ7n3HsvHzqXd7BeiAlxC660WuhievIo0kWTy08E%3D"
],
"locale": "en-UK",
"displayName": "Test1"
}
回复是:
Transfer-Encoding: chunked
api-supported-versions: 2.0,3.0
api-deprecated-versions: 2.0
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
apim-request-id: 961dac3d-0ded-4954-b355-029a2f997c13
x-content-type-options: nosniff
Cache-Control: no-store
Date: Fri, 28 May 2021 14:56:58 GMT
Content-Type: application/json; charset=utf-8
{
"code": "InvalidRequest",
"message": "A valid value is required for transcription.dataset. OR The value of transcription.Locale is a custom culture identifier. Custom cultures are not supported. OR Only absolute URIs containing a valid scheme, authority and path are allowed for transcription.contentContainerUrl.",
"innerError": {
"code": "InvalidPayload",
"message": "A valid value is required for transcription.dataset. OR The value of transcription.Locale is a custom culture identifier. Custom cultures are not supported. OR Only absolute URIs containing a valid scheme, authority and path are allowed for transcription.contentContainerUrl."
}
}
据我所知,提供的URL是公开的,请问是什么原因导致的错误?
en-UK 不是有效的语言环境。它应该是 en-GB。您可以在此处找到支持的语言环境的完整列表:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#speech-to-text
{
"contentUrls": [
"https://fsevideos.blob.core.windows.net/video-from-stream/Emails-From-Abroad-Min1.mp3?sv=2020-04-08&st=2021-05-28T11%3A40%3A20Z&se=2021-05-29T11%3A40%3A20Z&sr=b&sp=r&sig=EC7SJ7n3HsvHzqXd7BeiAlxC660WuhievIo0kWTy08E%3D"
],
"locale": "en-UK",
"displayName": "Test1"
}
回复是:
Transfer-Encoding: chunked
api-supported-versions: 2.0,3.0
api-deprecated-versions: 2.0
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
apim-request-id: 961dac3d-0ded-4954-b355-029a2f997c13
x-content-type-options: nosniff
Cache-Control: no-store
Date: Fri, 28 May 2021 14:56:58 GMT
Content-Type: application/json; charset=utf-8
{
"code": "InvalidRequest",
"message": "A valid value is required for transcription.dataset. OR The value of transcription.Locale is a custom culture identifier. Custom cultures are not supported. OR Only absolute URIs containing a valid scheme, authority and path are allowed for transcription.contentContainerUrl.",
"innerError": {
"code": "InvalidPayload",
"message": "A valid value is required for transcription.dataset. OR The value of transcription.Locale is a custom culture identifier. Custom cultures are not supported. OR Only absolute URIs containing a valid scheme, authority and path are allowed for transcription.contentContainerUrl."
}
}
据我所知,提供的URL是公开的,请问是什么原因导致的错误?
en-UK 不是有效的语言环境。它应该是 en-GB。您可以在此处找到支持的语言环境的完整列表:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#speech-to-text