# Speaker Map

> Work out which camera each speaker is on, from the cameras' own microphones, so a multicam edit switches to the right person without a hand-filled table.

Source: https://nodaro.ai/docs/nodes/audio/speaker-map

The **Speaker Map** node works out which camera each speaker is on, from the cameras' own microphones. A multicam edit then switches to the right person without anyone filling in a table. Wire its result into the **Speaker map** input of [Camera Switch](https://nodaro.ai/docs/nodes/video/camera-switch), which puts each cut on the camera of the person who is speaking.

In a multicam podcast or interview, each guest usually has their own camera, and every camera has a microphone of its own. While a guest is talking, the camera pointed at them hears them loudest. Speaker Map takes a transcript with speaker labels, listens to each camera during every speaker's turns, and decides whose camera is whose.

The node runs locally, with no AI model and no provider key, so it works on every edition.

## When to use it
- Let Camera Switch know whose camera is whose in a multicam podcast, with one camera per guest, without filling in the **Speakers** table.
- Map the cameras again for each session of an interview in which the guests change seats.

## Quick start
### Add the node

Press Tab on the canvas and choose **Audio › Analyze › Speaker Map**.

### Wire the recordings

Wire 2 to 6 recordings into the **Cameras** input: the cameras, and the master recording and the wide shot when you have them.

### Wire the transcript and the offsets

Wire a [Transcribe](https://nodaro.ai/docs/nodes/audio/transcribe) node, run with speaker detection on, into the **Transcript** input. When the recordings were started separately, wire the **Offsets** output of [Audio Sync](https://nodaro.ai/docs/nodes/audio/audio-sync) into the **Offsets** input.

### Mark the master and the wide shot, and run

Open the settings panel. Choose the **Master recording** and the **Wide shot**, if you have them. Click **Run**. The node shows which camera each speaker is on.

Workflow: Audio Sync lines up the cameras, Transcribe labels the speakers, and Speaker Map tells Camera Switch whose camera is whose.

- Upload Video → Audio Sync (sources)
- Upload Video → Speaker Map (cameras)
- Audio Sync → Speaker Map (offsets)
- Transcribe → Speaker Map (transcript)
- Speaker Map → Camera Switch (speaker map)

## Inputs
| Input | Accepts | What it does |
| --- | --- | --- |
| **Cameras** | Video and audio nodes, 2 to 6 | Every recording: the cameras, and the master recording and the wide shot when you have them. Each recording is identified by the node it comes from, the same id an edit plan gives it, so the map fits Camera Switch as it is. Required. |
| **Offsets** | Data | An [Audio Sync](https://nodaro.ai/docs/nodes/audio/audio-sync) result over the same recordings. Leave it unwired when the recordings already share one clock. Any recording can be the reference of Audio Sync. Optional. |
| **Transcript** | Data | The word transcript with speaker labels, from a Transcribe node run with speaker detection on. It is the transcript of the master recording, or else of the first recording, whose clock the turns are read on. Required. |

## Outputs
| Output | What it carries |
| --- | --- |
| **Speaker map** | Which camera each speaker is on. Wire it into the **Speaker map** input of Camera Switch. |
| **Edit (EDL)** | The recordings as one edit on the master clock: the offsets applied, the master and the wide shot marked, and each camera's speakers set from the map. |

The **Speaker map** output looks like this:

```json
{
"version": 1,
"speakerMap": { "speaker_0": "camA", "speaker_1": "camB", "speaker_2": "" },
"confidence": {
"speaker_0": { "camera": "camA", "marginDb": 9.4 },
"speaker_1": { "camera": "camB", "marginDb": 6.1 },
"speaker_2": { "camera": "", "marginDb": 1.2 }
},
"notes": ["\"speaker_2\": no clear camera (the loudest led by 1.2 dB) — shown on the wide shot; set the map to override."]
}
```

| Field | What it means |
| --- | --- |
| `speakerMap` | Each speaker label, with the id of their camera. `""` means no clear camera: the speaker is shown on the wide shot, or else on any camera with picture. |
| `confidence` | For each speaker, the camera they got and how far ahead, in dB, the loudest camera was over the next one. `null` when fewer than two cameras heard them. |
| `edl` | The same edit as the **Edit (EDL)** output. It is there when the recordings could be read and a recording other than the master has picture. |
| `notes` | Warnings in plain language: a speaker with no clear camera, a speaker that fewer than two cameras heard, a camera with no audio track, and a camera that heard none of the turns. |

## Settings
| Setting | What it does |
| --- | --- |
| **Cameras** | The connected recordings, in the order they are wired. |
| **Master recording** | The recording that hears everyone, such as a main microphone. It is no one's camera, and the edit runs on its clock. **None** by default. |
| **Wide shot** | The camera that films everyone. It is no one's camera, and a speaker with no clear camera is shown on it. It must be a camera, not a sound-only recording. **None** by default. |
| **Lead needed** | How much louder the loudest camera must be than the next one for a speaker to get it. The default is 3 dB, and the settings panel offers 1 to 12 dB. A lower value gives more speakers a camera. A higher value keeps only the clear ones. |

### How the cameras are decided

For each speaker, over all of that speaker's turns:

- **The loudest camera wins.** The camera that hears the speaker loudest is theirs, when it is ahead of the next camera by at least **Lead needed**.
- **No clear camera.** When no camera is that far ahead, for example because the speaker sits between two cameras, the speaker gets no clear camera. Camera Switch then shows them on the wide shot, or with no wide shot on any camera with picture. A note names the speaker and how far ahead the loudest camera was.
- **The wide shot and the master recording never win.** They hear everyone, so they are no one's camera.
- **A camera with no sound is not a failure.** A camera with no audio track, a muted microphone or one that heard none of the turns simply cannot win a speaker, and a note names it.

## Credits
Speaker Map costs one flat price per run, whatever the length of the recordings or their number. The **Run** button on the node shows the price. Self-hosted Community and Business editions use no credits.

These are refused before any credits are charged:

- Fewer than 2 or more than 6 recordings, or two recordings with the same id.
- A wide shot that is a sound-only recording, such as an audio node.
- A missing transcript, or a transcript with no speaker labels at all. Turn on speaker detection in Transcribe and run it again.

On the canvas, a master or wide shot that is not one of the recordings is ignored. Through the API, it is refused.

## Tips
- **Mark the master microphone and the wide shot.** Otherwise their sound competes with the cameras' sound, and a wide shot that hears everyone may win a speaker.
- **Wire the offsets when the recordings were started separately.** Without them, each camera is read at the transcript's times, and a camera that started late is listened to at the wrong moments.
- **Read the notes.** A speaker with no clear camera usually sits between two cameras, or the cameras' microphones were set very differently. Set that speaker's camera in the **Speakers** table of Camera Switch: a camera set there wins over the map.
- **Adjust the lead.** Raise **Lead needed** when the map chooses a camera that is only slightly louder. Lower it when too many speakers have no clear camera.
- **Let Speaker Layout do it for you.** [Speaker Layout](https://nodaro.ai/docs/nodes/video/speaker-layout) runs Audio Sync, Transcribe, Speaker Map and Camera Switch for you, and frames each speaker on their own camera.

## Troubleshooting
| Problem | What to do |
| --- | --- |
| The run is refused because the transcript has no speaker labels | Turn on speaker detection in Transcribe, run it again, and wire the new transcript. |
| A speaker has no clear camera | Mark the master and the wide shot, lower **Lead needed**, or set the speaker's camera in Camera Switch. |
| The wide shot wins a speaker | Choose it under **Wide shot**, so it is no one's camera. |
| The map is wrong for a camera that started late | Wire the **Offsets** output of Audio Sync into the **Offsets** input. |

## From the API
`POST /v1/speaker-map` takes `sources`, a list of 2 to 6 objects with a unique `id`, a `url` and an optional `kind`, and `transcript`. It also takes optional `offsets` (an Audio Sync result), `masterSourceId`, `wideSourceId` and `marginDb`, from 0 to 30. `kind: "audio"` marks a sound-only recording, such as a main microphone, which is never anyone's camera.

A malformed request answers `400 validation_error`, and a transcript with no speaker labels `422 no_speakers`, both before any credits are held. The finished job's `output_data.json` is the **Speaker map** result above, and `output_data.edl` is the edit.

The SDK method is `client.edit.speakerMap`, the CLI command is `nodaro edit speaker-map`, and the MCP tool is `speaker_map`. Hand the result to Camera Switch as `speakerMapResult` in the SDK, `--speaker-map-result` in the CLI or `speaker_map_result` in MCP. See [Voice and media](https://nodaro.ai/docs/developers/api/voice-and-media), [Editing in the SDK](https://nodaro.ai/docs/developers/sdk/editing) and the [MCP tools](https://nodaro.ai/docs/mcp/tools).

## Frequently asked questions

### What does Speaker Map do?

Speaker Map works out which camera each speaker is on in a multicam recording. While a speaker talks, the camera pointed at them hears them loudest, so that camera becomes theirs. Camera Switch then puts each cut on the speaking person's camera.

### What does Speaker Map need?

Speaker Map needs 2 to 6 recordings of one conversation and a transcript with speaker labels, from Transcribe with speaker detection on. When the recordings were started separately, also connect the Offsets output of Audio Sync.

### What happens when no camera clearly hears a speaker?

The speaker gets no clear camera, and Camera Switch shows them on the wide shot, or with no wide shot on any camera with picture. A note names the speaker and how far ahead the loudest camera was.

### How much does Speaker Map cost?

Speaker Map costs one flat price per run, whatever the length or the number of recordings. The Run button on the node shows the price. Self-hosted Community and Business editions use no credits.

### Does Speaker Map need an AI model or a provider key?

No. Speaker Map reads the sound of each recording locally, so it works on every edition, including a Community Edition install with no provider keys.
