Instructions to use mehdi-hf/cilla-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Pocket-TTS
How to use mehdi-hf/cilla-mini with Pocket-TTS:
from pocket_tts import TTSModel import scipy.io.wavfile tts_model = TTSModel.load_model("mehdi-hf/cilla-mini") voice_state = tts_model.get_state_for_audio_prompt( "hf://kyutai/tts-voices/alba-mackenna/casual.wav" ) audio = tts_model.generate_audio(voice_state, "Hello world, this is a test.") # Audio is a 1D torch tensor containing PCM data. scipy.io.wavfile.write("output.wav", tts_model.sample_rate, audio.numpy()) - Notebooks
- Google Colab
- Kaggle
Cilla Mini: Persian text to speech (18.2M)
Gated, non-commercial (CC BY-NC 4.0): ask for access on this page. Cilla Mini is the 18M model for CPUs, phones and browsers: Cilla shrunk with Kyutai's small-model recipe (8 layers, a 64-dim interface, a one-step drifting sampler head, the 2.6M Mimi decoder), guidance baked in. It speaks Persian in the voice of a short audio prompt. Built on Pocket TTS by Kyutai.
Try it in your browser · Run it on a Mac · Phonon runtime · Browser library · Python package
| parameters used for generation | 18.2M = 15.6M flow language model (8 layers, with the sampler head) + 2.6M Mimi decoder. The file holds 27.9M: the other 9.7M is the Mimi encoder, which runs once per voice prompt |
| sample rate | 24 kHz, mono |
| language | Persian (fa) |
| weights | model.safetensors, 107 MB (the Pocket TTS format); phonon/model/model.safetensors is the same model laid out for the Phonon runtime |
| sibling | mehdi-hf/cilla-lite: Cilla Lite, 100M |
Speed
Audio made per second of work ("real time" is 1x):
| Where | Speed |
|---|---|
Python (pocket-tts), one thread of a cloud x86 CPU (Intel(R) Xeon(R) CPU @ 2.80GHz) |
3.79x |
Phonon runtime ptts, one core of an Apple M1 Pro |
about 12 to 23x (first audio in 30 to 95 ms) |
| In a browser tab (WebAssembly), Chrome on an M1 Pro | about 9 to 17x (short texts are at the slow end) |
Use
Python (the pocket-tts package)
pip install "pocket-tts>=4.0.1" # the released package
hf auth login # the repo is gated: ask for access on its page first
hf download mehdi-hf/cilla-mini --exclude "model.safetensors" "phonon/*" --local-dir cilla-mini && cd cilla-mini # the code, prompts and config
python speak_fa.py --voice prompts/parisa.wav --text "سلام، حال شما چطور است؟" --out hello.wav # fetches the weights once
speak_fa.py normalises the text, speaks one sentence at a time from the same prompt, trims the silence each piece
opens with and joins them with a short pause. Do the same in your own code: cutting a sentence into 50-token pieces (the
old Pocket TTS default) made these models repeat words, once the name «ساندر پیچای» twice in a row.
The released package is enough (pocket-tts 4.0.1 or newer, checked for this repo). config.yaml sets capitalize_first_letter,
append_terminal_punctuation and pad_with_spaces_for_short_inputs to false: leave them, otherwise the package upper-cases or drops
the first letters of Persian text.
On a Mac, fast: the Phonon runtime
The phonon/ folder has the model for the Phonon runtime (Rust, no PyTorch, no GPU) and the same Persian front-end. Apple silicon:
hf download mehdi-hf/cilla-mini --include "phonon/*" --local-dir cilla-mini
cd cilla-mini/phonon
bash setup.sh # once: downloads the official runtime and the browser library, checks their checksums
bash try_it.sh # four demo clips into out/
python3 say_fa.py --voice parisa --text "سلام، این یک آزمایش است." --out out/mine.wav --play
bash run_web.sh # a web page with captions: http://127.0.0.1:8777
Details, options and notes: phonon/README.md.
In a browser
The demo Space mehdi-hf/cilla-mini-demo runs the model inside the tab (WebAssembly, the phonon-tts library): the text is not sent anywhere, and the page asks before it downloads the 107 MB, which the browser then keeps. Open it in its own tab for the multi-threaded mode. Tick "Stream while generating" and the first sound plays about 20 ms after Speak, each 80 ms chunk the moment it is made. The same page runs from phonon/run_web.sh, and phonon/web/persian.js is the JavaScript port of the Persian text steps for your own web app.
Text
Write ordinary Persian with punctuation: commas and full stops shape the phrasing. The model reads the ezafe from the context (there are no ezafe marks to type); it still gets some wrong.
Voices
The voice is cloned from a prompt: a whole short clip (3 to 10 s) that ends at a pause, in a quiet room. Prompts cut
mid-word make the model sound broken. prompts/ has parisa.wav, the voice of Parisa (recorded by her and used here with her agreement), and two neutral ones, voice1.wav (a woman) and voice2.wav (a man).
In the check, every clip made from each of them was closest to that prompt, so the model answers in the voice you give it.
Samples
Made with speak_fa.py: Parisa's voice is prompts/parisa.wav, the female voice is prompts/voice1.wav, the male voice is prompts/voice2.wav.
News
| Voice | Sample |
|---|---|
| Parisa | |
| Female | |
| Male |
بر اساس گزارش سازمان هواشناسی، بارش باران و برف در بیشتر استانهای شمالی و غربی کشور تا پایان هفته ادامه خواهد داشت. از رانندگان خواسته شده است که در جادههای کوهستانی با احتیاط بیشتری حرکت کنند و زنجیر چرخ همراه داشته باشند.
Story
| Voice | Sample |
|---|---|
| Parisa | |
| Female | |
| Male |
پیرمرد از پنجرهی کوچک اتاق به کوچه نگاه کرد. باران ریزی میبارید و چراغهای زرد خیابان روی آسفالت خیس میدرخشیدند. آهی کشید و با خودش گفت که این شهر دیگر شهر روزهای جوانیاش نیست.
Names and technology
| Voice | Sample |
|---|---|
| Parisa | |
| Female | |
| Male |
شرکت گوگل در ماه گذشته از نسخهی تازهای از مدل هوش مصنوعی خود رونمایی کرد. مدیرعامل این شرکت، ساندر پیچای، در سخنرانی خود در شهر سانفرانسیسکو گفت که این مدل میتواند متن، تصویر و صدا را با هم بفهمد و در بیش از صد زبان، از جمله فارسی، پاسخ دهد.
Evaluation
Recognition by a Persian ASR on real recordings, voices cloned from other clips of the same speaker (step 100,000, EMA; the guidance is built in). The ASR itself scores 8.6% word error on the real recordings, so that is the floor.
| real recordings, WER | 10.4% |
| real recordings, CER | 3.9% |
| speaker similarity | 0.953 |
These measure intelligibility and a coarse speaker match; they do not show whether a particular voice is reproduced (see Voices) or how often the ezafe is right, which needs listening.
Intended use
Speech on the user's own device: offline and private assistants, screen readers and other accessibility tools, games, and apps that cannot wait for a cloud round trip. Run on a Mac or in a browser tab, nothing leaves the device.
Limitations
- Persian only. Ezafe mistakes happen, mostly on rare words and in long noun phrases.
- Only Persian script is spoken:
speak_fa.pydrops English (Latin-script) words and other foreign characters, such as emoji, from the text without a warning, so write names and terms in Persian letters (for example «گوگل» for Google). Digits are read as Persian words. - Voice cloning is not exact; it follows the prompt's timbre and style, not every detail.
- Long text must be spoken sentence by sentence (above), or words are repeated or lost.
- The Phonon files (
phonon/) hold three voices, and the runtime's own voice cloning cannot be used with this model; a new voice needs the Python tools. - Speech made with it should be labelled as synthetic; do not clone a voice without the person's consent.
Licence and credits
CC BY-NC 4.0: non-commercial use only. Commercial use needs a separate licence: mehdi@oncillaai.com.
Built on Pocket TTS by Kyutai (kyutai-labs/pocket-tts); the Mimi codec and the 2.6M decoder this model uses are Kyutai's.
- Downloads last month
- -