Drama 3 Diffusers - emotional speech generation
2 min readupdated
This model implements text-to-speech (TTS) conversion with support for emotional nuances and various voices based on the fishaudio/drama-3 architecture, adapted for the diffusers library. It outputs a high-quality audio track from a text prompt containing emotion, pause, and speaker change tags. This makes it a great tool for voicing dialogues, podcasts, or game scenes. Powerful hardware with CUDA support is required.
Key features
- Multi-language support and emotional tags in prompts
- Integration with the diffusers library via custom blocks
- Voice cloning capability using reference audio and text
- Memory optimization through MoE (Mixture of Experts) caching
What you can do
- Voice a dialogue between two characters with different emotions and intonations
- Clone a voice from a short audio clip with its transcript
- Create voiceovers for animations or video clips
Example
import soundfile as sf
import torch
from diffusers import ModularPipelineBlocks
from diffusers.utils import get_class_from_dynamic_module
blocks = ModularPipelineBlocks.from_pretrained("OzzyGT/drama_3_custom_blocks", trust_remote_code=True)
pipe = blocks.init_pipeline()
pipe.load_components(dtype={"default": torch.bfloat16, "audio_decoder": torch.float32, "codec": torch.float32})
prompt = "<|speaker:0|> [excited] Guess what? I finally got the tickets!"
state = pipe(prompt=prompt, generator=torch.Generator().manual_seed(2))
sf.write("speech.wav", state.get("audio"), state.get("sample_rate"))Read more
DetailsHardware requirements: about 27 GiB VRAM and 32 GB system RAM.
Dependencies: diffusers >= 0.41.0, transformers >= 5.3.0, and soundfile.
License: Fish Audio Community License (restrictions on commercial use and cloning real voices without consent).










Comments