#!/usr/bin/env python3 """ Minimal inference example for LAION-Box Emotional v0.7. These are fully-merged standalone DiT checkpoints — use them as the `--checkpoint` (transformer/DiT) weights in the DramaBox / LTX-2 audio pipeline. You still need the audio-components checkpoint (ltx-2.3-22b-dev.safetensors) and the Gemma prompt encoder. pip install torch safetensors librosa soundfile # + the DramaBox/ltx2 pipeline """ import sys # 1) point at the DramaBox pipeline source sys.path.insert(0, "DramaBox/src") from inference_server import TTSServer MODEL = "LAION-Box-Emotional-v0.7_best1_step850.safetensors" # this repo AUDIO_COMPONENTS = "dramabox-audio-components.safetensors" # VAE + vocoder (in this repo) GEMMA_ROOT = "/path/to/gemma" # prompt encoder tts = TTSServer( checkpoint=MODEL, full_checkpoint=AUDIO_COMPONENTS, gemma_root=GEMMA_ROOT, device="cuda", dtype="bf16", bnb_4bit=True, ) tts.generate_to_file( prompt="A woman, voice breaking with emotion: 'After all these years... you finally came back.'", output="emotional_out.wav", voice_ref="reference_voice.wav", # 5-10s clean speaker sample cfg_scale=2.5, # higher -> follows the emotional prompt harder stg_scale=1.5, duration_multiplier=1.1, ref_duration=10.0, denoise_ref=True, seed=42, ) print("wrote emotional_out.wav")