braidio.compose#
Config-driven narration composition (#20) — the reusable entrypoint.
Turn a list of narration segments + a WeaveConfig into audio. Dispatches
single-voice and multi-voice uniformly (single = a pool of one), reading every
knob from the config. This is the seed of the reusable weave engine (#18/#19):
it has no Hamilton-specifics — it takes plain text segments and a config.
Clip weaving (padded extraction + ducking) is composed separately (#21); this module renders the narration track.
Functions
|
Render |
- braidio.compose.compose_narration(segments, config, *, out_path, api_key=None, work_dir='data/tts/compose')[source]#
Render
segmentsunderconfig→out_path.Single-voice and multi-voice go through the same turn-based path (a single voice is just a one-voice pool). Returns the
(voice, turn_text)assignment for reporting / provenance.api_keyis an optional per-request ElevenLabs key threaded tobraidio.multivoice.render_multivoice()(and thence every synthesized turn);None(default) keeps the$ELEVENLABS_API_KEYfallback.Note
config.segmentation_unitis not read here: this function is handedsegmentsalready cut, so the unit was chosen upstream (usuallybraidio.script.narration_segments()). It is thebraidio.render.render_production()path that cuts a beat itself, and there the field is the switch that turns pacing on — seebraidio.pacing.