Consents - Create
提供された音声URLで新しい声優同意を作成します。
PUT {endpoint}/customvoice/consents/{id}?api-version=2026-01-01
URI パラメーター
| 名前 | / | 必須 | 型 | 説明 |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
サポートされている 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 バージョン。 |
要求ヘッダー
| 名前 | 必須 | 型 | 説明 |
|---|---|---|---|
| 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で失敗します。 |
要求本文
| 名前 | 必須 | 型 | 説明 |
|---|---|---|---|
| companyName | True |
string minLength: 1 |
会社名。 同意音声ファイルの会社名と一致しなければなりません。 |
| 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]$ |
リソース ID |
| voiceTalentName | True |
string minLength: 1 |
声優名。 同意音声ファイルの声優名と一致しなければなりません。 |
| audioUrl |
string (uri) |
同意音声ファイルの公開アクセス可能なURLです。 AzureブロブURLでSASを付けることが推奨されます。 この物件はリクエストに応じてのみ利用可能です。 |
|
| description |
string |
同意の説明。 |
|
| displayName |
string minLength: 1 |
同意名。 |
|
| properties |
同意の性質 |
||
| status |
資源のステータス。 |
応答
| 名前 | 型 | 説明 |
|---|---|---|
| 200 OK |
要求は成功しました。 ヘッダー Operation-Location: string |
|
| 201 Created |
要求が成功し、結果として新しいリソースが作成されました。 ヘッダー Operation-Location: string |
|
| Other Status Codes |
予期しないエラー応答。 ヘッダー x-ms-error-code: string |
セキュリティ
Ocp-Apim-Subscription-Key
型:
apiKey
/:
header
OAuth2Auth
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
| 名前 | 説明 |
|---|---|
| https://cognitiveservices.azure.com/.default |
例
Create a consent
要求のサンプル
PUT {endpoint}/customvoice/consents/Jessica?api-version=2026-01-01
{
"description": "Consent for Jessica voice",
"audioUrl": "https://contoso.blob.core.windows.net/public/jessica-consent.wav?mySasToken",
"companyName": "Contoso",
"locale": "en-US",
"projectId": "Jessica",
"voiceTalentName": "Jessica Smith"
}
応答のサンプル
Operation-Location: https://eastus.api.cognitive.microsoft.com/customvoice/operations/070f7986-ef17-41d0-ba2b-907f0f28e314?api-version=2026-01-01
{
"description": "Consent for Jessica voice",
"companyName": "Contoso",
"createdDateTime": "2023-04-01T05:30:00.000Z",
"id": "Jessica",
"lastActionDateTime": "2023-04-02T10:15:30.000Z",
"locale": "en-US",
"projectId": "Jessica",
"status": "NotStarted",
"voiceTalentName": "Jessica Smith"
}
Operation-Location: https://eastus.api.cognitive.microsoft.com/customvoice/operations/070f7986-ef17-41d0-ba2b-907f0f28e314?api-version=2026-01-01
{
"description": "Consent for Jessica voice",
"companyName": "Contoso",
"createdDateTime": "2023-04-01T05:30:00.000Z",
"id": "Jessica",
"lastActionDateTime": "2023-04-02T10:15:30.000Z",
"locale": "en-US",
"projectId": "Jessica",
"status": "NotStarted",
"voiceTalentName": "Jessica Smith"
}
定義
| 名前 | 説明 |
|---|---|
|
Azure. |
エラー オブジェクト。 |
|
Azure. |
エラーの詳細を含む応答。 |
|
Azure. |
エラーに関するより具体的な情報を含むオブジェクト。 REST APIのガイドラインAzure https://aka.ms/AzureRestApiGuidelines#handling-errors。 |
| Consent |
同意の目的 |
|
Consent |
同意作成失敗理由 |
|
Consent |
同意の性質 |
| Status |
資源のステータス。 |
Azure.Core.Foundations.Error
エラー オブジェクト。
| 名前 | 型 | 説明 |
|---|---|---|
| code |
string |
サーバー定義の一連のエラー コードの 1 つ。 |
| details |
この報告されたエラーの原因となった特定のエラーに関する詳細の配列。 |
|
| innererror |
エラーに関する現在のオブジェクトよりも具体的な情報を含むオブジェクト。 |
|
| message |
string |
エラーの人間が判読できる表現。 |
| target |
string |
エラーのターゲット。 |
Azure.Core.Foundations.ErrorResponse
エラーの詳細を含む応答。
| 名前 | 型 | 説明 |
|---|---|---|
| error |
エラー オブジェクト。 |
Azure.Core.Foundations.InnerError
エラーに関するより具体的な情報を含むオブジェクト。 REST APIのガイドラインAzure https://aka.ms/AzureRestApiGuidelines#handling-errors。
| 名前 | 型 | 説明 |
|---|---|---|
| code |
string |
サーバー定義の一連のエラー コードの 1 つ。 |
| innererror |
内部エラー。 |
Consent
同意の目的
| 名前 | 型 | 説明 |
|---|---|---|
| audioUrl |
string (uri) |
同意音声ファイルの公開アクセス可能なURLです。 AzureブロブURLでSASを付けることが推奨されます。 この物件はリクエストに応じてのみ利用可能です。 |
| companyName |
string minLength: 1 |
会社名。 同意音声ファイルの会社名と一致しなければなりません。 |
| 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]$ |
リソース 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 |
同意の性質 |
|
| status |
資源のステータス。 |
|
| voiceTalentName |
string minLength: 1 |
声優名。 同意音声ファイルの声優名と一致しなければなりません。 |
ConsentFailureReason
同意作成失敗理由
| 値 | 説明 |
|---|---|
| AudioAndScriptNotMatch |
同意の音声と口頭の不一致。 verbal-statementを確認してください。 |
| Internal |
カスタム音声サービスのエラーです。 |
ConsentProperties
同意の性質
| 名前 | 型 | 説明 |
|---|---|---|
| failureReason |
同意作成失敗理由 |
Status
資源のステータス。
| 値 | 説明 |
|---|---|
| NotStarted |
未開始 |
| Running |
Running |
| Succeeded |
成功しました |
| Failed |
失敗 |
| Disabling |
無効化 |
| Disabled |
Disabled |