Identity Verification
Verify whether two audio samples are from the same speaker
1. Submit job
Endpoint
POSThttps://speakerscope.ai/api/verification
Fields
| Field | Type | Description |
|---|---|---|
audio1_url | string | URL of the first audio file (enrollment) |
audio2_url | string | URL of the second audio file (test) |
Example
import requests
response = requests.post(
"https://speakerscope.ai/api/verification",
auth=("<API_KEY>", "<API_SECRET>"),
json={
"audio1_url": "<AUDIO1_URL>",
"audio2_url": "<AUDIO2_URL>",
},
)
print(response.json())Response
| Field | Type | Description |
|---|---|---|
job_id | str | Job identifier used to poll for the result |
{
"job_id": "cca90f61-c3f4-496b-a33c-6d77a4ce92bf"
}2. Get results
Endpoint
GEThttps://speakerscope.ai/api/status/{job_id}
Example
import requests
response = requests.get(
"https://speakerscope.ai/api/status/<JOB_ID>",
auth=("<API_KEY>", "<API_SECRET>"),
)
print(response.json())Response
Status
| Field | Type | Description |
|---|---|---|
status | str | "pending", "completed", or "failed" |
progress | str (optional) | Progress description (when "pending") |
error | str (optional) | Error message (when "failed") |
Result
| Field | Type | Description |
|---|---|---|
score | float | Raw similarity score (log-likelihood ratio) between both samples (when "completed") |
prediction | bool | true if both samples are from the same speaker, false otherwise (when "completed") |
probabilities | dict[str, float] | Maps each outcome ("true" and "false") to its confidence score, sorted in descending order (when "completed") |
Pending
{
"status": "pending",
"progress": "Predicting..."
}Completed
{
"status": "completed",
"score": 2.09,
"prediction": true,
"probabilities": {
"true": 0.89,
"false": 0.11
}
}