Skip to main content
Speaker identification is the process of determining who is speaking in an audio file by comparing their voice characteristics against known voiceprints. Unlike diarization which only separates speakers into generic labels (SPEAKER_00, SPEAKER_01, etc.), identification assigns specific identities to speakers.

What are voiceprints?

A voiceprint is a unique digital representation of a person’s voice characteristics, similar to a fingerprint but for voice. It captures the distinctive features of how someone speaks, allowing the system to recognize that person in future audio recordings.
You manage your voiceprints
  • Voiceprints are used only for identification. They do not improve diarization accuracy.
  • pyannoteAI does not maintain a reusable voiceprint database for your account.
  • Voiceprint job output, like all job output, is deleted 24 hours after job completion. Retrieve it and store it in your own secure data store.

Voiceprint requirements

  • One voiceprint per speaker: Create only one voiceprint for each person.
  • Single speaker only: The recording must contain only the target speaker’s voice with no overlapping speakers.
  • Maximum duration: Audio samples must be at most 30 seconds long for creating voiceprints.
  • Consistent speaking style: The voiceprint should capture the person’s normal speaking voice.
  • Language: Our models are language agnostic, so voiceprints can be created in any spoken language.

Prerequisites

Before you start, you’ll need:
  • pyannoteAI account with credit or active subscription
  • An API key
  • An audio recording of a single speaker for the voiceprint creation
  • An audio recording with multiple speakers for diarization + identification
For help creating an account and getting your API key, see the quickstart guide. For pricing and charging details, see Billing.

1. Create a voiceprint

First, create one voiceprint for each speaker you want to identify. After creation, retrieve the voiceprint and store it in your own secure data store. Send a POST request to the voiceprint endpoint with an audio file containing the speaker’s voice.
create_voiceprint.py
The response will include a jobId to track the voiceprint creation:
Example response

Get voiceprint results

To retrieve the voiceprint results, use the same polling or webhook approach described in the How to diarize an audio file tutorial. The process works identically for voiceprint jobs.
Save voiceprints to your own data storage
  • Job outputs, including voiceprints, are automatically deleted 24 hours after job completion.
  • Voiceprints are reusable, so retrieve and store them securely for future identification requests.
  • See Data retention for the full policy.
example job voiceprint output

2. Identify speakers in audio

Retrieve the voiceprints from your own data store and include them in the voiceprints array. Each identification request is independent and only uses the voiceprints included in that request. Send a POST request to the identify endpoint with the audio file URL and the voiceprints you want to match against.
identify_speakers.py
The response will include a jobId for tracking the identification job:
Example response
Multiple voiceprints: You can add multiple voiceprints for different people in the same request. Each voiceprint must have a unique label. The system will attempt to match all provided voiceprints against the audio.
Voiceprint selection: Include voiceprints only for speakers you expect to be in the recording. If you are unsure whether a speaker is present, set an appropriate matching.threshold and review the confidence scores. A submitted voiceprint may match a speaker even when that person is not in the recording.

3. Get identification results

To retrieve the identification results, use the same polling or webhook approach described in the How to diarize an audio file tutorial. The process works identically for identification jobs.
Example identification output
Learn more details about each parameter of the identification output in the identification schema reference.

Understanding the Results

Diarization vs Identification

  • Diarization: Separates audio into speaker segments with generic labels (SPEAKER_00, SPEAKER_01, etc.)
  • Identification: Matches those segments to known voiceprints with specific labels (John Doe, Jane Smith, etc.)

Confidence scores

The confidence scores show how well each voiceprint matches each speaker segment:
  • Higher scores indicate better matches
  • Use the threshold parameter to filter out low-confidence matches
  • Consider the context when interpreting confidence scores

Matching options

  • matching.threshold: Minimum confidence score required for a match (0-100, default: 0). Set higher values (50-70) for more strict matching, lower values for more lenient matching.
  • matching.exclusive: Prevent multiple speakers from matching the same voiceprint (default: true). Set to false if you want multiple speakers to potentially match the same voiceprint.

Pricing

/identify jobs are billed based on the audio duration sent for processing, with a 20-second minimum per successful job, and /voiceprint jobs are billed per voiceprint created. See Billing for details.