| --- |
| license: mit |
| language: |
| - ru |
| library_name: phoonnx |
| pipeline_tag: text-to-speech |
| tags: |
| - tts |
| - vits2 |
| - onnx |
| - phoonnx |
| - offline |
| --- |
| |
| # phoonnx-vits2 |
|
|
| Mirror of VITS2 text-to-speech checkpoints exported to ONNX for |
| [phoonnx](https://github.com/TigreGotico/phoonnx), OpenVoiceOS's offline TTS |
| library. VITS2 is a single-stage TTS architecture, an evolution of VITS that |
| improves naturalness and inference speed through adversarial duration |
| modeling and a monotonic alignment search transformer. |
|
|
| This repository holds the raw ONNX weights and `config.json` files consumed |
| by `phoonnx`'s `voice_index`; it is not meant to be browsed for voices |
| directly — use `phoonnx`'s voice manager, which resolves voice IDs to the |
| files here. |
|
|
| ## Contents |
|
|
| | Directory | Voice ID | Language | Source | |
| |---|---|---|---| |
| | `frappuccino-ru-natasha/` | `frappuccino/vits2-ru-natasha` | Russian (`ru`) | [`frappuccino/vits2_ru_natasha`](https://huggingface.co/frappuccino/vits2_ru_natasha), trained on the Natasha dataset, shared by LangSwap.app | |
|
|
| ## Usage |
|
|
| ```python |
| import wave |
| from phoonnx.model_manager import TTSModelManager |
| |
| manager = TTSModelManager() |
| manager.load() |
| manager.merge_default_voices() |
| |
| voice = manager.voices["frappuccino/vits2-ru-natasha"].load() |
| with wave.open("out.wav", "wb") as wav_file: |
| voice.synthesize_wav("Привет, как дела?", wav_file) |
| ``` |
|
|
| ## License |
|
|
| The `frappuccino-ru-natasha` checkpoint is released by its author under the |
| MIT license. The VITS2 architecture and training code (`p0p4k/vits2_pytorch`) |
| are also MIT licensed. `phoonnx` itself is Apache-2.0. |
|
|