pitput
pitput (ืคึดึผืึฐืคึผืึผื) is a Hebrew take on tiny-voca: a tiny TTS model
built to run on a CPU. The whole model, vocoder included, is only 20 MB (5.0M parameters). It outputs 24 kHz
mono and runs faster than real time on a laptop CPU. It reads plain Hebrew without niqqud, in one voice with
8 delivery styles and 8 expression tags (<laugh>, <sigh>, <short pause> โฆ).
It is a personal learning project, trained from scratch on synthetic speech. Private research use only; see License.
Versions
| Version | What changed |
|---|---|
| v2 (this, November 21, 2026) | The delivery of each word is drawn instead of averaged: livelier melody and tempo, audible laughs and chuckles, pauses where a speaker would take them. More expressive training data. Cleaner whisper and breaths. Sighs and breaths tuned to the loudness and length of the data |
| v1 (November 18, 2026) | First model. Steady, somewhat robotic delivery; laughs came out as a soft breath |
v1 stays available as the v1 tag: git checkout v1, or revision="v1" in huggingface_hub.
Samples
The 10 listening texts, synthesized with the default settings (temperature 0.55, seed 0).
| Style | Text | Audio |
|---|---|---|
| default | ืืคื ื ืชืื ื ืืืฉืื ืืืจืืืืช ืืกืืืืกืืืงื, ืืืืืืกืืืช ืืฉืจืื ืืืื ืืฉื ื ืืืืจืื ื ืืืืื ืืฉืืื ืื ืืืฃ ืืืฉ. | |
| default, addressee f | ืื ืฉืืืื? ืฉืืขืชื ืฉืื ืืจืืฉืช ืืื ืืฉืืืข ืฉืขืืจ. | |
| default | ืืจืืืช ืืืืคื ืืืฆืืช ืืฉืืข ืืขืฉืจืื ืืืืืขื ืืฉืืื ื ืืืฆื, <chuckle> ืื ืืื ืืืื ืชืืืข. |
|
| excited | <laugh> ืื ื ืื ืืืืื ื, ืงืืืื ื ืืช ืืืืจื! |
|
| sad | <sigh> ืืืืืชื ืื ืื ืืขืจื, ืืืื ืคืฉืื ืื ืืืืข. |
|
| angry, addressee m | ืืื ืคืขืืื ืืืจืชื ืื ืืกืืืจ ืืช ืืืืช?! | |
| fearful | ืฉืืขืช ืืช ืื? <gasp> ืืฉ ืืืฉืื ืืืืฅ. |
|
| surprised | ืจืืข, <short pause> ืืื ืืืืช ืืชืคืืจ? ืืืจื ืขืฉืจืื ืฉื ื? |
|
| calm | <breath> ืงืื ื ืฉืืื ืขืืืงื, <long pause> ืืชื ื ืืืืฃ ืืืืจืืข ืืื ืืื. |
|
| whisper | ืืื ื ืืืจ ืืฉืงื, ืืืื ืืืจ ืืฉื ืื. |
Usage
git clone https://huggingface.co/useless-ai/pitput
cd pitput
pip install -r requirements.txt # PyTorch, Phonikud, onnxruntime, soundfile, huggingface_hub
python -m pitput.infer --style excited --text "<laugh> ืื ื ืื ืืืืื ื, ืงืืืื ื ืืช ืืืืจื!" --output out.wav
python -m pitput.infer --style default --addressee f --text "ืื ืฉืืืื? ืฉืืขืชื ืฉืื ืืจืืฉืช ืืื." --output hello.wav
On first use the Phonikud model (~300 MB) is downloaded to the Hugging Face cache. Options:
| Option | Meaning |
|---|---|
--style |
default, excited, sad, angry, fearful, surprised, calm, whisper |
--addressee m / f |
Gender of the person spoken to (ืื, ืืืชื, ืืืจืช โฆ). Without it Phonikud reads the masculine form |
--temperature |
How freely the delivery is drawn (default 0.55). Lower is steadier, higher is livelier and less predictable; above ~1 it starts to break up |
--seed |
Another seed gives another delivery of the same text (default 0). If a laugh or chuckle comes out weak, try another seed |
--text-file |
Read the text from a UTF-8 file instead of --text |
--speed |
1.0 = as trained; 0.9 is 10% slower |
--pitch-shift |
Added to log F0 (0.058 โ one semitone) |
--pitch-range |
Scales the melody around each sentence's mean pitch (default: the model's own, 1.2) |
--device |
cpu (default) or cuda |
From Python:
import soundfile as sf
from pitput.infer import CHECKPOINT, load_model, speak_text
model = load_model(CHECKPOINT) # inference.pt next to the package
wave, utterances = speak_text(model, "ืฉืืื, <sigh> ืื ืฉืืืื?", "calm", addressee="f", seed=0, temperature=0.55)
sf.write("out.wav", wave.numpy(), model.config.sample_rate)
temperature=None plays the model's own settings instead (word choices at 0.5, melody at 0.3).
What the input must look like
- Plain Hebrew in spoken form. There is no text normalizer: write numbers, dates, times, acronyms and
foreign words out in Hebrew words (
ืืฉืืข ืืขืฉืจืื, not7:20). Characters it can't read are skipped. - No niqqud needed. Phonikud vocalizes each sentence in context and adds stress; the model reads its phonemes.
- Tags go where the sound should be, in English inside the Hebrew:
<laugh>,<chuckle>,<sigh>,<breath>,<gasp>,<throat-clearing>,<short pause>,<long pause>. - Punctuation shapes the delivery (
, . ? ! โฆ). Long texts are read sentence by sentence.
Model
A fork of fiato, itself a fork of tiny-voca: a FastSpeech2-style model with a built-in differentiable source-filter vocoder, so there is no separate neural vocoder.
- Input: 47 tokens: 29 Phonikud phonemes, 5 punctuation marks, word boundary, utterance edges and the 8 expression tags. Stress is a parallel feature, not a token.
- Text encoder: 4 transformer layers, 192 channels, with the style embedding added to every token.
- Word delivery codes: each word or tag gets one of 32 learned delivery codes, chosen by a small recurrent planner from the text, the style and the previous codes. A sound tag's code comes from a table of the codes that gave full, audible renderings of that tag.
- Timing: a token-level flow (flow matching, 2 layers) draws every token's length and whether a pause follows it, for the whole sentence at once.
- Frame level: the style embedding is added again; a frame-level flow (2 layers) draws the pitch, voicing and energy contour, and 5 transformer layers predict the acoustic features.
- Vocoder: a harmonic pulse train, on voiced frames only, plus noise, each shaped by a complex cepstrum per frame.
- Sounds tuned after training: the sigh and breath directions inside the two flows were adjusted so sighs come out as loud and as long as in the data and breaths not too long.
- Size: 4,991,888 parameters at inference (20 MB checkpoint); the weights are a moving average over training. Training also uses parameters that are not in the checkpoint (discriminators, a reference encoder for the delivery codes, an auxiliary mel head).
Training data
The dataset is synthetic only, with no recorded human speech: about 73,500 clips (152 h) of one synthetic voice, of which 70,864 training clips (148 h) passed forced alignment. 160 held-out sentences (20 per style) were kept for validation and 160 for test.
Text: Hebrew sentences from news (archive, HeSum, RSS), HeDC4 web text and stories, Hebrew Wikipedia, ivrit.ai transcripts and LLM-written scenes, among them emotional, dialogue-heavy scenes written for the expressive styles and sounds.
Spoken form: an LLM rewrote numbers, dates, money, acronyms and Latin script as Hebrew words, and every answer was checked by code.
Addressee gender: an LLM decided the gender of ambiguous second-person words (ืื, ืืืชื, ืืืจืช) in context. The audio and the training phonemes follow the same decision.
Styles: an LLM picked a style for each dialogue sentence and inserted the tags; calm and whisper were assigned to plain statements, and some expressive sentences were recorded in a second style. Each style was rendered with one fixed delivery instruction; default is a bright, friendly delivery.
Style Clips synthesized default 52,576 calm 5,087 whisper 4,912 fearful 2,614 angry 2,314 sad 2,145 excited 1,936 surprised 1,888 Tags in the aligned training clips (at most 2 per clip): short pause 2,270, breath 1,627, chuckle 1,085, sigh 936, long pause 924, gasp 798, laugh 796, throat-clearing 389.
Labels: Phonikud phonemes with the addressee decisions applied, phonemized word by word with the tags at their positions. Durations come from forced alignment with facebook/wav2vec2-lv-60-espeak-cv-ft, which is used only for labeling and is not part of the model. A tag owns the sound up to the neighbouring phonemes.
Limitations
- Laughs and chuckles are not reliable. They are a few dB quieter than in the data, and some draws leave them
faint; another
--seedusually helps.<breath>is quiet. - Melody and emphasis: the melody is less varied than a human reading, and the emphasis of a sentence sometimes lands on the wrong word. Tempo changes less within a sentence than in the data.
- Temperature trades life for stability: at 0.3 and below the delivery gets flat; above ~1 words can be mispronounced and the sound can break.
- Fearful is the weakest style: many of its training clips failed alignment.
- Pronunciation follows Phonikud, including its mistakes (e.g. ืืืื read as "vaสu").
- Second person defaults to masculine unless
--addressee fis given; there is no per-word decision at inference. - One voice only. Sentences are synthesized independently, with no prosody carried between them.
License
- Code (
pitput/): Apache License 2.0. It is a fork of fiato by cfahlgren1 and tiny-voca by Muhammed Nazeem, both Apache-2.0; seeNOTICE,LICENSEandLICENSE.tiny-voca. - Weights and audio samples: private research use only, not licensed for redistribution or any commercial use.
- Phonikud (thewh1teagle/phonikud-onnx, MIT) is downloaded at first use and is not included here.
Files
| File | Contents |
|---|---|
inference.pt |
Weights, model configuration and front-end fingerprint (loaded with weights_only=True) |
pitput/ |
Inference code: infer.py (command line and speak_text), model.py, text.py (phoneme tokens), g2p.py (Phonikud and addressee gender), labels.py, config.py |
samples/ |
The audio above |
config.json, recipe.json |
Model and training settings of this version |
requirements.txt |
Python dependencies |
NOTICE, LICENSE, LICENSE.tiny-voca |
Attribution and license of the code |
Acknowledgements
tiny-voca for the architecture and training recipe, fiato for expression tags on it, Phonikud for Hebrew vocalization and phonemes, and the Hebrew text sources: HeDC4, HeSum, Hebrew Wikipedia and ivrit.ai.
- Downloads last month
- 37