Add README.md (v0.2.1)
Browse files10 unmodified lines111213141415161726 unmodified lines444546474849505 unmodified lines5657585960616281 unmodified lines14414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418510 unmodified linesdatasets:- abdullah/tiny-voca-ar-v2-r3---# tiny-voca-ar v0.2.0# tiny-voca-ar v0.2.1
tiny-voca-ar is a small Modern Standard Arabic text-to-speech model with 4,537,867 parameters and two voices,`7003`, `7001`. It is an Arabic port of [tiny-voca](https://github.com/n4ze3m/tiny-voca) by Muhammed Nazeem26 unmodified lines| `tiny-voca-ar.pt` | PyTorch inference checkpoint, float32 || `onnx/model.onnx` | ONNX export, checked against the PyTorch model || `onnx/model-optimized.onnx` | Faster ONNX export with the same audio (see [ONNX](#onnx)). Added after v0.2.0, so it is on `main` and not in the `v0.2.0` tag || `onnx/vocos.onnx` | Optional waveform post-filter (Vocos), 16.7 MB. See [Post-filter](#post-filter) || `config.json` | Model settings, phoneme inventory, voices || `code/tiny_voca_ar-0.2.0-py3-none-any.whl` | The `tiny_voca` Python package (front end, model, inference) at the commit that trained this model || `samples/` | The audio on this page |5 unmodified lines- `tiny-voca-ar.pt`: `ff6740b2b52f04105277eef21e9e28823cbe80fc00ac65aacbddf09657a06a7c`- `onnx/model.onnx`: `3f065f5ed0d2f7b932dea86dba3de111ad5b1d24b29b3ab34b138fa9c72d6d89`- `onnx/model-optimized.onnx`: `d4fef7050cdfc63969cae340a7d139652d51b1bcf2bc4973cc66f7076f82fe44`- `onnx/vocos.onnx`: `417f2413163d666b23a89dd73b1829a34ac316fb524a02cc6a4120660a40e6eb`
## Samples
81 unmodified lines
The graph reads one sentence at a time, at most 512 phonemes.
## Post-filter
The TTS model's own waveform head buzzes on voiced sounds. `onnx/vocos.onnx` isan optional second stage that replaces the waveform with a Vocos reconstructionof it. The TTS weights, `onnx/model.onnx`, and the text pipeline do not change.
| Voice | High-band HNR, TTS only | with the filter | UTMOS, TTS only | with the filter ||---|---:|---:|---:|---:|| 7001 | 3.19 dB | 1.20 dB | 2.12 | 3.15 || 7003 | 8.21 dB | 5.99 dB | 2.81 | 3.43 |
Both voices move toward the recordings. The filter costs 25 to 50% more synthesistime: 10.5x real time in Chrome against 22.6x without it, on four threads.
It takes the waveform and three fixed STFT kernels, so the kernels stay out ofthe int8 weights:
```pythonimport onnxruntime as ortfrom tiny_voca.vocos_filter import stft_kernels
vocos = ort.InferenceSession("tiny-voca-ar/onnx/vocos.onnx", providers=["CPUExecutionProvider"])filtered = vocos.run(None, {"audio": audio[0][None], **stft_kernels()})[0][0]sf.write("hello-filtered.wav", filtered, 24000)```
`stft_kernels()` builds the three constant kernels the graph expects. To filtera file or a folder instead, run `scripts/filter_audio.py` from the repository.
The filter is apptor's German fine-tune of `charactr/vocos-mel-24khz` (MIT). Itis not Arabic-trained. An Arabic fine-tune was trained on this model's 10,828teacher-forced pairs and rejected by ear; it is published as`onnx/vocos-phase1-experimental.onnx` (54.4 MB) for reference only. The reasoneach candidate failed is in[docs/vocos-failed-experiments.md](https://github.com/abodacs/tiny-voca-ar/blob/main/docs/vocos-failed-experiments.md).
## Evaluation
The student and its teacher read the same 43 sentences of the fixed eval set (`tiny_voca.evalset`: short,README.md+39-1