expressive tts that can clone any voice
git clone https://github.com/smallbraineng/smalltts && cd smalltts
uv run python src/scripts/tryme.py "Hello from smallTTS!"
uses uv for setup.
uv run python src/scripts/infer/interactive.py
uv pip install "git+https://github.com/smallbraineng/smalltts"
from smalltts import SmallTTS
tts = SmallTTS()
uv run python src/scripts/infer/batch.py
uv run python src/scripts/infer/clone.py \
--wav assets/test_audio/1.wav \
--transcription "the reference transcription here" \
--text "what you want it to say"
| prompt | original | generated |
|---|---|---|
that joke is good [laughter] [laughter] and i cannot stop laughing. | wav | wav |
new episodes drop every friday at nine in the evening. | wav | wav |
wow [gasp] i did not expect that [laughter]. | wav | wav |
i think i am getting a cold [sniff] [sniff]. | wav | wav |
okay [cough] that was rough [sigh] but we are still going. | wav | wav |
nvidia t4, rust onnx server, cuda execution provider:
| duration | batch=1 | batch=2 | batch=4 | batch=8 |
|---|---|---|---|---|
| 2s | 166.5ms (0.083x) | 332.0ms (0.083x) | 666.0ms (0.083x) | 1333.1ms (0.083x) |
| 5s | 217.7ms (0.043x) | 434.8ms (0.043x) | 873.9ms (0.043x) | 1752.6ms (0.043x) |
| 10s | 315.2ms (0.032x) | 627.4ms (0.031x) | 1267.0ms (0.032x) | 2537.5ms (0.032x) |
RTF scales linearly with batch size. run cargo run --release --bin bench in src/server/ to benchmark on your hardware.
dmd2 · dmdspeech · f5‑tts · echo tts
checkpoints live on huggingface: smallbraineng/smalltts.
| name | download |
|---|---|
| teacher_checkpoints | assets/teacher_checkpoints |
| dmd_checkpoints | assets/dmd_checkpoints |
| asr_checkpoints | assets/asr_checkpoints |
| sv_checkpoints | assets/sv_checkpoints |
from-scratch training order, in src/scripts/train:
uv run accelerate launch src/scripts/train/teacher.pyuv run accelerate launch src/scripts/train/dmd2/distill.pyuv run accelerate launch src/scripts/train/dmd2/sv.pyuv run accelerate launch src/scripts/train/dmd2/asr.pyuse onnx exports for production inference. models download automatically from huggingface on first run.
| model | path |
|---|---|
| condition encoder | assets/dmd/condition_encoder.onnx |
| denoiser (4 steps) | assets/dmd/denoiser.onnx |
| codec encoder | assets/codec/encoder.onnx |
| codec decoder | assets/codec/decoder.onnx |
see src/smalltts/infer/onnx.py for the python api, or use the scripts above.
a rust inference server lives in src/server/. uses axum + onnx runtime, with x402 payment gating.
cd src/server
PAYMENT_ADDRESS=0x... cargo run --release
endpoint: POST /synthesize?duration=N with multipart form (audio + text). returns audio/wav. gated by x402 -- clients pay $0.05/min of generated audio in USDC on Base.
a web frontend lives in src/website/ (vite + react + privy for wallet connection).
cd src/website
bun install && bun run dev
code is licensed under CC-BY-NC. see LICENSE.
model weights on huggingface are licensed CC‑BY‑NA.
thanks to the authors and communities of dmdspeech, nanospeech, f5‑tts, echo tts, and vibevoice — this repo is heavily inspired by their ideas and codebases.
@article{peng2025vibevoice,
title = {VibeVoice Technical Report},
author = {Zhiliang Peng and Jianwei Yu and Wenhui Wang and Yaoyao Chang and Yutao Sun and Li Dong and Yi Zhu and Weijiang Xu and Hangbo Bao and Zehua Wang and Shaohan Huang and Yan Xia and Furu Wei},
year = {2025},
eprint = {2508.19205},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
doi = {10.48550/arXiv.2508.19205},
url = {https://arxiv.org/abs/2508.19205}
}
@article{li2024dmdspeech,
title = {DMDSpeech: Distilled Diffusion Model Surpassing the Teacher in Zero-shot Speech Synthesis via Direct Metric Optimization},
author = {Yinghao Aaron Li and Rithesh Kumar and Zeyu Jin},
year = {2024},
eprint = {2410.11097},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
doi = {10.48550/arXiv.2410.11097},
url = {https://arxiv.org/abs/2410.11097}
}
@article{yin2024dmd2,
title = {Improved Distribution Matching Distillation for Fast Image Synthesis},
author = {Tianwei Yin and Micha{\"e}l Gharbi and Taesung Park and Richard Zhang and Eli Shechtman and Fredo Durand and William T. Freeman},
year = {2024},
eprint = {2405.14867},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
doi = {10.48550/arXiv.2405.14867},
url = {https://arxiv.org/abs/2405.14867}
}
@article{li2025dmospeech2,
title = {DMOSpeech 2: Reinforcement Learning for Duration Prediction in Metric-Optimized Speech Synthesis},
author = {Yinghao Aaron Li and Xilin Jiang and Fei Tao and Cheng Niu and Kaifeng Xu and Juntong Song and Nima Mesgarani},
year = {2025},
eprint = {2507.14988},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
doi = {10.48550/arXiv.2507.14988},
url = {https://arxiv.org/abs/2507.14988}
}
@article{chen2024f5tts,
title = {F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching},
author = {Yushen Chen and Zhikang Niu and Ziyang Ma and Keqi Deng and Chunhui Wang and Jian Zhao and Kai Yu and Xie Chen},
year = {2024},
eprint = {2410.06885},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
doi = {10.48550/arXiv.2410.06885},
url = {https://arxiv.org/abs/2410.06885}
}
@misc{newman2025nanospeech,
title = {Nanospeech: A simple, hackable text-to-speech system in PyTorch and MLX},
author = {Lucas Newman},
year = {2025},
note = {GitHub repository},
howpublished = {\url{https://github.com/lucasnewman/nanospeech}}
}
@article{eskimez2024e2tts,
title = {E2 TTS: Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS},
author = {Sefik Emre Eskimez and Xiaofei Wang and Manthan Thakker and Canrun Li and Chung-Hsien Tsai and Zhen Xiao and Hemin Yang and Zirun Zhu and Min Tang and Xu Tan and Yanqing Liu and Sheng Zhao and Naoyuki Kanda},
year = {2024},
eprint = {2406.18009},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
doi = {10.48550/arXiv.2406.18009},
url = {https://arxiv.org/abs/2406.18009}
}
@misc{darefsky2025echo,
title = {Echo: Diffusion-based text-to-speech with fast, high-fidelity voice cloning},
author = {Jordan Darefsky},
year = {2025},
howpublished = {\url{https://jordandare.github.io/blog/2025/echo/}}
}
@article{zhu2025zipvoice,
title = {ZipVoice: Fast and High-Quality Zero-Shot Text-to-Speech with Flow Matching},
author = {Han Zhu and Wei Kang and Zengwei Yao and Liyong Guo and Fangjun Kuang and Zhaoqing Li and Weiji Zhuang and Long Lin and Daniel Povey},
year = {2025},
eprint = {2506.13053},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
doi = {10.48550/arXiv.2506.13053},
url = {https://arxiv.org/abs/2506.13053}
}
Python
68.4%
Rust
22.2%
TypeScript
9.2%
expressive tts that can clone any voice
git clone https://github.com/smallbraineng/smalltts && cd smalltts
uv run python src/scripts/tryme.py "Hello from smallTTS!"
uses uv for setup.
uv run python src/scripts/infer/interactive.py
uv pip install "git+https://github.com/smallbraineng/smalltts"
from smalltts import SmallTTS
tts = SmallTTS()
uv run python src/scripts/infer/batch.py
uv run python src/scripts/infer/clone.py \
--wav assets/test_audio/1.wav \
--transcription "the reference transcription here" \
--text "what you want it to say"
| prompt | original | generated |
|---|---|---|
that joke is good [laughter] [laughter] and i cannot stop laughing. | wav | wav |
new episodes drop every friday at nine in the evening. | wav | wav |
wow [gasp] i did not expect that [laughter]. | wav | wav |
i think i am getting a cold [sniff] [sniff]. | wav | wav |
okay [cough] that was rough [sigh] but we are still going. | wav | wav |
nvidia t4, rust onnx server, cuda execution provider:
| duration | batch=1 | batch=2 | batch=4 | batch=8 |
|---|---|---|---|---|
| 2s | 166.5ms (0.083x) | 332.0ms (0.083x) | 666.0ms (0.083x) | 1333.1ms (0.083x) |
| 5s | 217.7ms (0.043x) | 434.8ms (0.043x) | 873.9ms (0.043x) | 1752.6ms (0.043x) |
| 10s | 315.2ms (0.032x) | 627.4ms (0.031x) | 1267.0ms (0.032x) | 2537.5ms (0.032x) |
RTF scales linearly with batch size. run cargo run --release --bin bench in src/server/ to benchmark on your hardware.
dmd2 · dmdspeech · f5‑tts · echo tts
checkpoints live on huggingface: smallbraineng/smalltts.
| name | download |
|---|---|
| teacher_checkpoints | assets/teacher_checkpoints |
| dmd_checkpoints | assets/dmd_checkpoints |
| asr_checkpoints | assets/asr_checkpoints |
| sv_checkpoints | assets/sv_checkpoints |
from-scratch training order, in src/scripts/train:
uv run accelerate launch src/scripts/train/teacher.pyuv run accelerate launch src/scripts/train/dmd2/distill.pyuv run accelerate launch src/scripts/train/dmd2/sv.pyuv run accelerate launch src/scripts/train/dmd2/asr.pyuse onnx exports for production inference. models download automatically from huggingface on first run.
| model | path |
|---|---|
| condition encoder | assets/dmd/condition_encoder.onnx |
| denoiser (4 steps) | assets/dmd/denoiser.onnx |
| codec encoder | assets/codec/encoder.onnx |
| codec decoder | assets/codec/decoder.onnx |
see src/smalltts/infer/onnx.py for the python api, or use the scripts above.
a rust inference server lives in src/server/. uses axum + onnx runtime, with x402 payment gating.
cd src/server
PAYMENT_ADDRESS=0x... cargo run --release
endpoint: POST /synthesize?duration=N with multipart form (audio + text). returns audio/wav. gated by x402 -- clients pay $0.05/min of generated audio in USDC on Base.
a web frontend lives in src/website/ (vite + react + privy for wallet connection).
cd src/website
bun install && bun run dev
code is licensed under CC-BY-NC. see LICENSE.
model weights on huggingface are licensed CC‑BY‑NA.
thanks to the authors and communities of dmdspeech, nanospeech, f5‑tts, echo tts, and vibevoice — this repo is heavily inspired by their ideas and codebases.
@article{peng2025vibevoice,
title = {VibeVoice Technical Report},
author = {Zhiliang Peng and Jianwei Yu and Wenhui Wang and Yaoyao Chang and Yutao Sun and Li Dong and Yi Zhu and Weijiang Xu and Hangbo Bao and Zehua Wang and Shaohan Huang and Yan Xia and Furu Wei},
year = {2025},
eprint = {2508.19205},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
doi = {10.48550/arXiv.2508.19205},
url = {https://arxiv.org/abs/2508.19205}
}
@article{li2024dmdspeech,
title = {DMDSpeech: Distilled Diffusion Model Surpassing the Teacher in Zero-shot Speech Synthesis via Direct Metric Optimization},
author = {Yinghao Aaron Li and Rithesh Kumar and Zeyu Jin},
year = {2024},
eprint = {2410.11097},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
doi = {10.48550/arXiv.2410.11097},
url = {https://arxiv.org/abs/2410.11097}
}
@article{yin2024dmd2,
title = {Improved Distribution Matching Distillation for Fast Image Synthesis},
author = {Tianwei Yin and Micha{\"e}l Gharbi and Taesung Park and Richard Zhang and Eli Shechtman and Fredo Durand and William T. Freeman},
year = {2024},
eprint = {2405.14867},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
doi = {10.48550/arXiv.2405.14867},
url = {https://arxiv.org/abs/2405.14867}
}
@article{li2025dmospeech2,
title = {DMOSpeech 2: Reinforcement Learning for Duration Prediction in Metric-Optimized Speech Synthesis},
author = {Yinghao Aaron Li and Xilin Jiang and Fei Tao and Cheng Niu and Kaifeng Xu and Juntong Song and Nima Mesgarani},
year = {2025},
eprint = {2507.14988},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
doi = {10.48550/arXiv.2507.14988},
url = {https://arxiv.org/abs/2507.14988}
}
@article{chen2024f5tts,
title = {F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching},
author = {Yushen Chen and Zhikang Niu and Ziyang Ma and Keqi Deng and Chunhui Wang and Jian Zhao and Kai Yu and Xie Chen},
year = {2024},
eprint = {2410.06885},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
doi = {10.48550/arXiv.2410.06885},
url = {https://arxiv.org/abs/2410.06885}
}
@misc{newman2025nanospeech,
title = {Nanospeech: A simple, hackable text-to-speech system in PyTorch and MLX},
author = {Lucas Newman},
year = {2025},
note = {GitHub repository},
howpublished = {\url{https://github.com/lucasnewman/nanospeech}}
}
@article{eskimez2024e2tts,
title = {E2 TTS: Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS},
author = {Sefik Emre Eskimez and Xiaofei Wang and Manthan Thakker and Canrun Li and Chung-Hsien Tsai and Zhen Xiao and Hemin Yang and Zirun Zhu and Min Tang and Xu Tan and Yanqing Liu and Sheng Zhao and Naoyuki Kanda},
year = {2024},
eprint = {2406.18009},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
doi = {10.48550/arXiv.2406.18009},
url = {https://arxiv.org/abs/2406.18009}
}
@misc{darefsky2025echo,
title = {Echo: Diffusion-based text-to-speech with fast, high-fidelity voice cloning},
author = {Jordan Darefsky},
year = {2025},
howpublished = {\url{https://jordandare.github.io/blog/2025/echo/}}
}
@article{zhu2025zipvoice,
title = {ZipVoice: Fast and High-Quality Zero-Shot Text-to-Speech with Flow Matching},
author = {Han Zhu and Wei Kang and Zengwei Yao and Liyong Guo and Fangjun Kuang and Zhaoqing Li and Weiji Zhuang and Long Lin and Daniel Povey},
year = {2025},
eprint = {2506.13053},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
doi = {10.48550/arXiv.2506.13053},
url = {https://arxiv.org/abs/2506.13053}
}
Python
68.4%
Rust
22.2%
TypeScript
9.2%