TaskInfer
Docs
Audio

Speaker Diarization

Separate speakers in multi-speaker audio without identifying real-world people.

Speaker Diarization is an option on POST /v1/audio/transcriptions, not a separate endpoint. It answers who spoke when by assigning speaker labels to regions of a transcript. It does not identify the real-world identity of a speaker.

Enable speaker labels

Enable it with speaker_labels=true and request verbose JSON:

import { readFile } from "node:fs/promises";

const form = new FormData();
form.append(
  "file",
  new Blob([await readFile("meeting.mp3")], { type: "audio/mpeg" }),
  "meeting.mp3",
);
form.append("response_format", "verbose_json");
form.append("speaker_labels", "true");

const response = await fetch("https://taskinfer.com/v1/audio/transcriptions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TASKINFER_API_KEY}`,
  },
  body: form,
});

if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

Response requirements

  • speaker_labels accepts true or false and defaults to false.
  • Speaker labels require response_format=verbose_json.
  • The 100 MB upload limit still applies.
  • Do not use diarization output as biometric identity verification.

Use diarization for interviews, calls, meetings, podcasts, and other recordings where conversational turns matter.

Limits and billing

Speaker Diarization uses the Speech to Text billing rules.

Errors

TaskInfer returns 400 Bad Request when speaker labels are requested without response_format=verbose_json.

Prepare authentication in Get started. For common HTTP failures, see Errors and troubleshooting. For endpoint and request definitions, see the API Reference. See the Speech to Text guide for the main transcription workflow.