Persian TTS: Persian (Farsi) text-to-speech
End-to-end VITS model for Persian. It is fine-tuned from the Piper _base_model
(904-speaker LibriTTS-R) and trained only on data whose license allows commercial use.
| Sample rate | 22050 Hz |
| Speakers | 7 (config.json / speakers.json) |
| Training steps | 120000 |
| Formats | PyTorch (generator.safetensors), ONNX (onnx/model.onnx), TensorFlow SavedModel + TFLite (tf/) |
| Text input | espeak-ng fa IPA phonemes, Piper phoneme table (espeak-ng is GPL-3.0 and needed at inference) |
Usage (ONNX)
import numpy as np, onnxruntime as ort, soundfile as sf
from persian_tts.text import get_frontend # from the training repository
_, encode = get_frontend("phonemes")
ids = np.array([encode("سلام، به دنیای گفتار فارسی خوش آمدید.")], dtype=np.int64)
sess = ort.InferenceSession("onnx/model.onnx")
audio = sess.run(None, {"input": ids, "input_lengths": np.array([ids.shape[1]]),
"scales": np.array([0.667, 1.0, 0.8], dtype=np.float32), "sid": np.array([0])})[0]
sf.write("out.wav", audio[0, 0], 22050)
scales = [noise_scale, length_scale (>1 is slower), unused]. The I/O follows the Piper ONNX convention.
Training data
| Corpus | License | Hours |
|---|---|---|
| fleurs | CC-BY-4.0 | 7.1 |
| gptinformal | CC0-1.0 | 6.1 |
| mana_tts | CC0-1.0 | 98.26 |
| persian_speech | MIT | 0.37 |
Pretrained initialization
- rhasspy/piper-checkpoints
_base_model(MIT), trained on LibriTTS-R (CC-BY-4.0). - Persian Piper voices derived from the lessac voice were not used (Blizzard 2013 research-only license).
License and attribution
The weights are released under CC-BY-4.0, which allows commercial use with attribution. Attribution is required for LibriTTS-R (Zen et al., Koizumi et al.) and, if it was used, FLEURS (Conneau et al., Google). The other corpora are CC0 or MIT. Check that the license fits your use case before deploying.
Limitations
Persian script omits short vowels, so the model infers them from context. Rare words, names and ambiguous homographs may be mispronounced; adding diacritics (fatha/kasra/damma) to the input helps.
Attribution (required)
This model is released under CC-BY-4.0: you may use it commercially, modify it and redistribute it, provided you credit the author. Attribution is a condition of the licence, not a courtesy.
Persian VITS TTS — created by Ali Fathi (https://github.com/alifthi)
@misc{persian_tts_2026,
author = {Ali Fathi},
title = {Persian TTS: a Persian (Farsi) VITS text-to-speech model},
year = {2026},
howpublished = {\url{https://huggingface.co/alifthi/persian-tts}},
note = {Licensed CC-BY-4.0}
}
If you ship this voice in a product, keep the credit line somewhere a user can find it (about screen, docs, or model credits).
- Downloads last month
- 33