Spaces:
Runtime error
Runtime error
Download example/simple.py from satheeshpr/Dia_TTS: direct link, hf CLI and curl.
- Browser
- Download file 397 Bytes
-
https://huggingface.co/spaces/satheeshpr/Dia_TTS/resolve/main/example/simple.py
- Command line
-
hf download hf://spaces/satheeshpr/Dia_TTS/example/simple.py
-
curl -L -o simple.py https://huggingface.co/spaces/satheeshpr/Dia_TTS/resolve/main/example/simple.py
397 Bytes
| from dia.model import Dia | |
| model = Dia.from_pretrained("nari-labs/Dia-1.6B", compute_dtype="float16") | |
| text = "[S1] Dia is an open weights text to dialogue model. [S2] You get full control over scripts and voices. [S1] Wow. Amazing. (laughs) [S2] Try it now on Git hub or Hugging Face." | |
| output = model.generate(text, use_torch_compile=True, verbose=True) | |
| model.save_audio("simple.mp3", output) | |