Skip to main content
POST
/
v1
/
identify
Identify speaker with diarization
curl --request POST \
  --url https://api.pyannote.ai/v1/identify \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://example.com/audio.wav",
  "webhook": "https://example.com/webhook",
  "model": "precision-2",
  "numSpeakers": 2,
  "minSpeakers": 1,
  "maxSpeakers": 4,
  "turnLevelConfidence": true,
  "exclusive": true,
  "confidence": true,
  "matching": {
    "exclusive": true,
    "threshold": 0
  },
  "voiceprints": [
    {
      "label": "John Doe",
      "voiceprint": "U29tZUJhc2U2NERhdGE"
    }
  ]
}'
{
  "jobId": "3c8a89a5-dcc6-4edb-a75d-ffd64739674d",
  "status": "created",
  "warning": "<string>"
}
This endpoint allows you to create a new diarization with speaker identification from a remote audio URL. For a complete guide on speaker identification using voiceprints, see the Identification with Voiceprints tutorial.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
voiceprints
object[]
required

List of voiceprints to identify against

Required array length: 1 - 50 elements
url
string

URL of the audio file to be processed

Example:

"https://example.com/audio.wav"

webhook
string

Webhook URL to receive results when job is completed (optional)

Example:

"https://example.com/webhook"

model
enum<string> | null
default:precision-2
Available options:
precision-1,
precision-2
Example:

"precision-2"

numSpeakers
number

Number of speakers. Only use if the number of speakers is known in advance. Number of speakers is detected automatically if not provided. Setting this value results in better overall diarization performance. In rare cases where we cannot honor this request (e.g. short files and large number of speakers), a warning will be added to the output. Equivalent to sending minSpeakers==maxSpeakers

Required range: x >= 1
Example:

2

minSpeakers
number

Minimum number of speakers (must be <= maxSpeakers if both are set)

Required range: x >= 1
Example:

1

maxSpeakers
number

Maximum number of speakers (must be >= minSpeakers if both are set)

Required range: x >= 1
Example:

4

turnLevelConfidence
boolean | null
default:false

Includes turn-level confidence values in the output.

Example:

true

exclusive
boolean
default:false

Includes exclusive diarization values in the output in exclusiveDiarization key (equivalent to diarization but without overlapping speech).

Example:

true

confidence
boolean
default:false

Include confidence values in the output. Output is considerably larger when this option is enabled. Output includes a list of confidence scores with a resolution.

Example:

true

matching
object

Customize how voiceprints are matched against speakers

Response

jobId
string
required

ID of the job

Example:

"3c8a89a5-dcc6-4edb-a75d-ffd64739674d"

status
enum<string>
required

Status of the job

Available options:
pending,
created,
succeeded,
canceled,
failed,
running
Example:

"created"

warning
string

Warning message if any