{ "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-recognition/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: