Azure认知服务-批处理转录API响应并显示错误消息“录制URI无效”。

时间:2019-05-27 16:57:43

标签: azure azure-cognitive-services azure-speech

已执行的步骤:

  1. 我在美国西部创建了语音服务实例。
  2. 我有正确的标题(Content-Type and Ocp-Apim-Subscription-Key)
  3. 我使用以下请求有效负载向https://westus.cris.ai/api/speechtotext/v2.0/transcriptions/发出了POST请求
{
  "recordingsUrl": "https://transcribehm97c1.blob.core.windows.net/audio-files/2019-04-04_Blockchain%20explained%20with%20TruStory%27s%20Preethi%20Kasireddy.mp3?st=2019-05-27T12%3A19%3A27Z&se=2019-12-31T12%3A19%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=HFBvGl1pmCM95MNU9U3yniMNXrUMT6RmPb36F32cxrY%3D",
  "models": [],
  "locale": "en-US",
  "name": "I dont know why this is not working",
  "description": "Someone please send help",
  "properties": {
    "ProfanityFilterMode": "Masked",
    "PunctuationMode": "DictatedAndAutomatic"
  }
}
  1. 我收到带有以下标题的“ 202 Accepted”响应。这确认请求正文是有效的。
location: https://westus.cris.ai/api/speechtotext/v2.0/transcriptions/69b7abf4-6383-4490-88a9-9fd42a77e470
  1. 当我向上述位置发出GET请求时,会看到此
{
  "recordingsUrl": "https://transcribehm97c1.blob.core.windows.net/audio-files/2019-04-04_Blockchain explained with TruStory's Preethi Kasireddy.mp3?st=2019-05-27T12:19:27Z&se=2019-12-31T12:19:00Z&sp=rl&sv=2018-03-28&sr=b&sig=HFBvGl1pmCM95MNU9U3yniMNXrUMT6RmPb36F32cxrY%3D",
  "resultsUrls": {},
  "models": [“I have removed this for brevity”],
  "statusMessage": "The recordings URI is invalid.",
  "id": "69b7abf4-6383-4490-88a9-9fd42a77e470",
  "createdDateTime": "2019-05-27T12:43:39Z",
  "lastActionDateTime": "2019-05-27T12:43:50Z",
  "status": "Failed",
  "locale": "en-US",
  "name": "I dont know why this is not working",
  "description": "Someone please send help",
  "properties": {
    "ProfanityFilterMode": "Masked",
    "PunctuationMode": "DictatedAndAutomatic"
  }
}
  1. 对于某些URL,转录失败,而对于同一存储中的Blob,对于其他URL,转录则失败,尽管它们都是有效的URL。 请求中的SAS URI有效期至 年。
  2. 我已通过代码和Postman多次重试了相同的请求,但失败了。

链接到Swagger页面https://westus.cris.ai/swagger/ui/index

1 个答案:

答案 0 :(得分:0)

Blob容器音频文件名不应包含任何空格,这可能会导致问题。