phone pg
A small, on-device English text-to-speech voice, built to narrate essays on a
phone with no server and no GPU.
- Architecture: VITS (Piper), exported to ONNX
- Size: ~61 MB · Sample rate: 22.05 kHz · Speakers: 1
- Phonemes: espeak-ng (
en-us)
- Training: warm-started from a Piper English base checkpoint and fine-tuned
for 60,000 steps on 3,847 utterances
- Runs on: CPU only — comfortably faster than real time on a laptop, and fast
enough on a mid-range phone
Important: this is a synthetic voice
This voice imitates the reading style of essayist Paul Graham. Two things are
worth stating plainly:
- It was not trained on his recordings. The training audio was itself
generated by a different zero-shot TTS model. So this is an imitation of an
imitation — it is not, and does not contain, his actual recorded speech.
- He has no involvement in this project and has not endorsed it.
Do not use this model to impersonate anyone, to attribute words to a person who
did not say them, or to produce audio intended to be mistaken for a real
recording. Label output as synthetic wherever it is published.
Usage
With
sherpa-onnx (works on desktop,
Android and iOS):
1import sherpa_onnx
2
3tts = sherpa_onnx.OfflineTts(
4 sherpa_onnx.OfflineTtsConfig(
5 model=sherpa_onnx.OfflineTtsModelConfig(
6 vits=sherpa_onnx.OfflineTtsVitsModelConfig(
7 model="phonepg.onnx",
8 tokens="tokens.txt",
9 data_dir="espeak-ng-data", # ships with sherpa-onnx
10 ),
11 num_threads=2,
12 provider="cpu",
13 )
14 )
15)
16
17audio = tts.generate("Text to read aloud.", sid=0, speed=1.0)
The ONNX file carries the metadata sherpa-onnx expects (sample_rate, voice,
has_espeak, …). tokens.txt contains only single-codepoint phonemes, since
that is what sherpa-onnx's Piper lexicon accepts — the multi-codepoint diphthong
entries in the original Piper config are never emitted by espeak and are omitted.
For the standard Piper runtime, use phonepg.onnx with phonepg.onnx.json.
Files
| file | what it is |
|---|
phonepg.onnx | the model, with runtime metadata embedded |
phonepg.onnx.json | Piper config: phoneme map and inference defaults |
tokens.txt | phoneme → id table for sherpa-onnx |
sample-billionaires-build-60k.wav | ~17 s of output from this checkpoint |
The sample reads the opening few sentences of Paul Graham's essay
"Billionaires Build" — a short excerpt used to
demonstrate the voice. The text is his and remains his; read it at the link.
Hear it on full essays
Narrated essays are being published here:
They go up one at a time, every day — each one is watched end to end before
it is published, so the whole catalogue is not there yet and the list keeps
growing. If the essay you want is missing, it is probably still in the queue.
(Those videos are narrated with a larger model; this repo is the small one that
runs on a phone. Both are synthetic — see the note above.)
Known limitations
- Pacing is uneven. Speaking rate varies more than it should within and
between sentences. It improved markedly from 10k to 60k steps but is not
solved, and is the main reason to prefer a later checkpoint.
- Single speaker, English only, no emotion or style control.
- Long inputs should be split into sentences; quality degrades on very long ones.
Licence
MIT, following the Piper base checkpoint it was fine-tuned from. The licence
covers the model weights; it is not permission to impersonate anyone.