StyleTTS2
Collection
StyleTTS2 models in ONNX for phoonnx, Kitten TTS included. โข 15 items โข Updated
A StyleTTS2 model by KittenML, from KittenML/kitten-tts-mini-0.1, packaged for phoonnx, our ONNX text-to-speech library.
| Architecture | StyleTTS2 |
| Upstream | KittenML/kitten-tts-mini-0.1 |
| Author | KittenML |
| Languages | en-US |
| Text input | espeak phonemes, IPA alphabet |
pip install --pre phoonnx
The phonemes come from the espeak-ng program, so install it too (for example
apt install espeak-ng). Without it, pip install --pre "phoonnx[espeak]" gives
phoonnx the espyak port of espeak-ng. Some espyak phonemes differ from those of
espeak-ng, so the voice can say some words wrong with espyak.
import wave
from phoonnx.model_manager import TTSModelManager
manager = TTSModelManager()
manager.load()
manager.merge_default_voices()
voice = manager.voices["kittentts/mini-0.1-expr-voice-2-f"].load()
with wave.open("output.wav", "wb") as wav_file:
text = "..." # a sentence in en-US
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": "kittentts/mini-0.1-expr-voice-2-f"}}}
phoonnx hands the text to scriptconv, our text conversion library, which normalises it and turns it into the model's input:
espeak: EspeakPhonemizer from scriptconv.phonemizers.mul, installed by the scriptconv[espeak] extra.kittentts/mini-0.1-expr-voice-2-fkittentts/mini-0.1-expr-voice-2-mkittentts/mini-0.1-expr-voice-3-fkittentts/mini-0.1-expr-voice-3-mkittentts/mini-0.1-expr-voice-4-fkittentts/mini-0.1-expr-voice-4-mkittentts/mini-0.1-expr-voice-5-fkittentts/mini-0.1-expr-voice-5-mThe upstream declares the licence apache-2.0 in the model card of KittenML/kitten-tts-mini-0.1.