> ## Documentation Index
> Fetch the complete documentation index at: https://docs.khanhng.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate narration and music with ElevenLabs

> How Demo Studio generates one narration take and an Eleven Music bed, downloads them, picks the best take by analysis, and verifies the words with Scribe.

Demo Studio generates the narration and the music through your ElevenLabs connector, downloads every take, and chooses the best one by analysis, so you don't paste lines or fetch files. Everything lands in one ElevenLabs flow named `<Project> demo video`, where you can hear every take and variation.

## Before generating

Claude checks your plan with the ElevenLabs account tool and records it in the brief.

* **Free plan:** voice output can't be used commercially and needs attribution. For a commercial video, Claude says so and continues only as internal.
* **Paid plan (Starter and up):** voice output is licensed for commercial use.

Expected credit costs:

| Generation | Cost |
| - | - |
| Narration (`eleven_v4`) | About 1 credit per character, 2 takes by default. A 55 s script is about 700 characters, so about 1,400 credits. |
| Music (`eleven_music_v2_5`) | About 1,200 credits per 80 s variation, 4 variations by default. Claude prices it first. |
| Scribe transcription | Few or no credits |

If your remaining credits don't cover both, Claude tells you before generating.

## Voice

1. **Pick a voice.** Claude searches the ElevenLabs voice library for a voice suited to the audience (for example a professional narrator whose description mentions product demos or explainers). You can switch voices in the result.
2. **Generate the whole script in one take**, one sentence per paragraph, so every sentence has a clean recorded pause to cut in. One take keeps loudness, pitch and timbre identical across sentences.
3. **Write numbers in normal written form** ("45-minute") for the voice, and as spoken words ("forty-five minute") in the project's `clips.yaml`. The captions map them back to digits.

## Music

Claude adds a music node with an instrumental prompt that describes only the sound: genre and mood, a steady tempo between 100 and 125 BPM in 4/4, 3 to 5 instruments, a steady groove under a voice-over, and an ending on one clear final hit followed by silence. The length is the target video length plus 25 s.

## Choosing the take and the variation

Claude downloads all takes and variations, then chooses without listening:

* **Voice:** the take with full alignment, the fewest content-word differences (numbers, plurals, names), and every sentence break on a recorded pause.
* **Words:** Claude transcribes the chosen take with ElevenLabs Scribe. If Scribe and the script differ on a word, the audio wins and the text and captions are fixed. The built-in PocketSphinx recogniser often reports plurals or numbers that aren't there, so Scribe is the tiebreaker.
* **Music:** the variation with a steady 100 to 125 BPM, a detected final hit, a length of at least the video plus 20 s, and, if several qualify, the most section changes.

The choice and the reason go in the brief's decision log.

> [!TIP]
>
> Add a `lexicon` entry in `clips.yaml` for the product name and any acronym the voice says letter by letter, for example `classbloom: "K L AE S B L UW M"` and `ai: "EY AY"`. Both the analysis and the acceptance gate use it.

> [!WARNING]
>
> Keep the take whole: one clip with every sentence. Cutting it into per-sentence files makes the same-voice checks compare sentences of one take, which fail on natural intonation, and makes the mixer even out each sentence's loudness.

## Files and licence records

* Voice: `inputs/voice/<project>-narration.mp3`.
* Music: `inputs/music/<project>-music.mp3`, also copied to `_library/music/<project>-eleven-music.mp3` with a `.txt` note (source, flow link, generation id, date, plan and licence status).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.