You can fine-tune a LoRA using DramaBox as a base to add specific speakers or styles.
1. Prepare Dataset
The preprocessor supports four formats. The text field should be the target transcript. For prompted training, prepend the scene description: A woman speaks warmly, "<transcript>".
- Format A (Manifest/JSONL):
{"audio_filepath": "path.wav", "text": "transcript"} (Recommended) - Format B (TSV):
path.wav\ttranscript - Format C (Gemini Synthetic):
id~speaker~lang~sr~samples~dur~phonemes~text - Format D (Libriheavy):
id~speaker~lang~samples~dur_ms~phonemes~text
2. Preprocess
Run src/preprocess.py to generate training-ready .pt files (audio latents, text embeddings, and dummy video latents).
python src/preprocess.py \
--dataset-type manifest \
--index your_data.jsonl \
--audio-dir /path/to/wavs \
--output-dir /path/to/preprocessed/ \
--checkpoint /path/to/dramabox-audio-components.safetensors \
--gemma-root /path/to/gemma-3-12b-it-bnb-4bit/ \
--max-duration 20.0 --min-duration 2.0
3. Train
Use accelerate launch src/train.py with a configuration file (e.g., configs/training_args.example.yaml). The trainer targets 288 LoRA pairs across 48 transformer blocks.
4. Inference with LoRA
Important: Always load the LoRA at inference time rather than pre-merging it to avoid output degradation.
python src/inference.py \
--lora /path/to/your/lora_step_5000.safetensors \
--voice-sample reference.wav \
--prompt 'A woman speaks warmly, "..."' \
--output output.wav