f5tts-ar-habibi_unified-graphemes
A F5-TTS model by SWivid, from SWivid/Habibi-TTS/Unified, packaged for phoonnx, our ONNX text-to-speech library.
Model details
| Architecture | F5-TTS |
| Upstream | SWivid/Habibi-TTS/Unified |
| Author | SWivid |
| Languages | ar |
| Text input | characters of the text |
Size and speed
| Precision | Files | Size | Peak memory | Real-time factor |
|---|---|---|---|---|
| fp32 | model.onnx, F5_Preprocess.onnx, F5_Decode.onnx | 1,453.6 MB | 2,761 MiB | 15.771 |
| int8 | model_int8.onnx, F5_Preprocess_int8.onnx, F5_Decode_int8.onnx | 483.5 MB | 1,132 MiB | 6.968 |
The int8 files are a copy of the fp32 graphs with 8-bit integer weights. onnxruntime dynamic quantization made them from the MatMul and Gemm nodes only. The int8 voice passed the check against the fp32 voice. On the 5 check sentences, the int8 audio is 1.02 times as far from the fp32 audio as two fp32 runs are from each other (mel-cepstral distance).
Peak memory is the peak resident memory of a new process that loads the voice and says one sentence. The real-time factor is the synthesis time divided by the audio length, the median of 3 runs. A lower value is faster. Measured on an AMD Ryzen 5 7600 CPU with 4 threads.
How to use
pip install --pre phoonnx
import wave
from phoonnx.model_manager import TTSModelManager
manager = TTSModelManager()
manager.load()
manager.merge_default_voices()
voice = manager.voices["habibi/ar-unified"].load()
with wave.open("output.wav", "wb") as wav_file:
text = "..." # a sentence in ar
voice.synthesize_wav(text, wav_file)
In OVOS, phoonnx installs the ovos-tts-plugin-phoonnx plugin. Select the voice in mycroft.conf:
{"tts": {"module": "ovos-tts-plugin-phoonnx", "ovos-tts-plugin-phoonnx": {"voice": "habibi/ar-unified"}}}
Text front end
phoonnx hands the text to scriptconv, our text conversion library, which normalises it and turns it into the model's input:
graphemes:GraphemePhonemizerfromscriptconv.phonemizers.base, in scriptconv itself.
phoonnx voices
habibi/ar-unified
Licence
The upstream declares the licence cc-by-nc-sa-4.0 in the model card of SWivid/Habibi-TTS.
The licence notes for this model:
|
habibi-tts-unified/| SWivid/Habibi-TTS —Unified| Arabic (all dialects, recommended) | CC-BY-NC-SA-4.0 — non-commercial, share-alike |
Related projects
- phoonnx: runs this model, in Python and in OVOS.
- scriptconv: text normalisation, script conversion and phonemizers for phoonnx.
- The F5-TTS collection: every F5-TTS model packaged for phoonnx.