swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector TrainingSet API schemes: - https tags: - name: TrainingSet paths: /trainingsets: get: tags: - TrainingSet description: Gets a list of training sets for the authenticated Speech service resource. operationId: microsoftAzureTrainingsetsList produces: - application/json parameters: - $ref: '#/parameters/QuerySkip' - $ref: '#/parameters/QueryMaxPageSize' - $ref: '#/parameters/QueryFilter' - $ref: '#/parameters/QueryApiVersion' responses: '200': description: Success schema: $ref: '#/definitions/PaginatedTrainingSets' default: description: An error occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-pageable: nextLinkName: nextLink itemName: value x-ms-examples: Get all training sets: $ref: ./examples/get_trainingsets.json summary: Microsoft Azure Get Trainingsets /trainingsets/{id}: get: tags: - TrainingSet description: Gets the training set identified by the given ID. operationId: microsoftAzureTrainingsetsGet produces: - application/json parameters: - $ref: '#/parameters/PathId' - $ref: '#/parameters/QueryApiVersion' responses: '200': description: Success schema: $ref: '#/definitions/TrainingSet' default: description: An error occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-examples: Get a training set: $ref: ./examples/get_trainingset.json summary: Microsoft Azure Get Trainingsets Id delete: tags: - TrainingSet description: Deletes the training set identified by the given ID. operationId: microsoftAzureTrainingsetsDelete produces: - application/json parameters: - $ref: '#/parameters/PathId' - $ref: '#/parameters/QueryApiVersion' responses: '204': description: No Content default: description: An error occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-examples: Delete a training set: $ref: ./examples/delete_trainingset.json summary: Microsoft Azure Delete Trainingsets Id put: tags: - TrainingSet description: Creates a new training set. operationId: microsoftAzureTrainingsetsCreate consumes: - application/json produces: - application/json parameters: - $ref: '#/parameters/PathId' - $ref: '#/parameters/QueryApiVersion' - in: body name: trainingset description: training set definition required: true schema: $ref: '#/definitions/TrainingSet' responses: '201': description: Created schema: $ref: '#/definitions/TrainingSet' default: description: An error occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-examples: Create a training set: $ref: ./examples/create_trainingset.json summary: Microsoft Azure Put Trainingsets Id /trainingsets/{id}:upload: post: tags: - TrainingSet description: Uploads data to the specified training set. operationId: microsoftAzureTrainingsetsUploaddata consumes: - application/json produces: - application/json parameters: - $ref: '#/parameters/HeaderOperationId' - $ref: '#/parameters/PathId' - $ref: '#/parameters/QueryApiVersion' - in: body name: dataset description: Dataset to be uploaded required: true schema: $ref: '#/definitions/Dataset' responses: '202': description: Accepted headers: Operation-Id: type: string description: ID of the operation. Operation-Location: description: The location of the operation job. Use this URL to monitor operation status. type: string format: uri default: description: An error occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-long-running-operation: true x-ms-long-running-operation-options: final-state-via: operation-location x-ms-examples: Upload data to a training set: $ref: ./examples/upload_trainingset.json summary: Microsoft Azure Post Trainingsets Id:upload definitions: PaginatedTrainingSets: description: Paginated training set list required: - value type: object properties: value: description: Training set list type: array items: $ref: '#/definitions/TrainingSet' nextLink: description: Link to next page. format: uri type: string VoiceKind: description: Voice kind enum: - Male - Female type: string x-ms-enum: name: VoiceKind modelAsString: true TrainingSetProperties: description: Training set properties type: object properties: utteranceCount: description: Utterance count in this training set format: int32 type: integer readOnly: true TrainingSet: description: Training set required: - locale - projectId type: object properties: id: $ref: '#/definitions/ResourceId' displayName: description: Training set name minLength: 1 type: string description: description: Training set description type: string locale: description: The locale of the training dataset. Locale code follows BCP-47. You can find the text to speech locale list here https://learn.microsoft.com/azure/ai-services/speech-service/language-support?tabs=tts. type: string example: en-US voiceKind: $ref: '#/definitions/VoiceKind' properties: $ref: '#/definitions/TrainingSetProperties' projectId: $ref: '#/definitions/ResourceId' status: $ref: '#/definitions/Status' createdDateTime: description: The timestamp when the object was created. The timestamp is encoded as ISO 8601 date and time format ("YYYY-MM-DDThh:mm:ssZ", see https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations). format: date-time type: string readOnly: true lastActionDateTime: description: The timestamp when the current status was entered. The timestamp is encoded as ISO 8601 date and time format ("YYYY-MM-DDThh:mm:ssZ", see https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations). format: date-time type: string readOnly: true ResourceId: description: Resource id type: string pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ minLength: 3 maxLength: 64 Status: description: Status of a resource. enum: - NotStarted - Running - Succeeded - Failed - Disabling - Disabled type: string x-ms-enum: name: Status modelAsString: true AzureBlobContentSource: description: Azure Blob Storage content. With the examples below, it represents files https://contoso.blob.core.windows.net/voicecontainer/jessica/*.wav type: object required: - containerUrl - extensions properties: containerUrl: description: Azure Blob Storage container URL with [SAS](https://learn.microsoft.com/azure/storage/common/storage-sas-overview). Need both read and list permissions. type: string format: url example: https://contoso.blob.core.windows.net/voicecontainer?mySasToken prefix: description: Blob name prefix. type: string example: jessica extensions: description: File name extensions. type: array items: type: string example: .wav DatasetKind: description: Dataset kind enum: - AudioAndScript - LongAudio - AudioOnly type: string x-ms-enum: name: DatasetKind modelAsString: true Error: description: Top-level error follows Microsoft Azure REST API Guidelines which is available at https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. This contains an top-level error with error code, message, details, target and an inner error with more descriptive details. required: - code - message type: object properties: code: $ref: '#/definitions/ErrorCode' target: description: The source of the error. For example it would be "model" or "model id" in case of invalid model. type: string message: description: Top-level error message. type: string details: description: Additional supportive details regarding the error and/or expected policies. type: array items: $ref: '#/definitions/Error' innererror: $ref: '#/definitions/InnerError' ErrorResponse: description: Error response follows Microsoft Azure REST API Guidelines which is available at https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. required: - error type: object properties: error: $ref: '#/definitions/Error' ErrorCode: description: Top-level error code enum: - BadRequest - BadArgument - Unauthorized - Forbidden - NotFound - UnsupportedMediaType - TooManyRequests - InternalServerError - ServiceUnavailable type: string x-ms-enum: name: ErrorCode modelAsString: true Dataset: description: Dataset object required: - kind - audios type: object properties: displayName: description: The name of this dataset. type: string description: description: Optional description of this dataset. type: string kind: $ref: '#/definitions/DatasetKind' audios: $ref: '#/definitions/AzureBlobContentSource' scripts: $ref: '#/definitions/AzureBlobContentSource' InnerError: description: Inner error follows Microsoft Azure REST API Guidelines which is available at https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. This contains required properties error code, message and optional properties target, inner error(this can be nested). type: object properties: code: description: Detailed error code to help diagnostic. type: string target: description: The source of the error. For example it would be "model" or "model id" in case of invalid model. type: string message: description: Detailed error message. type: string innererror: $ref: '#/definitions/InnerError' parameters: QueryMaxPageSize: name: maxpagesize in: query description: The maximum number of items to include in a single response. required: false type: integer format: int32 default: 100 x-ms-parameter-location: method HeaderOperationId: name: Operation-Id in: header description: ID of the status monitor for the operation. If the Operation-Id header matches an existing operation and the request is not identical to the prior request, it will fail with a 400 Bad Request. required: false type: string pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ minLength: 3 maxLength: 64 x-ms-parameter-location: method QueryFilter: name: filter in: query description: "Filter condition.\r\n - **Supported properties:** projectId, createdDateTime, locale, kind\r\n - **Operators:**\r\n - eq, ne are supported for all properties.\r\n - gt, ge, lt, le are supported for createdDateTime.\r\n - **Example:**\r\n - ```filter=projectId eq 'Jessica'``` (filter by project ID)\r\n - ```filter=kind eq 'ProfessionalVoice'``` (filter project by kind)\r\n - ```filter=locale eq 'en-US'``` (filter training set and model by locale)\r\n - ```filter=createdDateTime gt 2022-12-30T23:59:59.99Z``` (filter resource created time after 2023-11-01)" required: false type: string x-ms-parameter-location: method PathId: name: id in: path description: The ID of the resource. required: true type: string pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ minLength: 3 maxLength: 64 x-ms-parameter-location: method QuerySkip: name: skip in: query description: The number of result items to skip. required: false type: integer format: int32 default: 0 x-ms-parameter-location: method QueryApiVersion: name: api-version in: query description: The API version to use for this operation. required: true type: string minLength: 1 x-ms-parameter-location: method x-ms-client-name: apiVersion x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'