首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用Azure AI训练定制语音

使用Azure AI训练定制语音
EN

Stack Overflow用户
提问于 2021-05-19 03:29:58
回答 1查看 76关注 0票数 1

我需要帮助完成我的一个项目工作,它说“用Azure AI编程训练一个自定义语音(python首选)”,而不是使用自定义语音门户。因为我对ML非常陌生,所以我需要一个关于如何执行这个任务的端到端的细节。如有任何帮助/指导,将不胜感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-05-21 02:11:34

据我所知,Azure尚未发布这些API,但我尝试通过浏览器获取HTTP请求,以下是我的发现。

1.上载数据集:

URL:

代码语言:javascript
运行
复制
POST https://<your service name>.cognitiveservices.azure.com/speechtotext/v3.0/datasets

标题:

代码语言:javascript
运行
复制
Content-Type: application/json
Ocp-Apim-Subscription-Key: <key>

正文:

代码语言:javascript
运行
复制
{
    "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

代码语言:javascript
运行
复制
POST https://<NAME>.cognitiveservices.azure.com/speechtotext/v3.0/models

标题:

代码语言:javascript
运行
复制
Content-Type: application/json
Ocp-Apim-Subscription-Key: <key>

正文:

代码语言:javascript
运行
复制
{
    "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:

代码语言:javascript
运行
复制
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects

您可以通过下面的API获得dataset id

代码语言:javascript
运行
复制
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<project id>

您可以通过下面的API获得model id

代码语言:javascript
运行
复制
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<project id>

3.部署模型:

URL:

代码语言:javascript
运行
复制
POST https://<NAME>.cognitiveservices.azure.com/speechtotext/v3.0/endpoints

标题:

代码语言:javascript
运行
复制
Content-Type: application/json
Ocp-Apim-Subscription-Key: <key>

正文:

代码语言:javascript
运行
复制
{
    "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

代码语言:javascript
运行
复制
GET https://<YOUR SERVICE NAME>.cognitiveservices.azure.com/speechtotext/v3.0/projects/<project id>/models
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67596536

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档