Audio
All audio is generated locally, generated by a provider with your key, or imported by you with an explicit license
flag. demovie never downloads audio. Every file gets an entry in the video's audio/provenance.json.
Music (default: free, deterministic)#
npx demovie audio music <slug> [--mood uplifting|tech|calm|energetic|minimal] [--bpm 80-140] [--key "F#m"] [--seed s]A pure-TypeScript synthesizer (kick, clap, hats, bass, pads, plucked arpeggios, risers, a limiter) writes
audio/music.wav (48 kHz stereo) and audio/beats.json. It follows the storyboard: an intro on the first shot, a
build, the main groove, and an ending hit on the final shot with a bar line exactly there. The mood defaults to
the style; the BPM to the storyboard's bpm; the seed to the video slug — the same inputs always give the same file.
beats.json ({ bpm, offset, beats[], bars[], sections[] }) powers v.beat(n) and v.bar(n) in compositions.
Alternatives:
--provider elevenlabs— ElevenLabs Music withELEVENLABS_API_KEY; prints the cost and needs--yes.- Your own licensed track:
npx demovie add track.mp3 --licensed --describe "Artlist license #…", setaudio.music.srcto"assets/track.mp3"invideo.json, thennpx demovie audio music <slug> --provider filefor the beat grid.
SFX (bundled, CC0)#
npx demovie audio sfx --list: whoosh-short, whoosh-long, swipe, click, soft-click, pop, tick,
type-key, riser-2s, impact, shimmer, notification. Cue them in video.json:
"audio": { "sfx": [{ "name": "click", "at": 9.85, "gain": -14 }] }Voiceover (optional)#
npx demovie audio voice <slug> --provider elevenlabs --voice <voice id> # prints the estimate, asks
npx demovie audio voice <slug> --provider openai --yes # after you approved- Lines come from the storyboard's VO column (verbatim) or from
--script vo.txt(one line each, optional[12.5]start). - ElevenLabs returns character timings, converted to word timings; OpenAI doesn't, so word timings are estimated and
marked
estimated. - Results are cached by provider, model, voice and text in
.demovie/.cache/voice/. - Keys:
ELEVENLABS_API_KEY/OPENAI_API_KEYfrom the environment or.demovie/.env. Never logged. - Output:
audio/vo-*.mp3|wav,audio/voice.json,audio/captions.vttand.srt.
Captions#
Burned in by the runtime (captions(v, { style })) for the formats in video.json captions.burnIn (default
9:16) when there is VO; render also writes out/captions.vtt and out/captions.srt.
Mix#
npx demovie audio mix <slug>Music at its gain (default −14 dB), ducked −8 dB under VO (150 ms attack, 400 ms release), faded out over the last
second; VO and SFX at their times; then two-pass loudnorm to the target in video.json (default −16 LUFS, −1.5 dBTP)
→ audio/mix.wav, which render encodes as AAC 192 kbps. QA (DM-S01) measures it.