使用Azure AI训练自定义语音

我需要帮助完成我的一个项目,该项目要求“使用Azure AI以编程方式(优先使用Python)训练自定义语音”,而不是通过自定义语音门户进行。由于我对机器学习非常新手,我需要从头到尾的详细指导来完成这项任务。任何帮助/指导都将不胜感激。


回答:

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

1. 上传数据集:

URL:

POST https://<your service name>.cognitiveservices.azure.com/speechtotext/v3.0/datasets

Header:

Content-Type: application/jsonOcp-Apim-Subscription-Key: <key>

Body:

{    "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,如果您选择“音频 + 人工标记的转录”,其值为Acoustic;对于Plain text,其值为language;对于Pronunciation,其值为Pronunciation

2. 训练模型:

URL

POST https://<NAME>.cognitiveservices.azure.com/speechtotext/v3.0/models

Headers:

Content-Type: application/jsonOcp-Apim-Subscription-Key: <key>

Body:

{    "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获取project id

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

Headers:

Content-Type: application/jsonOcp-Apim-Subscription-Key: <key>

Body:

{    "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

Related Posts

使用LSTM在Python中预测未来值

这段代码可以预测指定股票的当前日期之前的值,但不能预测…

如何在gensim的word2vec模型中查找双词组的相似性

我有一个word2vec模型,假设我使用的是googl…

dask_xgboost.predict 可以工作但无法显示 – 数据必须是一维的

我试图使用 XGBoost 创建模型。 看起来我成功地…

ML Tuning – Cross Validation in Spark

我在https://spark.apache.org/…

如何在React JS中使用fetch从REST API获取预测

我正在开发一个应用程序,其中Flask REST AP…

如何分析ML.NET中多类分类预测得分数组?

我在ML.NET中创建了一个多类分类项目。该项目可以对…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注