Training Sets - Create
建立新的訓練集。
PUT {endpoint}/customvoice/trainingsets/{id}?api-version=2024-02-01-preview
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
支援的認知服務端點(通訊協定和主機名,例如:https://eastus.api.cognitive.microsoft.com)。 |
|
id
|
path | True |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
資源的標識碼。 |
|
api-version
|
query | True |
string minLength: 1 |
要用於這項作業的 API 版本。 |
要求標頭
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | True |
string |
在這裡提供您的語音資源金鑰。 |
要求本文
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| locale | True |
string |
定型數據集的地區設定。 地區設定程式代碼遵循 BCP-47。 您可以在這裡找到文字到語音轉換的地區設定清單,https://learn.microsoft.com/azure/ai-services/speech-service/language-support?tabs=tts。 |
| projectId | True |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
資源標識碼 |
| description |
string |
訓練集描述 |
|
| displayName |
string minLength: 1 |
定型集名稱 |
|
| id |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
資源標識碼 |
|
| status |
資源的狀態。 |
||
| voiceKind |
語音種類 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 201 Created |
創建 |
|
| Other Status Codes |
發生錯誤。 標題 x-ms-error-code: string |
安全性
Ocp-Apim-Subscription-Key
在這裡提供您的語音資源金鑰。
類型:
apiKey
位於:
header
範例
Create a training set
範例要求
PUT {endpoint}/customvoice/trainingsets/Jessica-300?api-version=2024-02-01-preview
{
"description": "300 sentences Jessica data in general style.",
"projectId": "Jessica",
"locale": "en-US",
"voiceKind": "Female"
}
範例回覆
{
"id": "Jessica-300",
"description": "300 sentences Jessica data in general style.",
"projectId": "Jessica",
"locale": "en-US",
"voiceKind": "Female",
"status": "Succeeded",
"createdDateTime": "2023-04-01T05:30:00.000Z",
"lastActionDateTime": "2023-04-02T10:15:30.000Z"
}
定義
| 名稱 | Description |
|---|---|
| Error |
最上層錯誤遵循 Microsoft Azure REST API 指導方針,可在 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors取得。 這包含具有錯誤碼、訊息、詳細數據、目標和具有更描述性詳細數據的內部錯誤的最上層錯誤。 |
|
Error |
最上層錯誤碼 |
|
Error |
錯誤回應遵循 Microsoft Azure REST API 指導方針,可在 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors取得。 |
|
Inner |
內部錯誤遵循 Microsoft Azure REST API 指導方針,https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors提供。 這包括必要的屬性錯誤碼、訊息和選擇性屬性目標、內部錯誤(這可以是巢狀的)。 |
| Status |
資源的狀態。 |
|
Training |
訓練集 |
|
Training |
訓練集屬性 |
|
Voice |
語音種類 |
Error
最上層錯誤遵循 Microsoft Azure REST API 指導方針,可在 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors取得。 這包含具有錯誤碼、訊息、詳細數據、目標和具有更描述性詳細數據的內部錯誤的最上層錯誤。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
最上層錯誤碼 |
|
| details |
Error[] |
有關錯誤和/或預期原則的其他支持詳細數據。 |
| innererror |
內部錯誤遵循 Microsoft Azure REST API 指導方針,https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors提供。 這包括必要的屬性錯誤碼、訊息和選擇性屬性目標、內部錯誤(這可以是巢狀的)。 |
|
| message |
string |
最上層錯誤訊息。 |
| target |
string |
錯誤的來源。 例如,如果是無效的模型,則為 “model” 或 “model id”。 |
ErrorCode
最上層錯誤碼
| 值 | Description |
|---|---|
| BadRequest | |
| BadArgument | |
| Unauthorized | |
| Forbidden | |
| NotFound | |
| UnsupportedMediaType | |
| TooManyRequests | |
| InternalServerError | |
| ServiceUnavailable |
ErrorResponse
錯誤回應遵循 Microsoft Azure REST API 指導方針,可在 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors取得。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
最上層錯誤遵循 Microsoft Azure REST API 指導方針,可在 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors取得。 這包含具有錯誤碼、訊息、詳細數據、目標和具有更描述性詳細數據的內部錯誤的最上層錯誤。 |
InnerError
內部錯誤遵循 Microsoft Azure REST API 指導方針,https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors提供。 這包括必要的屬性錯誤碼、訊息和選擇性屬性目標、內部錯誤(這可以是巢狀的)。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
string |
詳細的錯誤碼可協助診斷。 |
| innererror |
內部錯誤遵循 Microsoft Azure REST API 指導方針,https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors提供。 這包括必要的屬性錯誤碼、訊息和選擇性屬性目標、內部錯誤(這可以是巢狀的)。 |
|
| message |
string |
詳細的錯誤訊息。 |
| target |
string |
錯誤的來源。 例如,如果是無效的模型,則為 “model” 或 “model id”。 |
Status
資源的狀態。
| 值 | Description |
|---|---|
| NotStarted | |
| Running | |
| Succeeded | |
| Failed | |
| Disabling | |
| Disabled |
TrainingSet
訓練集
| 名稱 | 類型 | Description |
|---|---|---|
| createdDateTime |
string (date-time) |
物件建立時的時間戳。 時間戳會編碼為 ISO 8601 日期和時間格式(“YYYY-MM-DDThh:mm:ssZ”,請參閱 https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations)。 |
| description |
string |
訓練集描述 |
| displayName |
string minLength: 1 |
定型集名稱 |
| id |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
資源標識碼 |
| lastActionDateTime |
string (date-time) |
輸入目前狀態時的時間戳。 時間戳會編碼為 ISO 8601 日期和時間格式(“YYYY-MM-DDThh:mm:ssZ”,請參閱 https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations)。 |
| locale |
string |
定型數據集的地區設定。 地區設定程式代碼遵循 BCP-47。 您可以在這裡找到文字到語音轉換的地區設定清單,https://learn.microsoft.com/azure/ai-services/speech-service/language-support?tabs=tts。 |
| projectId |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
資源標識碼 |
| properties |
訓練集屬性 |
|
| status |
資源的狀態。 |
|
| voiceKind |
語音種類 |
TrainingSetProperties
訓練集屬性
| 名稱 | 類型 | Description |
|---|---|---|
| utteranceCount |
integer (int32) |
此定型集中的語句計數 |
VoiceKind
語音種類
| 值 | Description |
|---|---|
| Male | |
| Female |