使用Azure AI训练自定义语音 [英] Train custom voice using Azure AI
问题描述
我需要完成我的项目工作之一,而不是以编程方式使用Azure AI训练自定义语音(首选python)",而不是使用自定义语音门户.由于我是ML的新手,因此需要有关如何执行此任务的端到端详细信息.任何帮助/指导将不胜感激.
I need help in completing one of my project work which says "train a custom voice using Azure AI programmatically(python preferred)", not with the custom voice portal. Since I'm very new to ML, I need an end-to-end detail on how to perform this task. Any help/guidance would be appreciated.
推荐答案
据我所知,Azure尚未发布这些API,但是我尝试通过浏览器获取HTTP请求,这是我的以下发现.
As far as I know, Azure has not released these APIs yet, but I tried to fetch HTTP requests via browser and these is my findings below.
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>"
}
对于数据集种类
,如果您选择音频+人工标记的笔录",它的值是 Acoustic
,对于 Plain text
,其值是 language
.对于 Pronunciation
,其值为 Pronunciation
.
For dataset kind
, if you select "Audio + human-labeled transcript" its value is Acoustic
, for Plain text
its value is language
. for Pronunciation
its value is Pronunciation
.
2.训练模型:
网址
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>"
}...
]
}
}
您可以通过下面的API获取项目ID
:
You can get project id
and by API below:
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects
您可以通过以下API获取数据集ID
:
You can get dataset id
by API below:
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<project id>
您可以通过以下API获取型号ID
:
You can get model id
by API below:
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获取型号ID
:
You can get model id
by API below:
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<project id>/models
这篇关于使用Azure AI训练自定义语音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!