Text Independent - Verify Profile
Verify Profile
Verifies existing profiles against input audio.
Limitations:
- Minimum audio input length is 1 second
- Maximum audio input length is 120 seconds
- Minimum effective speech length (excluding silence and other "non-speech" frames) is 4 seconds This limitation can be disabled by setting "ignoreMinLength" to true.
- Minimum audio Signal-to-noise ratio (SNR) is 2dB
POST {endpoint}/speaker-recognition/verification/text-independent/profiles/{profileId}:verify?api-version=2021-09-05
POST {endpoint}/speaker-recognition/verification/text-independent/profiles/{profileId}:verify?api-version=2021-09-05&ignoreMinLength={ignoreMinLength}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
|
Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). |
|
profile
|
path | True |
|
Unique identifier for profile id (guid). |
|
api-version
|
query | True |
|
Specifies the version of the operation to use for this request. |
|
ignore
|
query |
|
If true, a voice print will be created immediately for this profile regardless of how much speech is supplied or stored. Default is false. |
Request Header
Media Types: "audio/wav; codecs=audio/pcm"
| Name | Required | Type | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | True |
|
Request Body
Media Types: "audio/wav; codecs=audio/pcm"
| Name | Type | Description |
|---|---|---|
| audioData |
|
Binary audio file. Supported formats are audio/wav; codecs=audio/pcm. Supports audio up to 5MB. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
|
| Other Status Codes |
Failure Headers
|
Security
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Examples
Successful Query
Sample Request
POST https://westus.api.cognitive.microsoft.com/speaker-recognition/verification/text-independent/profiles/49a36324-fc4b-4387-aa06-090cfbf0064f:verify?api-version=2021-09-05
Ocp-Apim-Subscription-Key: {API key}
"{binary file date}"
Sample Response
Content-Type: application/json
{
"recognitionResult": "accept",
"score": 0.63
}
Content-Type: application/json
x-ms-error-code: Error Code
{
"error": {
"code": "Error Code",
"message": "Erro Messae"
}
}
Definitions
| Error | |
|
Recognition |
Speaker recognition result |
|
Result |
Does audio belong to targeted profile? |
|
Speaker |
Speaker error message |
Error
| Name | Type | Description |
|---|---|---|
| code |
|
|
| message |
|
RecognitionInfo
Speaker recognition result
| Name | Type | Description |
|---|---|---|
| recognitionResult |
Does audio belong to targeted profile? |
|
| score |
|
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. |
ResultType
Does audio belong to targeted profile?
| Name | Type | Description |
|---|---|---|
| accept |
|
|
| reject |
|
SpeakerErrorInfo
Speaker error message
| Name | Type | Description |
|---|---|---|
| error |