SpeakerScope.ai

Identity Verification

Verify whether two audio samples are from the same speaker


1. Submit job

Endpoint

POSThttps://speakerscope.ai/api/verification

Fields

FieldTypeDescription
audio1_urlstringURL of the first audio file (enrollment)
audio2_urlstringURL 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

FieldTypeDescription
job_idstrJob 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

FieldTypeDescription
statusstr"pending", "completed", or "failed"
progressstr (optional)Progress description (when "pending")
errorstr (optional)Error message (when "failed")

Result

FieldTypeDescription
scorefloatRaw similarity score (log-likelihood ratio) between both samples (when "completed")
predictionbooltrue if both samples are from the same speaker, false otherwise (when "completed")
probabilitiesdict[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
  }
}