styletts2-kokoro-82m

A StyleTTS2 model by hexgrad, from hexgrad/Kokoro-82M, packaged for phoonnx, our ONNX text-to-speech library.

Model details

Architecture StyleTTS2
Upstream hexgrad/Kokoro-82M
ONNX conversion onnx-community/Kokoro-82M-v1.0-ONNX
Author hexgrad
Languages en-GB, en-US, es, fr, hi, it, ja-JP, pt-BR, zh
Text input espeak phonemes, IPA alphabet; misaki_en phonemes, IPA alphabet; misaki_ja phonemes, IPA alphabet; misaki_zh phonemes, IPA alphabet

How to use

pip install --pre phoonnx "scriptconv[misaki]"

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["kokoro/af"].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": "kokoro/af"}}}

Text front end

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.
  • misaki_en: MisakiEnPhonemizer from scriptconv.phonemizers.mul, installed by the scriptconv[misaki] extra.
  • misaki_ja: MisakiJaPhonemizer from scriptconv.phonemizers.mul, installed by the scriptconv[misaki] extra.
  • misaki_zh: MisakiZhPhonemizer from scriptconv.phonemizers.mul, installed by the scriptconv[misaki] extra.

phoonnx voices

  • kokoro/af
  • kokoro/af_alloy
  • kokoro/af_aoede
  • kokoro/af_bella
  • kokoro/af_heart
  • kokoro/af_jessica
  • kokoro/af_kore
  • kokoro/af_nicole
  • kokoro/af_nova
  • kokoro/af_river
  • kokoro/af_sarah
  • kokoro/af_sky
  • kokoro/am_adam
  • kokoro/am_echo
  • kokoro/am_eric
  • kokoro/am_fenrir
  • kokoro/am_liam
  • kokoro/am_michael
  • kokoro/am_onyx
  • kokoro/am_puck
  • kokoro/am_santa
  • kokoro/bf_alice
  • kokoro/bf_emma
  • kokoro/bf_isabella
  • kokoro/bf_lily
  • kokoro/bm_daniel
  • kokoro/bm_fable
  • kokoro/bm_george
  • kokoro/bm_lewis
  • kokoro/ef_dora
  • kokoro/em_alex
  • kokoro/em_santa
  • kokoro/ff_siwis
  • kokoro/hf_alpha
  • kokoro/hf_beta
  • kokoro/hm_omega
  • kokoro/hm_psi
  • kokoro/if_sara
  • kokoro/im_nicola
  • kokoro/jf_alpha
  • kokoro/jf_gongitsune
  • kokoro/jf_nezumi
  • kokoro/jf_tebukuro
  • kokoro/jm_kumo
  • kokoro/pf_dora
  • kokoro/pm_alex
  • kokoro/pm_santa
  • kokoro/zf_xiaobei
  • kokoro/zf_xiaoni
  • kokoro/zf_xiaoxiao
  • kokoro/zf_xiaoyi
  • kokoro/zm_yunjian
  • kokoro/zm_yunxi
  • kokoro/zm_yunxia
  • kokoro/zm_yunyang

Licence

The upstream declares the licence apache-2.0 in the model card of hexgrad/Kokoro-82M.

Related projects

  • phoonnx: runs this model, in Python and in OVOS.
  • scriptconv: text normalisation, script conversion and phonemizers for phoonnx.
  • The StyleTTS2 collection: every StyleTTS2 model packaged for phoonnx.
Downloads last month
26
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including Phoonnx/styletts2-kokoro-82m