Models - Create
新しい音声モデルを作成します。
PUT {endpoint}/customvoice/models/{id}?api-version=2024-02-01-preview
URI パラメーター
| 名前 | / | 必須 | 型 | 説明 |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
サポートされている Cognitive Services エンドポイント (プロトコルとホスト名、例: 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]$ |
リソースの ID。 |
|
api-version
|
query | True |
string minLength: 1 |
この操作に使用する API バージョン。 |
要求ヘッダー
| 名前 | 必須 | 型 | 説明 |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | True |
string |
ここで Speech リソース キーを指定します。 |
| Operation-Id |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
操作の状態モニターの ID。 Operation-Id ヘッダーが既存の操作と一致し、要求が前の要求と同じでない場合、400 Bad Request で失敗します。 |
要求本文
| 名前 | 必須 | 型 | 説明 |
|---|---|---|---|
| consentId | True |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
リソース ID |
| projectId | True |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
リソース ID |
| recipe | True |
モデル構築のレシピ。 レシピによって機能が異なります。 |
|
| trainingSetId | True |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
リソース ID |
| description |
string |
モデルの説明 |
|
| id |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
リソース ID |
|
| locale |
string |
このモデルのロケール。 ロケール コードは BCP-47 に従います。 テキスト読み上げロケールの一覧については、https://learn.microsoft.com/azure/ai-services/speech-service/language-support?tabs=ttsを参照してください。 |
|
| properties |
モデルのプロパティ |
||
| status |
リソースの状態。 |
||
| voiceName |
string minLength: 1 |
音声名 |
応答
| 名前 | 型 | 説明 |
|---|---|---|
| 201 Created |
作成 ヘッダー
|
|
| Other Status Codes |
エラーが発生しました。 ヘッダー x-ms-error-code: string |
セキュリティ
Ocp-Apim-Subscription-Key
ここで Speech リソース キーを指定します。
型:
apiKey
/:
header
例
| Create a model |
| Create a multi style model |
Create a model
要求のサンプル
PUT {endpoint}/customvoice/models/Jessica?api-version=2024-02-01-preview
{
"voiceName": "JessicaNeural",
"description": "Jessica voice",
"recipe": {
"kind": "Default"
},
"projectId": "Jessica",
"consentId": "Jessica",
"trainingSetId": "Jessica-300"
}
応答のサンプル
Operation-Location: https://eastus.api.cognitive.microsoft.com/customvoice/operations/1f4352df-f247-40c0-a7b1-a54d017933e1?api-version=2024-02-01-preview
Operation-Id: 1f4352df-f247-40c0-a7b1-a54d017933e1
{
"id": "Jessica",
"voiceName": "JessicaNeural",
"description": "Jessica voice",
"recipe": {
"kind": "Default",
"version": "V7.2023.03"
},
"projectId": "Jessica",
"consentId": "Jessica",
"trainingSetId": "Jessica-300",
"locale": "en-US",
"engineVersion": "2023.07.04.0",
"status": "NotStarted",
"createdDateTime": "2023-04-01T05:30:00.000Z",
"lastActionDateTime": "2023-04-02T10:15:30.000Z"
}
Create a multi style model
要求のサンプル
PUT {endpoint}/customvoice/models/JessicaMultiStyle?api-version=2024-02-01-preview
{
"voiceName": "JessicaMultiStyleNeural",
"description": "Jessica multi style voice",
"recipe": {
"kind": "MultiStyle"
},
"projectId": "Jessica",
"consentId": "Jessica",
"trainingSetId": "Jessica-300",
"locale": "en-US",
"properties": {
"presetStyles": [
"cheerful",
"sad"
],
"styleTrainingSetIds": {
"happy": "JessicaHappy-300",
"myStyle2": "JessicaStyle2"
}
}
}
応答のサンプル
Operation-Location: https://eastus.api.cognitive.microsoft.com/customvoice/operations/a01a127a-c204-4e46-a8c1-fab01559b05b?api-version=2024-02-01-preview
Operation-Id: a01a127a-c204-4e46-a8c1-fab01559b05b
{
"id": "JessicaMultiStyle",
"voiceName": "JessicaMultiStyleNeural",
"description": "Jessica multi style voice",
"recipe": {
"kind": "MultiStyle",
"version": "V3.2023.06"
},
"projectId": "Jessica",
"consentId": "Jessica",
"trainingSetId": "Jessica-300",
"locale": "en-US",
"engineVersion": "2023.07.04.0",
"properties": {
"presetStyles": [
"cheerful",
"sad"
],
"styleTrainingSetIds": {
"happy": "JessicaHappy-300",
"myStyle2": "JessicaStyle2"
},
"voiceStyles": [
"cheerful",
"sad",
"happy",
"myStyle2"
]
},
"status": "NotStarted",
"createdDateTime": "2023-04-01T05:30:00.000Z",
"lastActionDateTime": "2023-04-02T10:15:30.000Z"
}
定義
| 名前 | 説明 |
|---|---|
| Error |
最上位レベルのエラーは、https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errorsで利用可能な Microsoft Azure REST API ガイドラインに従います。 これには、エラー コード、メッセージ、詳細、ターゲットを含む最上位レベルのエラーと、よりわかりやすい詳細を含む内部エラーが含まれます。 |
|
Error |
最上位のエラー コード |
|
Error |
エラー応答は、https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errorsで利用可能な Microsoft Azure REST API ガイドラインに従います。 |
|
Inner |
内部エラーは、https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errorsで利用可能な Microsoft Azure REST API ガイドラインに従います。 これには、必須プロパティのエラー コード、メッセージ、および省略可能なプロパティ ターゲット、内部エラー (入れ子にできます) が含まれます。 |
| Model |
Model オブジェクト |
|
Model |
モデル トレーニングの失敗の理由 |
|
Model |
モデルのプロパティ |
|
Preset |
レシピでサポートされているプリセット スタイル。 音声モデルでは、スタイル トレーニング セットなしでこれらのスタイルをサポートできます。 |
| Recipe |
モデル構築のレシピ。 レシピによって機能が異なります。 |
| Status |
リソースの状態。 |
Error
最上位レベルのエラーは、https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errorsで利用可能な Microsoft Azure REST API ガイドラインに従います。 これには、エラー コード、メッセージ、詳細、ターゲットを含む最上位レベルのエラーと、よりわかりやすい詳細を含む内部エラーが含まれます。
| 名前 | 型 | 説明 |
|---|---|---|
| code |
最上位のエラー コード |
|
| details |
Error[] |
エラーや予想されるポリシーに関するその他のサポートの詳細。 |
| innererror |
内部エラーは、https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errorsで利用可能な Microsoft Azure REST API ガイドラインに従います。 これには、必須プロパティのエラー コード、メッセージ、および省略可能なプロパティ ターゲット、内部エラー (入れ子にできます) が含まれます。 |
|
| message |
string |
最上位レベルのエラー メッセージ。 |
| target |
string |
エラーの原因。 たとえば、無効なモデルの場合は "model" または "model id" になります。 |
ErrorCode
最上位のエラー コード
| 値 | 説明 |
|---|---|
| BadRequest | |
| BadArgument | |
| Unauthorized | |
| Forbidden | |
| NotFound | |
| UnsupportedMediaType | |
| TooManyRequests | |
| InternalServerError | |
| ServiceUnavailable |
ErrorResponse
エラー応答は、https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errorsで利用可能な Microsoft Azure REST API ガイドラインに従います。
| 名前 | 型 | 説明 |
|---|---|---|
| error |
最上位レベルのエラーは、https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errorsで利用可能な Microsoft Azure REST API ガイドラインに従います。 これには、エラー コード、メッセージ、詳細、ターゲットを含む最上位レベルのエラーと、よりわかりやすい詳細を含む内部エラーが含まれます。 |
InnerError
内部エラーは、https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errorsで利用可能な Microsoft Azure REST API ガイドラインに従います。 これには、必須プロパティのエラー コード、メッセージ、および省略可能なプロパティ ターゲット、内部エラー (入れ子にできます) が含まれます。
| 名前 | 型 | 説明 |
|---|---|---|
| code |
string |
診断に役立つ詳細なエラー コード。 |
| innererror |
内部エラーは、https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errorsで利用可能な Microsoft Azure REST API ガイドラインに従います。 これには、必須プロパティのエラー コード、メッセージ、および省略可能なプロパティ ターゲット、内部エラー (入れ子にできます) が含まれます。 |
|
| message |
string |
詳細なエラー メッセージ。 |
| target |
string |
エラーの原因。 たとえば、無効なモデルの場合は "model" または "model id" になります。 |
Model
Model オブジェクト
| 名前 | 型 | 説明 |
|---|---|---|
| consentId |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
リソース ID |
| 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 |
モデルの説明 |
| engineVersion |
string |
エンジンのバージョン。 このバージョンを更新すると、最新の発音バグを修正できます。 |
| id |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
リソース ID |
| 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]$ |
リソース ID |
| properties |
モデルのプロパティ |
|
| recipe |
モデル構築のレシピ。 レシピによって機能が異なります。 |
|
| status |
リソースの状態。 |
|
| trainingSetId |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ |
リソース ID |
| voiceName |
string minLength: 1 |
音声名 |
ModelFailureReason
モデル トレーニングの失敗の理由
ModelProperties
モデルのプロパティ
| 名前 | 型 | 説明 |
|---|---|---|
| failureReason |
モデル トレーニングの失敗の理由 |
|
| presetStyles |
string[] |
このモデルのプリセット スタイル。 |
| styleTrainingSetIds |
object |
カスタマイズされたスタイルと関連するトレーニング セット。 |
| voiceStyles |
string[] |
このモデルでサポートされているすべてのスタイル。 |
PresetStyleItem
レシピでサポートされているプリセット スタイル。 音声モデルでは、スタイル トレーニング セットなしでこれらのスタイルをサポートできます。
| 名前 | 型 | 説明 |
|---|---|---|
| female |
string[] |
女性の音声モデルでサポートされているプリセット スタイル。 |
| male |
string[] |
男性の音声モデルでサポートされているプリセット スタイル。 |
Recipe
モデル構築のレシピ。 レシピによって機能が異なります。
| 名前 | 型 | 説明 |
|---|---|---|
| datasetLocales |
string[] |
トレーニング データセットのロケール。 ロケール コードは BCP-47 に従います。 テキスト読み上げロケールの一覧については、https://learn.microsoft.com/azure/ai-services/speech-service/language-support?tabs=ttsを参照してください。 |
| description |
string |
レシピの説明 |
| kind |
string |
レシピの種類 |
| maxCustomStyleNum |
integer (int32) |
1 つの音声モデルでサポートされるカスタマイズされた最大スタイル番号。 |
| minStyleUtteranceCount |
integer (int32) |
カスタマイズされた各スタイルをトレーニングするために必要な最小発話数。 |
| minUtteranceCount |
integer (int32) |
このレシピを使用して音声モデルをトレーニングするために必要な最小発話数。 |
| modelLocales |
string[] |
音声モデルがこのレシピと話すことができるロケール。 ロケール コードは BCP-47 に従います。 テキスト読み上げロケールの一覧については、https://learn.microsoft.com/azure/ai-services/speech-service/language-support?tabs=ttsを参照してください。 |
| presetStyles |
<string,
Preset |
ロケールごとにこのレシピでサポートされているプリセット スタイル。 これらのスタイルは、スタイル トレーニング セットなしで取得できます。 |
| version |
string |
レシピバージョン |
Status
リソースの状態。
| 値 | 説明 |
|---|---|
| NotStarted | |
| Running | |
| Succeeded | |
| Failed | |
| Disabling | |
| Disabled |