"""Render a Day 1 crude mix: Kokoro dialogue + hardcoded bed + SFX.""" from __future__ import annotations import argparse from pathlib import Path from midnight_static.fixtures import fixture_script from midnight_static.mixer import mix_crude_broadcast from midnight_static.showcase_scripts import SHOWCASE_SCRIPT_FACTORIES from midnight_static.tts import render_script_wav def main() -> None: parser = argparse.ArgumentParser(description="Render a crude mixed broadcast.") parser.add_argument( "premise", nargs="?", default="a phone booth that rings under the sea", help="Premise to render with the fixture writer.", ) parser.add_argument("--work-dir", default="outputs", help="Directory for intermediate WAVs.") parser.add_argument("--output", default="outputs/crude-broadcast.wav", help="Output WAV path.") parser.add_argument("--showcase", choices=sorted(SHOWCASE_SCRIPT_FACTORIES), help="Render a hand-authored showcase script.") args = parser.parse_args() work_dir = Path(args.work_dir) dialogue_path = work_dir / "crude-dialogue.wav" script = ( SHOWCASE_SCRIPT_FACTORIES[args.showcase]() if args.showcase else fixture_script(args.premise) ) render_script_wav(script, dialogue_path) output = mix_crude_broadcast(dialogue_path, Path(args.output)) print(output) if __name__ == "__main__": main()