diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.go.md b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.go.md new file mode 100644 index 000000000000..9be270c80768 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.go.md @@ -0,0 +1,35 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +``` yaml $(go) +go: + license-header: MICROSOFT_MIT_NO_VERSION + namespace: speakeridentification + clear-output-folder: true +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: release_2021-09-05 +``` + +### Tag: release_2021-09-05 and go + +These settings apply only when `--tag=release_2021-09-05 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'release_2021-09-05' && $(go) +output-folder: $(go-sdk-folder)/services/cognitiveservices/2021-09-05/$(namespace) +``` + +### Tag: identification_2_0_preview and go + +These settings apply only when `--tag=identification_2_0_preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'identification_2_0_preview' && $(go) +output-folder: $(go-sdk-folder)/services/cognitiveservices/v2.0-preview/$(namespace) +``` diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.md b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.md index 3b3cb7393249..58ca9b1fa429 100644 --- a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.md +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.md @@ -2,25 +2,44 @@ > see https://aka.ms/autorest -Configuration for generating Speaker Verification SDK. +Configuration for generating Speaker Identification SDK. + +The current release is `release_2021-09-05`. ``` yaml -tag: identification_2_0_preview +tag: release_2021-09-05 add-credentials: true openapi-type: data-plane ``` -The current release for the Authoring Endpoint is `identification_2_0_preview`. +``` yaml +tag: identification_2_0_preview +add-credentials: true +openapi-type: data-plane +``` # Releases -## Identification 2.0 +## Identification 2021-09-05 +These settings apply only when `--tag=release_2021-09-05` is specified on the command line. + +``` yaml $(tag) == 'release_2021-09-05' +input-file: stable/2021-09-05/Identification.json +``` + +## Identification 2.0 Preview These settings apply only when `--tag=identification_2_0_preview` is specified on the command line. ``` yaml $(tag) == 'identification_2_0_preview' input-file: preview/v2.0/Identification.json ``` +``` yaml $(multiapi) +batch: + - tag: release_2021-09-05 + - tag: identification_2_0_preview +``` + --- # Code Generation @@ -33,14 +52,24 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: + - repo: azure-sdk-for-go - repo: azure-sdk-for-python - - repo: azure-sdk-for-js - repo: azure-sdk-for-node ``` ### CSharp Settings These settings apply only when `--csharp` is specified on the command line. -``` yaml $(csharp) +``` yaml $(csharp) && $(tag) == 'release_2021-09-05' +csharp: + sync-methods: None + license-header: MICROSOFT_MIT_NO_VERSION + azure-arm: false + namespace: Microsoft.Azure.CognitiveServices.speech.speaker.identification + output-folder: $(csharp-sdks-folder)/CognitiveServices/speech.speaker.identification/src/Generated + clear-output-folder: true +``` + +``` yaml $(csharp) && $(tag) == 'identification_2_0_preview' csharp: sync-methods: None license-header: MICROSOFT_MIT_NO_VERSION @@ -55,7 +84,7 @@ csharp: These settings apply only when `--java` is specified on the command line. Please also specify `--azure-libraries-for-java-folder=`. -``` yaml $(java) +``` yaml $(java) && $(tag) == 'release_2021-09-05' java: azure-arm: true namespace: com.microsoft.azure.cognitiveservices.speech.speaker.identification @@ -66,7 +95,26 @@ java: with-single-async-method: true ``` -## Multi-API/Profile support for AutoRest v3 generators +``` yaml $(java) && $(tag) == 'identification_2_0_preview' +java: + azure-arm: true + namespace: com.microsoft.azure.cognitiveservices.speech.speaker.identification + license-header: MICROSOFT_MIT_NO_CODEGEN + payload-flattening-threshold: 1 + output-folder: $(azure-libraries-for-java-folder)/cognitiveservices/data-plane/speech/speaker/identification + with-optional-parameters: true + with-single-async-method: true +``` + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Multi-API/Profile support for AutoRest v3 generators AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files. @@ -78,15 +126,16 @@ require: $(this-folder)/../../../../../profiles/readme.md # all the input files across all versions input-file: + - $(this-folder)/stable/2021-09-05/Identification.json - $(this-folder)/preview/v2.0/Identification.json ``` -If there are files that should not be in the `all-api-versions` set, +If there are files that should not be in the `all-api-versions` set, uncomment the `exclude-file` section below and add the file paths. ``` yaml $(tag) == 'all-api-versions' -#exclude-file: +#exclude-file: # - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json ``` diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.python.md b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.python.md index f80705467b9c..f4c8512fb44f 100644 --- a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.python.md +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.python.md @@ -8,19 +8,21 @@ Use `--python-mode=update` if you already have a setup.py and just want to updat python-mode: create python: license-header: MICROSOFT_MIT_NO_VERSION + add-credentials: true payload-flattening-threshold: 2 namespace: azure.cognitiveservices.speech.speaker.identification - package-name: azure-cognitiveservices-speech-speaker + package-name: azure-cognitiveservices-speech-speaker-identification clear-output-folder: true + no-namespace-folders: true ``` -``` yaml $(python) && $(python-mode) == 'update' -python: - no-namespace-folders: true - output-folder: $(python-sdks-folder)/cognitiveservices/speech/speaker/identification + +``` yaml $(tag) == 'release_2021-09-05' +namespace: azure.cognitiveservices.speech.speaker.identification +output-folder: $(python-sdks-folder)/cognitiveservices/speech/speaker/identification ``` -``` yaml $(python) && $(python-mode) == 'create' -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/cognitiveservices/azure-cognitiveservices-speech-speaker + +``` yaml $(tag) == 'identification_v2_0_preview' +namespace: azure.cognitiveservices.speech.speaker.identification +output-folder: $(python-sdks-folder)/cognitiveservices/speech/speaker/identification ``` diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.typescript.md b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.typescript.md deleted file mode 100644 index f7fae2db4c68..000000000000 --- a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/readme.typescript.md +++ /dev/null @@ -1,12 +0,0 @@ -## TypeScript - -These settings apply only when `--typescript` is specified on the command line. -Please also specify `--typescript-sdks-folder=`. - -``` yaml $(typescript) -typescript: - package-name: "@azure/cognitiveservices-speaker-identification" - output-folder: "$(typescript-sdks-folder)/sdk/cognitiveservices/cognitiveservices-speaker-identification" - azure-arm: false - generate-metadata: true -``` diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/Identification.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/Identification.json new file mode 100644 index 000000000000..c27caabe93fc --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/Identification.json @@ -0,0 +1,730 @@ +{ + "swagger": "2.0", + "info": { + "title": "Speaker Identification API", + "version": "2021-09-05", + "description": "The Azure Cognitive Service Speaker Recognition service provides algorithms that verify and identify speakers by their unique voice characteristics.\nSpeaker Recognition is used to answer the question \"who is speaking?\"" + }, + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}/speaker/identification", + "useSchemePrefix": false, + "positionInOperation": "first", + "parameters": [ + { + "$ref": "#/parameters/endpoint" + } + ] + }, + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "securityDefinitions": { + "apiKeyHeader": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apiKeyHeader": [] + } + ], + "parameters": { + "endpoint": { + "name": "endpoint", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + }, + "apiVersionParam": { + "name": "api-version", + "x-ms-parameter-location": "client", + "in": "query", + "required": true, + "type": "string", + "description": "Specifies the version of the operation to use for this request.", + "enum": [ + "2021-09-05" + ], + "default": "2021-09-05" + }, + "profileIdParam": { + "in": "path", + "name": "profileId", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false, + "description": "Unique identifier for profile id (guid).", + "x-ms-parameter-location": "method" + }, + "localeParam": { + "in": "path", + "name": "locale", + "required": true, + "type": "string", + "x-nullable": false, + "pattern": "^[a-zA-Z]{2}-?[a-zA-Z]{2}$", + "description": "A combination of language code and country code.", + "x-ms-parameter-location": "method" + } + }, + "definitions": { + "ProfileId": { + "type": "string", + "description": "Unique identifier for profile id (guid).", + "format": "uuid", + "x-nullable": false, + "example": "49a36324-fc4b-4387-aa06-090cfbf0064f" + }, + "Locale": { + "type": "string", + "pattern": "^[a-zA-Z]{2}-?[a-zA-Z]{2}$", + "x-nullable": false, + "description": "Language identifier consisting of a combination of language code and country code.", + "example": "en-US" + }, + "ProfileStatus": { + "type": "string", + "description": "Status representing the current state of the profile activation. Available values are:\n* Active: profile is active and can be used if the enrollment status is 'Enrolled'.\n* Inactive: profile has not been activated and an activation phrase must be submitted.", + "enum": [ + "Active", + "Inactive" + ], + "x-ms-enum": { + "name": "ProfileStatusType", + "modelAsString": false + }, + "example": "Inactive" + }, + "EnrollmentStatus": { + "type": "string", + "description": "Status representing the current state of the profile enrollment. Available values are:\n* Enrolling: profile has no voice print and not ready for recognition requests.\n* Training: voice print of profile is being created and can’t be used for recognition at the moment.\n* Enrolled: profile has a voice print and ready for recognition requests.", + "enum": [ + "Enrolling", + "Training", + "Enrolled" + ], + "x-ms-enum": { + "name": "TrainingStatusType", + "modelAsString": false + }, + "example": "Enrolling" + }, + "CreatedDateTime": { + "type": "string", + "format": "date-time", + "description": "Profile creation datetime.", + "example": "2015-04-23T18:25:43.41Z" + }, + "LastUpdatedDateTime": { + "type": "string", + "format": "date-time", + "description": "Last datetime when the profile was updated.", + "example": "2015-04-23T19:34:51.52Z" + }, + "EnrollmentsCount": { + "type": "integer", + "description": "Number of enrollment audios accepted for this profile.", + "example": 1 + }, + "EnrollmentsLengthInSec": { + "type": "number", + "description": "Total length of enrollment audios accepted for this profile in seconds.", + "example": 1.83 + }, + "EnrollmentsSpeechLengthInSec": { + "type": "number", + "description": "Summation of pure speech (which is the amount of audio after removing silence and non-speech segments) across all profile enrollments in seconds.", + "example": 1.35 + }, + "RemainingEnrollmentsSpeechLengthInSec": { + "type": "number", + "description": "Amount of pure speech (which is the amount of audio after removing silence and non-speech segments) needed to complete profile enrollment in seconds.", + "example": 18.65 + }, + "ModelVersion": { + "type": "string", + "format": "date", + "description": "Date specifying the model assigned to this profile. Format is yyyy-mm-dd. If profile has no enrollments, this value will be empty.", + "example": "2019-12-05" + }, + "ActivationPhrase": { + "type": "string", + "description": "Activation phrases available to activate a profile.", + "example": "this is my activation phrase to identify me" + }, + "LocaleInfo": { + "description": "Speaker profile locale", + "type": "object", + "required": [ + "locale" + ], + "properties": { + "locale": { + "$ref": "#/definitions/Locale" + } + } + }, + "TiProfileInfoList": { + "description": "Text-Independent Speaker profile info list", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/TiProfileInfo" + } + }, + "nextLink": { + "type": "string", + "example": "{opaqueUrl}" + } + } + }, + "TiProfileInfo": { + "description": "Text-Independent Speaker profile info", + "type": "object", + "properties": { + "profileId": { + "$ref": "#/definitions/ProfileId" + }, + "locale": { + "$ref": "#/definitions/Locale" + }, + "profileStatus": { + "$ref": "#/definitions/ProfileStatus" + }, + "enrollmentStatus": { + "$ref": "#/definitions/EnrollmentStatus" + }, + "createdDateTime": { + "$ref": "#/definitions/CreatedDateTime" + }, + "lastUpdatedDateTime": { + "$ref": "#/definitions/LastUpdatedDateTime" + }, + "enrollmentsCount": { + "$ref": "#/definitions/EnrollmentsCount" + }, + "enrollmentsLengthInSec": { + "$ref": "#/definitions/EnrollmentsLengthInSec" + }, + "enrollmentsSpeechLengthInSec": { + "$ref": "#/definitions/EnrollmentsSpeechLengthInSec" + }, + "remainingEnrollmentsSpeechLengthInSec": { + "$ref": "#/definitions/RemainingEnrollmentsSpeechLengthInSec" + }, + "modelVersion": { + "$ref": "#/definitions/ModelVersion" + } + } + }, + "TiEnrollmentInfo": { + "description": "Speaker profile enrollment info", + "type": "object", + "properties": { + "profileId": { + "$ref": "#/definitions/ProfileId" + }, + "enrollmentStatus": { + "$ref": "#/definitions/EnrollmentStatus" + }, + "enrollmentsCount": { + "$ref": "#/definitions/EnrollmentsCount" + }, + "enrollmentsLengthInSec": { + "$ref": "#/definitions/EnrollmentsLengthInSec" + }, + "enrollmentsSpeechLengthInSec": { + "$ref": "#/definitions/EnrollmentsSpeechLengthInSec" + }, + "remainingEnrollmentsSpeechLengthInSec": { + "$ref": "#/definitions/RemainingEnrollmentsSpeechLengthInSec" + }, + "audioLengthInSec": { + "type": "number", + "description": "This enrollment audio length in seconds.", + "example": 1.83 + }, + "audioSpeechLengthInSec": { + "type": "number", + "description": "This enrollment audio pure speech (which is the amount of audio after removing silence and non-speech segments) length in seconds.", + "example": 1.35 + } + } + }, + "IdentifiedSingleSpeakerInfo": { + "type": "object", + "properties": { + "identifiedProfile": { + "description": "Object containing data of identified profile.", + "$ref": "#/definitions/IdentifyInfo" + }, + "profilesRanking": { + "description": "Object containing data of the top 5 profiles (including identified profile) sorted in descending order by score.", + "type": "array", + "items": { + "$ref": "#/definitions/IdentifyInfo" + }, + "example": [ + { + "profileId": "111f427c-3791-468f-b709-fcef7660fff9", + "score": 0.63 + }, + { + "profileId": "3669fa29-1bf3-45ad-beea-6b348d058d7e", + "score": 0.49 + }, + { + "profileId": "0e196cd9-32d5-4883-8631-54a0e7c7cb3d", + "score": 0.4 + }, + { + "profileId": "726e57d9-04e0-4214-b482-7f786fa83560", + "score": 0.1 + }, + { + "profileId": "f95189fd-1bf5-4485-9c2e-e5897e0c98ca", + "score": 0.03 + } + ] + } + } + }, + "IdentifyInfo": { + "description": "Identified speaker info", + "type": "object", + "properties": { + "profileId": { + "type": "string", + "description": "ID of identified of profile. If no candidate is identified as the right speaker, the value is set to empty GUID.", + "example": "111f427c-3791-468f-b709-fcef7660fff9", + "format": "uuid", + "x-nullable": false + }, + "score": { + "type": "number", + "description": "A float number indicating the similarity between input audio and targeted voice print. This number must be between 0 and 1. A higher number means higher similarity.", + "example": 0.63 + } + } + }, + "ActivationPhraseInfo": { + "description": "Activation phrase list", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "activationPhrase": { + "$ref": "#/definitions/ActivationPhrase" + } + } + } + } + } + }, + "SpeakerErrorInfo": { + "description": "Speaker error message", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "SpeakerErrorResponse": { + "description": "Failure", + "x-ms-error-response": true, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code" + } + }, + "schema": { + "$ref": "#/definitions/SpeakerErrorInfo" + } + } + }, + "paths": { + "/text-independent/profiles": { + "post": { + "description": "Creates a new speaker profile with specified locale.", + "operationId": "TextIndependent_CreateProfile", + "summary": "Create Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/createProfile.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "in": "body", + "name": "profileInfo", + "description": "Provide following detail info when creating a new profile.\nFields | Description\n------- | ------------\nlocale | Locale for the language of this speaker profile. A complete supported locale list is here:
  • **en-US (American English)**
  • **es-ES (Castilian Spanish)**
  • **fr-FR (Standard French)**
  • **zh-CN (Mandarin Chinese)**
", + "schema": { + "$ref": "#/definitions/LocaleInfo" + } + } + ], + "responses": { + "201": { + "description": "Speaker profile created successfully. GUID is returned to reference the created profile.", + "headers": { + "location": { + "type": "string", + "description": "url location of new resource" + } + }, + "schema": { + "$ref": "#/definitions/TiProfileInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + }, + "get": { + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + }, + "description": "Retrieves a set of profiles.\nProfiles are sorted alphabetically by ProfileId", + "operationId": "TextIndependent_ListProfiles", + "summary": "List Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/listProfiles.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "in": "query", + "name": "maxpagesize", + "description": "The number of profiles to return. Default is 100 and the maximum is 500", + "type": "integer", + "default": 100 + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TiProfileInfoList" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/profiles/{profileId}": { + "get": { + "description": "Retrieves a single profile by ID.", + "operationId": "TextIndependent_GetProfile", + "summary": "Retrieve Single Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/fetchProfile.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TiProfileInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + }, + "delete": { + "description": "Deletes an existing profile.", + "operationId": "TextIndependent_DeleteProfile", + "summary": "Delete Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/deleteProfile.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + } + ], + "responses": { + "204": { + "description": "OK" + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/profiles/{profileId}:reset": { + "post": { + "description": "Resets existing profile to its original creation state. The reset operation does the following:\n* Updates enrollmentStatus to Enrolling.\n* Updates lastUpdatedDateTime.\n* Updates enrollmentsCount to 0.\n* Updates enrollmentsLength to 0.\n* Updates enrollmentsSpeechLength to 0.\n* Updates remainingEnrollmentsSpeechLength to the required number.\n* Removes all associated enrollments from storage.\n* Removes chosen passphrase association.\n* Resets value of modelVersion.", + "operationId": "TextIndependent_ResetProfile", + "summary": "Reset Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/resetProfile.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + } + ], + "responses": { + "200": { + "description": "Speaker profile reset successfully. Profile is returned with reset values.", + "headers": { + "location": { + "type": "string", + "description": "url location of the resource" + } + }, + "schema": { + "$ref": "#/definitions/TiProfileInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/profiles/{profileId}/enrollments": { + "post": { + "description": "Adds an enrollment to existing profile.\nThe first enrollment must be a predefined activation phrase which can be listed using the /phrases/{locale} api.\nIf the minimum number of requested enrollment audios is reached, a voice print is created.\nAny further enrollment will be used to improve the voice print.\n\nLimitations:\n* Minimum audio input length per request is **1 second**\n* Maximum audio input length per request is **120 seconds**\n* Minimum total effective speech length (excluding silence and other non-speech frames) for creating a voiceprint is **20 seconds**\n This limitation can be disabled by setting ignoreMinLength to **true**.\n\n* Maximum total audio input length allowed for creating a voiceprint is **300 seconds**\n* Minimum audio Signal-to-noise ratio (SNR) is **2dB**", + "operationId": "TextIndependent_CreateEnrollment", + "summary": "Enroll Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/createEnrollment.json" + } + }, + "tags": [ + "text-independent" + ], + "consumes": [ + "audio/wav; codecs=audio/pcm" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + }, + { + "in": "query", + "name": "ignoreMinLength", + "type": "boolean", + "description": "If true, a voice print will be created immediately for this profile regardless of how much speech is supplied or stored. Default is false.", + "default": false + }, + { + "name": "audioData", + "in": "body", + "description": "Binary audio file. Supported formats are audio/wav; codecs=audio/pcm. Supports audio up to 5MB.", + "required": true, + "schema": { + "type": "object", + "format": "file" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/TiEnrollmentInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/profiles:identifySingleSpeaker": { + "post": { + "description": "Identifies who is speaking in input audio among a list of candidate profiles.\n\nLimitations:\n* Minimum audio input length is **1 second**\n* Maximum audio input length is **120 seconds**\n* Minimum candidate speakers count is **1**\n* Maximum candidate speakers count is **50**\n* Minimum effective speech length (excluding silence and other non-speech frames) is **4 seconds**\n This limitation can be disabled by setting \"ignoreMinLength\" to **true**.\n\n* Minimum audio Signal-to-noise ratio (SNR) is **2dB**", + "operationId": "TextIndependent_IdentifySingleSpeaker", + "summary": "Identify Single Speaker Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/identifySingleSpeaker.json" + } + }, + "tags": [ + "text-independent" + ], + "consumes": [ + "audio/wav; codecs=audio/pcm" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "in": "query", + "name": "profileIds", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1, + "maxItems": 50, + "required": true, + "description": "Comma-delimited profile IDs. Maximum supported number is 50 IDs." + }, + { + "in": "query", + "name": "ignoreMinLength", + "type": "boolean", + "description": "If true, the minimum amount of speech needed for identification is skipped. Default is false.", + "default": false + }, + { + "name": "audioData", + "in": "body", + "description": "Binary audio file. Supported formats are audio/wav; codecs=audio/pcm. Supports audio up to 5MB.", + "required": true, + "schema": { + "type": "object", + "format": "file" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/IdentifiedSingleSpeakerInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/phrases/{locale}": { + "get": { + "description": "Retrieves list of supported passphrases for a specific locale.", + "operationId": "TextIndependent_ListActivationPhrases", + "summary": "Activation Phrases", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/listActivationPhrases.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/localeParam" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ActivationPhraseInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + } + }, + "tags": [] +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/createEnrollment.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/createEnrollment.json new file mode 100644 index 000000000000..b3f3b5f4a556 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/createEnrollment.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "audio/wav; codecs=audio/pcm", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "audioData": "{binary file date}" + }, + "responses": { + "201": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "enrollmentStatus": "Enrolling", + "enrollmentsCount": 1, + "enrollmentsLengthInSec": 1.83, + "enrollmentsSpeechLengthInSec": 1.35, + "remainingEnrollmentsSpeechLengthInSec": 18.65, + "audioLengthInSec": 1.83, + "audioSpeechLengthInSec": 1.35 + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/createProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/createProfile.json new file mode 100644 index 000000000000..b7687356a28f --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/createProfile.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileInfo": { + "locale": "en-us" + } + }, + "responses": { + "201": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "profileStatus": "Active", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T18:25:43.41Z", + "enrollmentsCount": 0, + "enrollmentsLengthInSec": 0, + "enrollmentsSpeechLengthInSec": 0, + "remainingEnrollmentsSpeechLengthInSec": 20, + "modelVersion": "2019-12-05" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/deleteProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/deleteProfile.json new file mode 100644 index 000000000000..60076ede2478 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/deleteProfile.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f" + }, + "responses": { + "204": { + "headers": { + "Content-Type": "application/json" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/fetchProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/fetchProfile.json new file mode 100644 index 000000000000..26f5ae7ad9fe --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/fetchProfile.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "profileStatus": "Active", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T19:34:51.52Z", + "enrollmentsCount": 1, + "enrollmentsLengthInSec": 1.83, + "enrollmentsSpeechLengthInSec": 1.35, + "remainingEnrollmentsSpeechLengthInSec": 18.65, + "modelVersion": "2019-12-05" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/identifySingleSpeaker.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/identifySingleSpeaker.json new file mode 100644 index 000000000000..58a1bba38c12 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/identifySingleSpeaker.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "audio/wav; codecs=audio/pcm", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileIds": "3669fa29-1bf3-45ad-beea-6b348d058d7e,111f427c-3791-468f-b709-fcef7660fff9,0e196cd9-32d5-4883-8631-54a0e7c7cb3d,0e196cd9-32d5-4883-8631-54a0e7c7cb3d,726e57d9-04e0-4214-b482-7f786fa83560,f95189fd-1bf5-4485-9c2e-e5897e0c98ca", + "audioData": "{binary file date}" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "identifiedProfile": { + "profileId": "111f427c-3791-468f-b709-fcef7660fff9", + "score": 0.63 + }, + "profilesRanking": [ + { + "profileId": "111f427c-3791-468f-b709-fcef7660fff9", + "score": 0.63 + }, + { + "profileId": "3669fa29-1bf3-45ad-beea-6b348d058d7e", + "score": 0.49 + }, + { + "profileId": "0e196cd9-32d5-4883-8631-54a0e7c7cb3d", + "score": 0.4 + }, + { + "profileId": "726e57d9-04e0-4214-b482-7f786fa83560", + "score": 0.1 + }, + { + "profileId": "f95189fd-1bf5-4485-9c2e-e5897e0c98ca", + "score": 0.03 + } + ] + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/listActivationPhrases.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/listActivationPhrases.json new file mode 100644 index 000000000000..919eea2192e0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/listActivationPhrases.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "locale": "en-US", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "value": [ + { + "activationPhrase": "this is my activation phrase to identify me" + } + ] + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/listProfiles.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/listProfiles.json new file mode 100644 index 000000000000..c7a10bc873dc --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/listProfiles.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "value": [ + { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "profileStatus": "Active", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T19:34:51.52Z", + "enrollmentsCount": 1, + "enrollmentsLengthInSec": 1.83, + "enrollmentsSpeechLengthInSec": 1.35, + "remainingEnrollmentsSpeechLengthInSec": 18.65, + "modelVersion": "2019-12-05" + } + ], + "nextLink": "{opaqueUrl}" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/resetProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/resetProfile.json new file mode 100644 index 000000000000..dafff7e69879 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Identification/stable/2021-09-05/examples/resetProfile.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "profileStatus": "Inactive", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T18:25:43.41Z", + "enrollmentsCount": 0, + "enrollmentsLengthInSec": 0, + "enrollmentsSpeechLengthInSec": 0, + "remainingEnrollmentsSpeechLengthInSec": 20, + "modelVersion": "2019-12-05" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.go.md b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.go.md new file mode 100644 index 000000000000..fae859c7fa10 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.go.md @@ -0,0 +1,35 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +``` yaml $(go) +go: + license-header: MICROSOFT_MIT_NO_VERSION + namespace: speakerverification + clear-output-folder: true +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: release_2021-09-05 +``` + +### Tag: release_release_2021-09-05 and go + +These settings apply only when `--tag=release_2021-09-05 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'release_2021-09-05' && $(go) +output-folder: $(go-sdk-folder)/services/cognitiveservices/2021-09-05/$(namespace) +``` + +### Tag: verification_2_0_preview and go + +These settings apply only when `--tag=verification_2_0_preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'verification_2_0_preview' && $(go) +output-folder: $(go-sdk-folder)/services/cognitiveservices/v2.0-preview/$(namespace) +``` diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.md b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.md index 4a6dcd91654b..0e85cd77a69b 100644 --- a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.md +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.md @@ -4,23 +4,42 @@ Configuration for generating Speaker Verification SDK. +The current release is `release_2021-09-05`. + ``` yaml -tag: verification_2_0_preview +tag: release_2021-09-05 add-credentials: true openapi-type: data-plane ``` -The current release for the Authoring Endpoint is `verification_2_0_preview`. +``` yaml +tag: verification_2_0_preview +add-credentials: true +openapi-type: data-plane +``` # Releases -## verification 2.0 +## Verification 2021-09-05 +These settings apply only when `--tag=release_2021-09-05` is specified on the command line. + +``` yaml $(tag) == 'release_2021-09-05' +input-file: stable/2021-09-05/Verification.json +``` + +## Verification 2.0 Preview These settings apply only when `--tag=verification_2_0_preview` is specified on the command line. ``` yaml $(tag) == 'verification_2_0_preview' input-file: preview/v2.0/Verification.json ``` +``` yaml $(multiapi) +batch: + - tag: release_2021-09-05 + - tag: verification_2_0_preview +``` + --- # Code Generation @@ -33,14 +52,24 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: + - repo: azure-sdk-for-go - repo: azure-sdk-for-python - - repo: azure-sdk-for-js - repo: azure-sdk-for-node ``` ### CSharp Settings These settings apply only when `--csharp` is specified on the command line. -``` yaml $(csharp) +``` yaml $(csharp) && $(tag) == 'release_2021-09-05' +csharp: + sync-methods: None + license-header: MICROSOFT_MIT_NO_VERSION + azure-arm: false + namespace: Microsoft.Azure.CognitiveServices.speech.speaker.verification + output-folder: $(csharp-sdks-folder)/CognitiveServices/speech.speaker.verification/src/Generated + clear-output-folder: true +``` + +``` yaml $(csharp) && $(tag) == 'verification_2_0_preview' csharp: sync-methods: None license-header: MICROSOFT_MIT_NO_VERSION @@ -55,7 +84,7 @@ csharp: These settings apply only when `--java` is specified on the command line. Please also specify `--azure-libraries-for-java-folder=`. -``` yaml $(java) +``` yaml $(java) && $(tag) == 'release_2021-09-05' java: azure-arm: true namespace: com.microsoft.azure.cognitiveservices.speech.speaker.verification @@ -66,7 +95,26 @@ java: with-single-async-method: true ``` -## Multi-API/Profile support for AutoRest v3 generators +``` yaml $(java) && $(tag) == 'verification_2_0_preview' +java: + azure-arm: true + namespace: com.microsoft.azure.cognitiveservices.speech.speaker.verification + license-header: MICROSOFT_MIT_NO_CODEGEN + payload-flattening-threshold: 1 + output-folder: $(azure-libraries-for-java-folder)/cognitiveservices/data-plane/speech/speaker/verification + with-optional-parameters: true + with-single-async-method: true +``` + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Multi-API/Profile support for AutoRest v3 generators AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files. @@ -78,15 +126,16 @@ require: $(this-folder)/../../../../../profiles/readme.md # all the input files across all versions input-file: + - $(this-folder)/stable/2021-09-05/Verification.json - $(this-folder)/preview/v2.0/Verification.json ``` -If there are files that should not be in the `all-api-versions` set, +If there are files that should not be in the `all-api-versions` set, uncomment the `exclude-file` section below and add the file paths. ``` yaml $(tag) == 'all-api-versions' -#exclude-file: +#exclude-file: # - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json ``` diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.python.md b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.python.md index b5418a87b8b1..a53cacf18926 100644 --- a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.python.md +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.python.md @@ -8,19 +8,20 @@ Use `--python-mode=update` if you already have a setup.py and just want to updat python-mode: create python: license-header: MICROSOFT_MIT_NO_VERSION + add-credentials: true payload-flattening-threshold: 2 namespace: azure.cognitiveservices.speech.speaker.verification - package-name: azure-cognitiveservices-speech-speaker + package-name: azure-cognitiveservices-speech-speaker-verification clear-output-folder: true - -``` -``` yaml $(python) && $(python-mode) == 'update' -python: no-namespace-folders: true - output-folder: $(python-sdks-folder)/cognitiveservices/speech/speaker/verification ``` -``` yaml $(python) && $(python-mode) == 'create' -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/cognitiveservices/azure-cognitiveservices-speech-speaker + +``` yaml $(tag) == 'release_2021-09-05' +namespace: azure.cognitiveservices.speech.speaker.verification +output-folder: $(python-sdks-folder)/cognitiveservices/speech/speaker/verification +``` + +``` yaml $(tag) == 'verification_v2_0_preview' +namespace: azure.cognitiveservices.speech.speaker.verification +output-folder: $(python-sdks-folder)/cognitiveservices/speech/speaker/verification ``` diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.typescript.md b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.typescript.md deleted file mode 100644 index 40bebe3609bd..000000000000 --- a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/readme.typescript.md +++ /dev/null @@ -1,12 +0,0 @@ -## TypeScript - -These settings apply only when `--typescript` is specified on the command line. -Please also specify `--typescript-sdks-folder=`. - -``` yaml $(typescript) -typescript: - package-name: "@azure/cognitiveservices-speaker-verification" - output-folder: "$(typescript-sdks-folder)/sdk/cognitiveservices/cognitiveservices-speaker-verification" - azure-arm: false - generate-metadata: true -``` diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/Verification.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/Verification.json new file mode 100644 index 000000000000..1d1c918f1e12 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/Verification.json @@ -0,0 +1,1126 @@ +{ + "swagger": "2.0", + "info": { + "title": "Speaker Verification API", + "version": "2021-09-05", + "description": "The Azure Cognitive Service Speaker Recognition service provides algorithms that verify and identify speakers by their unique voice characteristics.\nSpeaker Recognition is used to answer the question \"who is speaking?\"" + }, + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}/speaker/verification", + "useSchemePrefix": false, + "positionInOperation": "first", + "parameters": [ + { + "$ref": "#/parameters/endpoint" + } + ] + }, + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "securityDefinitions": { + "apiKeyHeader": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apiKeyHeader": [] + } + ], + "parameters": { + "endpoint": { + "name": "endpoint", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + }, + "apiVersionParam": { + "name": "api-version", + "x-ms-parameter-location": "client", + "in": "query", + "required": true, + "type": "string", + "description": "Specifies the version of the operation to use for this request.", + "enum": [ + "2021-09-05" + ], + "default": "2021-09-05" + }, + "profileIdParam": { + "in": "path", + "name": "profileId", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false, + "description": "Unique identifier for profile id (guid).", + "x-ms-parameter-location": "method" + }, + "localeParam": { + "in": "path", + "name": "locale", + "required": true, + "type": "string", + "x-nullable": false, + "pattern": "^[a-zA-Z]{2}-?[a-zA-Z]{2}$", + "description": "A combination of language code and country code.", + "x-ms-parameter-location": "method" + } + }, + "definitions": { + "ProfileId": { + "type": "string", + "description": "Unique identifier for profile id (guid).", + "format": "uuid", + "x-nullable": false, + "example": "49a36324-fc4b-4387-aa06-090cfbf0064f" + }, + "Locale": { + "type": "string", + "pattern": "^[a-zA-Z]{2}-?[a-zA-Z]{2}$", + "description": "Language identifier consisting of a combination of language code and country code.", + "x-nullable": false, + "example": "en-US" + }, + "ProfileStatus": { + "type": "string", + "description": "Status representing the current state of the profile. Available values are:\n* Active: profile is active and can be used if the enrollment status is 'Enrolled'.\n* Inactive: profile has not been activated and an activation phrase must be submitted.", + "enum": [ + "Active", + "Inactive" + ], + "x-ms-enum": { + "name": "ProfileStatusType", + "modelAsString": false + }, + "example": "Inactive" + }, + "EnrollmentStatus": { + "type": "string", + "description": "Status representing the current state of the profile. Available values are:\n* Enrolling: profile has no voice print and not ready for recognition requests.\n* Training: voice print of profile is being created and can’t be used for recognition at the moment.\n* Enrolled: profile has a voice print and ready for recognition requests.", + "enum": [ + "Enrolling", + "Training", + "Enrolled" + ], + "x-ms-enum": { + "name": "TrainingStatusType", + "modelAsString": false + }, + "example": "Enrolling" + }, + "CreatedDateTime": { + "type": "string", + "format": "date-time", + "description": "Profile creation datetime.", + "example": "2015-04-23T18:25:43.41Z" + }, + "LastUpdatedDateTime": { + "type": "string", + "format": "date-time", + "description": "Last datetime when the profile was updated.", + "example": "2015-04-23T19:34:51.52Z" + }, + "EnrollmentsCount": { + "type": "integer", + "description": "Number of enrollment audios accepted for this profile.", + "example": 1 + }, + "EnrollmentsLengthInSec": { + "type": "number", + "description": "Total length of enrollment audios accepted for this profile in seconds.", + "example": 1.83 + }, + "EnrollmentsSpeechLengthInSec": { + "type": "number", + "description": "Summation of pure speech (which is the amount of audio after removing silence and non-speech segments) across all profile enrollments in seconds.", + "example": 1.35 + }, + "RemainingEnrollmentsCount": { + "type": "integer", + "description": "Number of enrollment audios needed to complete profile enrollment.", + "example": 2 + }, + "RemainingEnrollmentsSpeechLengthInSec": { + "type": "number", + "description": "Amount of pure speech (which is the amount of audio after removing silence and non-speech segments) needed to complete profile enrollment in seconds.", + "example": 18.65 + }, + "ModelVersion": { + "type": "string", + "format": "date", + "description": "Date specifying the model assigned to this profile. Format is yyyy-mm-dd. If profile has no enrollments, this value will be empty.", + "example": "2019-12-05" + }, + "PassPhrase": { + "type": "string", + "description": "Passphrase associated with this enrollment.", + "example": "my voice is my passport verify me" + }, + "ActivationPhrase": { + "type": "string", + "description": "Activation phrases available to activate a profile.", + "example": "this is my activation phrase to identify me" + }, + "LocaleInfo": { + "description": "Speaker profile locale", + "type": "object", + "required": [ + "locale" + ], + "properties": { + "locale": { + "$ref": "#/definitions/Locale" + } + } + }, + "TdProfileInfoList": { + "description": "Text-Dependent Speaker profile info list", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/TdProfileInfo" + } + }, + "nextLink": { + "type": "string", + "example": "{opaqueUrl}" + } + } + }, + "TdProfileInfo": { + "description": "Text-Dependent Speaker profile info", + "type": "object", + "properties": { + "profileId": { + "$ref": "#/definitions/ProfileId" + }, + "locale": { + "$ref": "#/definitions/Locale" + }, + "enrollmentStatus": { + "$ref": "#/definitions/EnrollmentStatus" + }, + "createdDateTime": { + "$ref": "#/definitions/CreatedDateTime" + }, + "lastUpdatedDateTime": { + "$ref": "#/definitions/LastUpdatedDateTime" + }, + "enrollmentsCount": { + "$ref": "#/definitions/EnrollmentsCount" + }, + "enrollmentsLengthInSec": { + "$ref": "#/definitions/EnrollmentsLengthInSec" + }, + "enrollmentsSpeechLengthInSec": { + "$ref": "#/definitions/EnrollmentsSpeechLengthInSec" + }, + "remainingEnrollmentsCount": { + "$ref": "#/definitions/RemainingEnrollmentsCount" + }, + "modelVersion": { + "$ref": "#/definitions/ModelVersion" + } + } + }, + "TdEnrollmentInfo": { + "description": "Text-Dependent Speaker profile enrollment info", + "type": "object", + "properties": { + "profileId": { + "$ref": "#/definitions/ProfileId" + }, + "enrollmentStatus": { + "$ref": "#/definitions/EnrollmentStatus" + }, + "enrollmentsCount": { + "$ref": "#/definitions/EnrollmentsCount" + }, + "enrollmentsLengthInSec": { + "$ref": "#/definitions/EnrollmentsLengthInSec" + }, + "enrollmentsSpeechLengthInSec": { + "$ref": "#/definitions/EnrollmentsSpeechLengthInSec" + }, + "remainingEnrollmentsCount": { + "$ref": "#/definitions/RemainingEnrollmentsCount" + }, + "passPhrase": { + "$ref": "#/definitions/PassPhrase" + }, + "audioLengthInSec": { + "type": "number", + "description": "This enrollment audio length in seconds.", + "example": 1.83 + }, + "audioSpeechLengthInSec": { + "type": "number", + "description": "This enrollment audio pure speech (which is the amount of audio after removing silence and non-speech segments) length in seconds.", + "example": 1.35 + } + } + }, + "TiProfileInfoList": { + "description": "Text-Independent Speaker profile info list", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/TiProfileInfo" + } + }, + "nextLink": { + "type": "string", + "example": "{opaqueUrl}" + } + } + }, + "TiProfileInfo": { + "description": "Text-Independent Speaker profile info", + "type": "object", + "properties": { + "profileId": { + "$ref": "#/definitions/ProfileId" + }, + "locale": { + "$ref": "#/definitions/Locale" + }, + "profileStatus": { + "$ref": "#/definitions/ProfileStatus" + }, + "enrollmentStatus": { + "$ref": "#/definitions/EnrollmentStatus" + }, + "createdDateTime": { + "$ref": "#/definitions/CreatedDateTime" + }, + "lastUpdatedDateTime": { + "$ref": "#/definitions/LastUpdatedDateTime" + }, + "enrollmentsCount": { + "$ref": "#/definitions/EnrollmentsCount" + }, + "enrollmentsLengthInSec": { + "$ref": "#/definitions/EnrollmentsLengthInSec" + }, + "enrollmentsSpeechLengthInSec": { + "$ref": "#/definitions/EnrollmentsSpeechLengthInSec" + }, + "remainingEnrollmentsSpeechLengthInSec": { + "$ref": "#/definitions/RemainingEnrollmentsSpeechLengthInSec" + }, + "modelVersion": { + "$ref": "#/definitions/ModelVersion" + } + } + }, + "TiEnrollmentInfo": { + "description": "Text-Independent Speaker profile enrollment info", + "type": "object", + "properties": { + "profileId": { + "$ref": "#/definitions/ProfileId" + }, + "enrollmentStatus": { + "$ref": "#/definitions/EnrollmentStatus" + }, + "enrollmentsCount": { + "$ref": "#/definitions/EnrollmentsCount" + }, + "enrollmentsLengthInSec": { + "$ref": "#/definitions/EnrollmentsLengthInSec" + }, + "enrollmentsSpeechLengthInSec": { + "$ref": "#/definitions/EnrollmentsSpeechLengthInSec" + }, + "remainingEnrollmentsSpeechLengthInSec": { + "$ref": "#/definitions/RemainingEnrollmentsSpeechLengthInSec" + }, + "audioLengthInSec": { + "type": "number", + "description": "This enrollment audio length in seconds.", + "example": 1.83 + }, + "audioSpeechLengthInSec": { + "type": "number", + "description": "This enrollment audio pure speech (which is the amount of audio after removing silence and non-speech segments) length in seconds.", + "example": 1.35 + } + } + }, + "RecognitionInfo": { + "description": "Speaker recognition result", + "type": "object", + "properties": { + "recognitionResult": { + "type": "string", + "description": "Does audio belong to targeted profile?", + "enum": [ + "accept", + "reject" + ], + "x-ms-enum": { + "name": "ResultType", + "modelAsString": false + }, + "example": "Accept" + }, + "score": { + "type": "number", + "description": "A float number indicating the similarity between input audio and targeted voice print. This number must be between 0 and 1. A higher number means higher similarity.", + "example": 0.63 + } + } + }, + "PassPhraseInfo": { + "description": "Pass phrase list", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "passPhrase": { + "$ref": "#/definitions/PassPhrase" + } + } + } + } + } + }, + "ActivationPhraseInfo": { + "description": "Activation phrase list", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "activationPhrase": { + "$ref": "#/definitions/ActivationPhrase" + } + } + } + } + } + }, + "SpeakerErrorInfo": { + "description": "Speaker error message", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "SpeakerErrorResponse": { + "description": "Failure", + "x-ms-error-response": true, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code" + } + }, + "schema": { + "$ref": "#/definitions/SpeakerErrorInfo" + } + } + }, + "paths": { + "/text-dependent/profiles": { + "post": { + "description": "Create a new speaker profile with specified locale.", + "operationId": "TextDependent_CreateProfile", + "summary": "Create Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/textDependentCreateProfile.json" + } + }, + "tags": [ + "text-dependent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "in": "body", + "name": "profileInfo", + "description": "Provide following detail info when creating a new profile.\nFields | Description\n------- | ------------\nlocale | Locale for the language of this speaker profile. A complete supported locale list is here:
  • **en-US (American English)**
", + "schema": { + "$ref": "#/definitions/LocaleInfo" + } + } + ], + "responses": { + "201": { + "description": "Speaker profile created successfully. GUID is returned to reference the created profile.", + "headers": { + "location": { + "type": "string", + "description": "url location of new resource" + } + }, + "schema": { + "$ref": "#/definitions/TdProfileInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + }, + "get": { + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + }, + "description": "Retrieves a set of profiles.\nProfiles are sorted alphabetically by ProfileId", + "operationId": "TextDependent_ListProfiles", + "summary": "List Profiles", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/textDependentListProfiles.json" + } + }, + "tags": [ + "text-dependent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "in": "query", + "name": "maxpagesize", + "description": "The number of profiles to return. Default is 100 and the maximum is 500", + "type": "integer", + "default": 100 + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TdProfileInfoList" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-dependent/profiles/{profileId}": { + "get": { + "description": "Retrieves a single profile by ID.", + "operationId": "TextDependent_GetProfile", + "summary": "Retrieve Single Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/textDependentFetchProfile.json" + } + }, + "tags": [ + "text-dependent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TdProfileInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + }, + "delete": { + "description": "Deletes an existing profile.", + "operationId": "TextDependent_DeleteProfile", + "summary": "Delete Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/deleteProfile.json" + } + }, + "tags": [ + "text-dependent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + } + ], + "responses": { + "204": { + "description": "OK" + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-dependent/profiles/{profileId}:reset": { + "post": { + "description": "Resets existing profile to its original creation state. The reset operation does the following:\n* Updates enrollmentStatus to Enrolling.\n* Updates lastUpdatedDateTime.\n* Updates enrollmentsCount to 0.\n* Updates enrollmentsLength to 0.\n* Updates enrollmentsSpeechLength to 0.\n* Updates remainingEnrollmentsCount to the initial required number.\n* Removes all associated enrollments from storage.\n* Removes chosen passphrase association.\n* Resets value of modelVersion.", + "operationId": "TextDependent_ResetProfile", + "summary": "Reset Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/textDependentResetProfile.json" + } + }, + "tags": [ + "text-dependent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + } + ], + "responses": { + "200": { + "description": "Speaker profile reset successfully. Profile is returned with reset values.", + "headers": { + "Location": { + "type": "string", + "description": "url location of the resource" + } + }, + "schema": { + "$ref": "#/definitions/TdProfileInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-dependent/profiles/{profileId}/enrollments": { + "post": { + "description": "Adds an enrollment to existing profile.\nIf the minimum number of requested enrollment audios is reached, a voice print is created.\nIf the voice print was created before, it gets recreated from all existing enrollment audios including the new one.\n\nLimitations:\n* Minimum audio input length per request is **1 second**\n* Maximum audio input length per request is **10 seconds**\n* Minimum number of enrollments for creating a voiceprint is **3**\n* Maximum number of enrollments for creating a voiceprint is **50**\n* Minimum audio Signal-to-noise ratio (SNR) is **2dB**\n\nConstraints:\n* First enrollment must match an existing passphrase.\n* All enrollments after the first one, must use the same passphrase used in the first enrollment.", + "operationId": "TextDependent_CreateEnrollment", + "summary": "Enroll Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/textDependentCreateEnrollment.json" + } + }, + "tags": [ + "text-dependent" + ], + "consumes": [ + "audio/wav; codecs=audio/pcm" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + }, + { + "name": "audioData", + "in": "body", + "description": "Binary audio file. Supported formats are audio/wav; codecs=audio/pcm. Supports audio up to 5MB.", + "required": true, + "schema": { + "type": "object", + "format": "file" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/TdEnrollmentInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-dependent/profiles/{profileId}:verify": { + "post": { + "description": "Verifies existing profiles against input audio.\n\nLimitations:\n* Minimum audio input length per request is **1 second**\n* Maximum audio input length per request is **10 seconds**\n* Minimum audio Signal-to-noise ratio (SNR) is **10 dB**", + "operationId": "TextDependent_VerifyProfile", + "summary": "Verify Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/verify.json" + } + }, + "tags": [ + "text-dependent" + ], + "consumes": [ + "audio/wav; codecs=audio/pcm" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + }, + { + "name": "audioData", + "in": "body", + "description": "Binary audio file. Supported formats are audio/wav; codecs=audio/pcm. Supports audio up to 5MB.", + "required": true, + "schema": { + "type": "object", + "format": "file" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RecognitionInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-dependent/phrases/{locale}": { + "get": { + "description": "Retrieves list of supported passphrases for a specific locale.", + "operationId": "TextDependent_ListPhrases", + "summary": "Pass Phrases", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/listPhrases.json" + } + }, + "tags": [ + "text-dependent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/localeParam" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PassPhraseInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/profiles": { + "post": { + "description": "Creates a new speaker profile with specified locale.", + "operationId": "TextIndependent_CreateProfile", + "summary": "Create Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/textIndependentCreateProfile.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "in": "body", + "name": "profileInfo", + "description": "Provide following detail info when creating a new profile.\nFields | Description\n------- | ------------\nlocale | Locale for the language of this speaker profile. A complete supported locale list is here:
  • **en-US (American English)**
  • **es-ES (Castilian Spanish)**
  • **fr-FR (Standard French)**
  • **zh-CN (Mandarin Chinese)**
", + "schema": { + "$ref": "#/definitions/LocaleInfo" + } + } + ], + "responses": { + "201": { + "description": "Speaker profile created successfully. GUID is returned to reference the created profile.", + "headers": { + "location": { + "type": "string", + "description": "url location of new resource" + } + }, + "schema": { + "$ref": "#/definitions/TiProfileInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + }, + "get": { + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + }, + "description": "Retrieves a set of profiles.\nProfiles are sorted alphabetically by ProfileId", + "operationId": "TextIndependent_ListProfiles", + "summary": "List Profiles", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/textIndependentListProfiles.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "in": "query", + "name": "maxpagesize", + "description": "The number of profiles to return. Default is 100 and the maximum is 500", + "type": "integer", + "default": 100 + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TiProfileInfoList" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/profiles/{profileId}": { + "get": { + "description": "Retrieves a single profile by ID.", + "operationId": "TextIndependent_GetProfile", + "summary": "Retrieve Single Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/textIndependentFetchProfile.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TiProfileInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + }, + "delete": { + "description": "Deletes an existing profile.", + "operationId": "TextIndependent_DeleteProfile", + "summary": "Delete Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/deleteProfile.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + } + ], + "responses": { + "204": { + "description": "OK" + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/profiles/{profileId}:reset": { + "post": { + "description": "Resets existing profile to its original creation state. The reset operation does the following:\n* Updates enrollmentStatus to Enrolling.\n* Updates lastUpdatedDateTime.\n* Updates enrollmentsCount to 0.\n* Updates enrollmentsLength to 0.\n* Updates enrollmentsSpeechLength to 0.\n* Updates remainingEnrollmentsSpeechLength to the required number.\n* Removes all associated enrollments from storage.\n* Removes chosen passphrase association.\n* Resets value of modelVersion.", + "operationId": "TextIndependent_ResetProfile", + "summary": "Reset Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/textIndependentResetProfile.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + } + ], + "responses": { + "200": { + "description": "Speaker profile reset successfully. Profile is returned with reset values.", + "headers": { + "Location": { + "type": "string", + "description": "url location of the resource" + } + }, + "schema": { + "$ref": "#/definitions/TiProfileInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/profiles/{profileId}/enrollments": { + "post": { + "description": "Adds an enrollment to existing profile.\nThe first enrollment must be a predefined activation phrase which can be listed using the /phrases/{locale} api.\nIf the minimum number of requested enrollment audios is reached, a voice print is created.\nAny further enrollment will be used to improve the voice print.\n\nLimitations:\n* Minimum audio input length per request is **1 second**\n* Maximum audio input length per request is **120 seconds**\n* Minimum total effective speech length (excluding silence and other non-speech frames) for creating a voiceprint is **20 seconds**\n This limitation can be disabled by setting \"ignoreMinLength\" to **true**.\n\n* Maximum total audio input length allowed for creating a voiceprint is **300 seconds**\n* Minimum audio Signal-to-noise ratio (SNR) is **2dB**", + "operationId": "TextIndependent_CreateEnrollment", + "summary": "Enroll Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/textIndependentCreateEnrollment.json" + } + }, + "tags": [ + "text-independent" + ], + "consumes": [ + "audio/wav; codecs=audio/pcm" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + }, + { + "in": "query", + "name": "ignoreMinLength", + "type": "boolean", + "description": "If true, a voice print will be created immediately for this profile regardless of how much speech is supplied or stored. Default is false.", + "default": false + }, + { + "name": "audioData", + "in": "body", + "description": "Binary audio file. Supported formats are audio/wav; codecs=audio/pcm. Supports audio up to 5MB.", + "required": true, + "schema": { + "type": "object", + "format": "file" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/TiEnrollmentInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/profiles/{profileId}:verify": { + "post": { + "description": "Verifies existing profiles against input audio.\n\nLimitations:\n* Minimum audio input length is **1 second**\n* Maximum audio input length is **120 seconds**\n* Minimum effective speech length (excluding silence and other \"non-speech\" frames) is **4 seconds**\n This limitation can be disabled by setting \"ignoreMinLength\" to **true**.\n* Minimum audio Signal-to-noise ratio (SNR) is **2dB**", + "operationId": "TextIndependent_VerifyProfile", + "summary": "Verify Profile", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/verify.json" + } + }, + "tags": [ + "text-independent" + ], + "consumes": [ + "audio/wav; codecs=audio/pcm" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/profileIdParam" + }, + { + "in": "query", + "name": "ignoreMinLength", + "type": "boolean", + "description": "If true, a voice print will be created immediately for this profile regardless of how much speech is supplied or stored. Default is false.", + "default": false + }, + { + "name": "audioData", + "in": "body", + "description": "Binary audio file. Supported formats are audio/wav; codecs=audio/pcm. Supports audio up to 5MB.", + "required": true, + "schema": { + "type": "object", + "format": "file" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RecognitionInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + }, + "/text-independent/phrases/{locale}": { + "get": { + "description": "Retrieves list of supported passphrases for a specific locale.", + "operationId": "TextIndependent_ListActivationPhrases", + "summary": "Pass Phrases", + "x-ms-examples": { + "Successful Query": { + "$ref": "./examples/listActivationPhrases.json" + } + }, + "tags": [ + "text-independent" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionParam" + }, + { + "$ref": "#/parameters/localeParam" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ActivationPhraseInfo" + } + }, + "default": { + "$ref": "#/responses/SpeakerErrorResponse" + } + } + } + } + }, + "tags": [] +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/deleteProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/deleteProfile.json new file mode 100644 index 000000000000..60076ede2478 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/deleteProfile.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f" + }, + "responses": { + "204": { + "headers": { + "Content-Type": "application/json" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/listActivationPhrases.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/listActivationPhrases.json new file mode 100644 index 000000000000..919eea2192e0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/listActivationPhrases.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "locale": "en-US", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "value": [ + { + "activationPhrase": "this is my activation phrase to identify me" + } + ] + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/listPhrases.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/listPhrases.json new file mode 100644 index 000000000000..ad43141ad025 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/listPhrases.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "locale": "en-US", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "value": [ + { + "passPhrase": "my voice is my passport verify me" + }, + { + "passPhrase": "my voice is stronger than passwords" + } + ] + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentCreateEnrollment.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentCreateEnrollment.json new file mode 100644 index 000000000000..ff6dc027facd --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentCreateEnrollment.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "audio/wav; codecs=audio/pcm", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "audioData": "{binary file date}" + }, + "responses": { + "201": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "enrollmentStatus": "Enrolling", + "enrollmentsCount": 1, + "enrollmentsLengthInSec": 1.83, + "enrollmentsSpeechLengthInSec": 1.35, + "remainingEnrollmentsCount": 2, + "passPhrase": "my voice is my passport verify me", + "audioLengthInSec": 1.83, + "audioSpeechLengthInSec": 1.35 + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentCreateProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentCreateProfile.json new file mode 100644 index 000000000000..16b294117c66 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentCreateProfile.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileInfo": { + "locale": "en-us" + } + }, + "responses": { + "201": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T18:25:43.41Z", + "enrollmentsCount": 0, + "enrollmentsLengthInSec": 0, + "enrollmentsSpeechLengthInSec": 0, + "remainingEnrollmentsCount": 3, + "modelVersion": "2019-12-05" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentFetchProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentFetchProfile.json new file mode 100644 index 000000000000..a0510b1ff918 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentFetchProfile.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T19:34:51.52Z", + "enrollmentsCount": 1, + "enrollmentsLengthInSec": 1.83, + "enrollmentsSpeechLengthInSec": 1.35, + "remainingEnrollmentsCount": 2, + "modelVersion": "2019-12-05" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentListProfiles.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentListProfiles.json new file mode 100644 index 000000000000..1bdc87ca6070 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentListProfiles.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "value": [ + { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T19:34:51.52Z", + "enrollmentsCount": 1, + "enrollmentsLengthInSec": 1.83, + "enrollmentsSpeechLengthInSec": 1.35, + "remainingEnrollmentsCount": 2, + "modelVersion": "2019-12-05" + } + ], + "nextLink": "{opaqueUrl}" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentResetProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentResetProfile.json new file mode 100644 index 000000000000..fffeb4fa0dc7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textDependentResetProfile.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T18:25:43.41Z", + "enrollmentsCount": 0, + "enrollmentsLengthInSec": 0, + "enrollmentsSpeechLengthInSec": 0, + "remainingEnrollmentsCount": 3, + "modelVersion": "2019-12-05" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentCreateEnrollment.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentCreateEnrollment.json new file mode 100644 index 000000000000..b3f3b5f4a556 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentCreateEnrollment.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "audio/wav; codecs=audio/pcm", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "audioData": "{binary file date}" + }, + "responses": { + "201": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "enrollmentStatus": "Enrolling", + "enrollmentsCount": 1, + "enrollmentsLengthInSec": 1.83, + "enrollmentsSpeechLengthInSec": 1.35, + "remainingEnrollmentsSpeechLengthInSec": 18.65, + "audioLengthInSec": 1.83, + "audioSpeechLengthInSec": 1.35 + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentCreateProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentCreateProfile.json new file mode 100644 index 000000000000..b7687356a28f --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentCreateProfile.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileInfo": { + "locale": "en-us" + } + }, + "responses": { + "201": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "profileStatus": "Active", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T18:25:43.41Z", + "enrollmentsCount": 0, + "enrollmentsLengthInSec": 0, + "enrollmentsSpeechLengthInSec": 0, + "remainingEnrollmentsSpeechLengthInSec": 20, + "modelVersion": "2019-12-05" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentFetchProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentFetchProfile.json new file mode 100644 index 000000000000..26f5ae7ad9fe --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentFetchProfile.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "profileStatus": "Active", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T19:34:51.52Z", + "enrollmentsCount": 1, + "enrollmentsLengthInSec": 1.83, + "enrollmentsSpeechLengthInSec": 1.35, + "remainingEnrollmentsSpeechLengthInSec": 18.65, + "modelVersion": "2019-12-05" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentListProfiles.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentListProfiles.json new file mode 100644 index 000000000000..c7a10bc873dc --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentListProfiles.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "value": [ + { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "profileStatus": "Active", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T19:34:51.52Z", + "enrollmentsCount": 1, + "enrollmentsLengthInSec": 1.83, + "enrollmentsSpeechLengthInSec": 1.35, + "remainingEnrollmentsSpeechLengthInSec": 18.65, + "modelVersion": "2019-12-05" + } + ], + "nextLink": "{opaqueUrl}" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentResetProfile.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentResetProfile.json new file mode 100644 index 000000000000..dafff7e69879 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/textIndependentResetProfile.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "locale": "en-US", + "profileStatus": "Inactive", + "enrollmentStatus": "Enrolling", + "createdDateTime": "2015-04-23T18:25:43.41Z", + "lastUpdatedDateTime": "2015-04-23T18:25:43.41Z", + "enrollmentsCount": 0, + "enrollmentsLengthInSec": 0, + "enrollmentsSpeechLengthInSec": 0, + "remainingEnrollmentsSpeechLengthInSec": 20, + "modelVersion": "2019-12-05" + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/verify.json b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/verify.json new file mode 100644 index 000000000000..cebcbdeb4f58 --- /dev/null +++ b/specification/cognitiveservices/data-plane/SpeakerRecognition/Verification/stable/2021-09-05/examples/verify.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "endpoint": "https://westus.api.cognitive.microsoft.com", + "api-version": "2021-09-05", + "Content-Type": "audio/wav; codecs=audio/pcm", + "Ocp-Apim-Subscription-Key": "{API key}", + "profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f", + "audioData": "{binary file date}" + }, + "responses": { + "200": { + "headers": { + "Content-Type": "application/json" + }, + "body": { + "recognitionResult": "accept", + "score": 0.63 + } + }, + "default": { + "headers": { + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "error": { + "code": "Error Code", + "message": "Erro Messae" + } + } + } + } +}