| """Render the deterministic fixture script with real Kokoro voices.""" | |
| from __future__ import annotations | |
| import argparse | |
| from pathlib import Path | |
| from midnight_static.fixtures import fixture_script | |
| from midnight_static.tts import render_script_wav | |
| def main() -> None: | |
| parser = argparse.ArgumentParser(description="Render a fixture broadcast with Kokoro.") | |
| 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( | |
| "--output", | |
| default="outputs/kokoro-fixture.wav", | |
| help="Output WAV path.", | |
| ) | |
| args = parser.parse_args() | |
| script = fixture_script(args.premise) | |
| output = render_script_wav(script, Path(args.output)) | |
| print(output) | |
| if __name__ == "__main__": | |
| main() | |