我需要帮助完成我的一个项目工作,它说“用Azure AI编程训练一个自定义语音(python首选)”,而不是使用自定义语音门户。因为我对ML非常陌生,所以我需要一个关于如何执行这个任务的端到端的细节。如有任何帮助/指导,将不胜感激。
发布于 2021-05-21 02:11:34
据我所知,Azure尚未发布这些API,但我尝试通过浏览器获取HTTP请求,以下是我的发现。
1.上载数据集:
URL:
POST https://<your service name>.cognitiveservices.azure.com/speechtotext/v3.0/datasets
标题:
Content-Type: application/json
Ocp-Apim-Subscription-Key: <key>
正文:
{
"displayName": "<name>",
"description": "<description>",
"dataImportKind": "<dataset kind>",
"datasetKind": "<dataset kind>",
"kind": "<dataset kind>",
"sourceUrl": "<dataset URL>",
"contentUrl": "<dataset URL>",
"locale": "<locale, ie, en-us>",
"project": {
"id": "<your project ID>",
"self": "https:///<your service name>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<your project ID>"
},
"properties": {
"email": "<contactor email>"
},
"customProperties": {
"PortalAPIVersion": "3"
},
"email": "<contactor email>"
}
对于dataset kind
,如果选择"Audio +人工标记的转录本“,它的值是Acoustic
,对于Plain text
,它的值是language
。对于Pronunciation
,它的值是Pronunciation
。
2.培训一个模型:
URL
POST https://<NAME>.cognitiveservices.azure.com/speechtotext/v3.0/models
标题:
Content-Type: application/json
Ocp-Apim-Subscription-Key: <key>
正文:
{
"displayName": "<name>",
"description": "<desp>",
"locale": "en-US",
"project": {
"id": "<project ID>",
"self": "https:///<your service name>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<project ID>"
},
"properties": {
"email": "<email>"
},
"customProperties": {
"PortalAPIVersion": "3"
},
"email": "<email>",
"datasets": [{
"id": "<dataset id>",
"self": "https:///<your service name>.cognitiveservices.azure.com/speechtotext/v3.0/datasets/<dataset id>"
}...
]
}
}
您可以获得project id
,并通过下面的API:
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects
您可以通过下面的API获得dataset id
:
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<project id>
您可以通过下面的API获得model id
:
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<project id>
3.部署模型:
URL:
POST https://<NAME>.cognitiveservices.azure.com/speechtotext/v3.0/endpoints
标题:
Content-Type: application/json
Ocp-Apim-Subscription-Key: <key>
正文:
{
"displayName": "<name>",
"description": "<description>",
"locale": "<locale>",
"project": {
"id": "<project id>",
"self": "https:///<your service name>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<project id>"
},
"model": {
"id": "<model id>",
"self": "https:///<your service name>.cognitiveservices.azure.com/speechtotext/v3.0/models/<model id>"
},
"properties": {
"email": "<email>",
"contentLoggingEnabled": false,
"loggingEnabled": false
},
"customProperties": {
"contentLoggingEnabled": false,
"PortalAPIVersion": "3"
},
"email": "<email>"
}
您可以通过下面的API获得model id
:
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<project id>/models
https://stackoverflow.com/questions/67596536
复制相似问题