我正在尝试使用REST API在 Azure Speech Studio 中创建数据集。创建数据集 POST 请求的架构文档在此处。我想将数据集定向到特定项目,这绝对是可能的。但是当我将“项目”键添加到我的 JSON 时,我得到了一个错误。
我的 JSON 看起来像这样:
dataset_json = {
"kind": "AudioFiles",
"contentUrl": "https://github.com/aguldbrandsen/stuff/blob/main/a3d9b49a-2721-4db4-bc6f-51a005c0cd82_1.zip?raw=true",
"locale": "da-DK",
"displayName": "MyName",
"description": "MyDescription",
"project": "https://westeurope.api.cognitive.microsoft.com/speechtotext/v3.0/projects/<Project_ID>"
}
没有“项目”键和值,它可以正常工作。
我的帖子请求:
r = requests.post('https://westeurope.api.cognitive.microsoft.com/speechtotext/v3.0/datasets', headers={'Ocp-Apim-Subscription-Key':KEY}, json=dataset_json)
我究竟做错了什么?