> For the complete documentation index, see [llms.txt](https://diffio.ai/llms.txt). This page is also available as HTML at https://diffio.ai/docs/overview/concepts/separated-tracks/.

# Separated tracks: mix and exports

A restore keeps the speech and the background as two separated tracks (`stems_status`). A mix is a saved balance of the two (`background_gain`); an export renders speech, background, a mix or both as a file.

## How it works

1. `stems ready`: `stems_status: "ready"`; `generation.stems_ready`
2. `mix saved`: `PUT …/mix` with `background_gain` and the `revision` you read
3. `export queued`: `POST …/exports`; the same recipe returns the same export
4. `export ready`: `url` to download; `export.ready`

- from `stems ready`: `stems failed`, `generation.stems_failed`; mix and exports answer `409 not_available`
- from `export queued`: `export failed`, `export.failed`; asking again renders it again

**From separated tracks to a file.**

Webhooks `generation.stems_ready`, `generation.stems_failed`, `export.ready`, `export.failed` ([Webhooks](https://diffio.ai/docs/developers/webhooks/))

## Limits

| Limit | Value |
| --- | --- |
| `background_gain` | 0 (speech only) to 1 (all of the background) |
| speech, background, mix | `wav`, `mp3`, `m4a` or `mp4` |
| both | `zip` of the two tracks |
| original | inline only, `mp3` or `mp4` |
| Inline exports | `mp3` or `mp4`, to play in a page |
| Exports rendering | 4 per generation at once; more is `409 too_many_exports` |
| `file_name` | up to 200 characters, without the extension |

## Build with it

- Guide [Separate speech and background](https://diffio.ai/docs/developers/guides/separate-speech-and-background/)

- [`GET /projects/{project_id}/generations/{generation_id}/mix`](https://diffio.ai/docs/api-reference/get-generation-mix/)
- [`PUT /projects/{project_id}/generations/{generation_id}/mix`](https://diffio.ai/docs/api-reference/save-generation-mix/)
- [`POST /projects/{project_id}/generations/{generation_id}/exports`](https://diffio.ai/docs/api-reference/create-generation-export/)
- [`GET /projects/{project_id}/generations/{generation_id}/exports/{export_id}`](https://diffio.ai/docs/api-reference/get-generation-export/)

## Related pages

- Previous: [Transcripts and edits](https://diffio.ai/docs/overview/concepts/transcripts-and-edits/): Every generation has a word-timed transcript; change its words on a Pro result and Diffio restores the changed parts again.
- Next: [Shares](https://diffio.ai/docs/overview/concepts/shares/): A share is a revocable public link to one project's result that anyone with its id can play without an API key.
