# Speaker Separation API

AudioPod's speaker separation API splits a recording into one audio track per speaker: send a file, a URL or a direct upload to POST /api/v1/speaker/extract and poll the job for the tracks. It is the same AudioDiarize engine the dashboard runs, and API access comes with every plan, including free Basic: calls are paid from your prepaid API wallet first, then your credits.

Canonical URL: https://audiopod.ai/speaker-separation/api
Last updated: 2026-10-16

## Facts

| Fact | Detail |
| --- | --- |
| Per-speaker tracks | POST /api/v1/speaker/extract |
| Who-spoke-when only | POST /api/v1/speaker/diarize |
| Simultaneous voices | POST /api/v1/speaker/separate (2–4 voices) |
| Results | GET /api/v1/speaker/jobs/{id} — tracks as WAV and MP3, plus the timeline |
| Input | Exactly one of: a multipart file, a URL, or an upload_id from a presigned direct upload |
| Speaker count | num_speakers when you know it; min_speakers and max_speakers when you only know a range |
| Clustering | clustering_threshold 0.3–0.95, default 0.7; lower finds more speakers, higher fewer |
| Crosstalk | overlap_mode = "separate", "duplicate" or "exclusive" |
| Transcript | include_transcription=true adds a speaker-labeled transcript, no extra charge |
| Repeats | An identical request while the first is running (under 3 h old) returns that job (duplicate_of: true); force_rerun=true only bypasses one running for over 30 minutes |
| AI agents | MCP tool separate_speakers |
| API price (diarize, extract) | $0.20 per minute from the prepaid API wallet, or 1,500 credits per minute when paid from credits |

## How to do it

1. Create an API key in your AudioPod account.
2. POST the recording to POST /api/v1/speaker/extract with any tuning parameters.
3. Poll GET /api/v1/speaker/jobs/{id} until it is COMPLETED.
4. Download each speaker's WAV or MP3 and, if requested, the transcript.

## Choosing the endpoint

- POST /api/v1/speaker/extract: people take turns (podcasts, interviews, meetings) and you want each person's audio.
- POST /api/v1/speaker/diarize: you only need the timeline of who spoke when, to cut or label elsewhere.
- POST /api/v1/speaker/separate: 2–4 voices sound at the same time throughout, such as duets or a choir; mode extract_vocals_first isolates the vocals from music first, voice_only works on speech directly.

## Tuning speaker detection

- Known count: send num_speakers. It is the single biggest accuracy gain.
- Unknown count: bound it with min_speakers and max_speakers.
- Similar voices merged into one speaker: lower clustering_threshold toward 0.3.
- One person split into two in noisy audio: raise it toward 0.95.

## FAQ

**Is there an API for speaker diarization and separation?**
Yes. POST /api/v1/speaker/extract writes one audio track per speaker, POST /api/v1/speaker/diarize returns the who-spoke-when timeline only, and POST /api/v1/speaker/separate splits 2–4 simultaneous voices. The Python SDK wraps diarize and extract and the Node SDK wraps diarize plus job lookup; neither wraps POST /api/v1/speaker/separate, so call it over REST.

**How do I tell the API how many speakers there are?**
Send num_speakers when you know it, or min_speakers and max_speakers for a range. clustering_threshold (0.3–0.95, default 0.7) fine-tunes detection: lower values find more speakers, higher values fewer.

**What happens if I submit the same file twice?**
While the first job is still running and was started less than 3 hours ago, an identical request returns that job with duplicate_of: true and is not charged again. Failed jobs never count as repeats. force_rerun=true submits a new, charged job only when the running one has gone over 30 minutes; a fresher running job is still returned.

**Can an AI agent separate speakers?**
Yes. The AudioPod MCP server exposes a separate_speakers tool, so an AI assistant or coding agent can start a separation and fetch the tracks.

**How is API usage billed?**
Per minute of audio at API prices, not the dashboard's 330 credits per minute: diarization and extraction cost $0.20 per minute from the prepaid API wallet, or 1,500 credits per minute when paid from credits (credits convert at the pay-as-you-go rate). The charge is reserved when the job starts and refunded if it fails. See /pricing for plans.

## Related

- [Speaker Separation](https://audiopod.ai/features/speaker-separation) — The tool, the free demo and the speaker guides.
- [Developers](https://audiopod.ai/developers) — API keys, SDKs and the MCP server.
- [Overlapping voices](https://audiopod.ai/speaker-separation/overlapping-voices) — What each overlap_mode does to crosstalk.
- [Speaker-labeled transcript](https://audiopod.ai/speaker-separation/speaker-labeled-transcript) — The transcript include_transcription adds.

## Pricing

Plan prices: [pricing](https://audiopod.ai/pricing). Start: [Get an API key](https://audiopod.ai/developers).
