Speakers

Add an enrollment

Add one clip of this speaker. The model turns it into a speaker embedding, which is stored; the audio is not. A speaker's profile combines all of its enrollments, so several clips from different recordings make it sturdier. Synchronous: the response is the new enrollment and the updated speaker.

post/v1/speakers/{id}/enrollments

Request

  • Base URL
    https://api.aircaps.com
  • URL
    https://api.aircaps.com/v1/speakers/{id}/enrollments
  • Auth
    HTTP bearer

Path parameters

idstring required
Example:spk_01k73a9x8w7v6u5t4s3r2q1p0n

Speaker ID.

Query parameters

model'aircaps-speaker-id-v1'

Optional: aircaps-speaker-id-v1. Any other value returns 400 unsupported_model.

Request body application/octet-stream

string binary required

Response

Enrolled.

idstring required

Enrollment ID.

object'speaker_enrollment' required
speaker_idstring required
audio_durationnumber required

Seconds of audio in the enrollment clip.

consistencynumber nullable required

How well this enrollment matches the speaker's other enrollments (-1 to 1). null when it is the only one. A value much lower than the speaker's other enrollments suggests a clip of someone else or a poor recording.

created_atstring date-time required

Example response

{
  "id": "enr_01k73b2c4d5e6f7g8h9j0k1m2n",
  "speaker_id": "spk_01k73a9x8w7v6u5t4s3r2q1p0n",
  "audio_duration": 12.48,
  "consistency": 0.712,
  "speaker": {
    "id": "spk_01k73a9x8w7v6u5t4s3r2q1p0n",
    "name": "Ana García",
    "metadata": {
      "employee_id": "E-1042"
    },
    "num_enrollments": 2,
    "enrolled_duration": 27.9,
    "enrollments": [
      {
        "id": "enr_01k73b2c4d5e6f7g8h9j0k1m2n",
        "speaker_id": "spk_01k73a9x8w7v6u5t4s3r2q1p0n",
        "audio_duration": 12.48,
        "consistency": 0.712
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.