Metadata-Version: 2.4
Name: tts_uk
Version: 1.2.1
Summary: RAD-TTS++ for Ukrainian
Project-URL: homepage, https://github.com/egorsmkv/tts_uk
Project-URL: repository, https://github.com/egorsmkv/tts_uk
Author-email: Yehor Smoliakov <egorsmkv@gmail.com>
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: huggingface-hub>=0.29
Requires-Dist: librosa>=0.10
Requires-Dist: numba>=0.60
Requires-Dist: scipy>=1
Requires-Dist: torch>=2.2
Requires-Dist: torchaudio>=2.2
Provides-Extra: dev
Requires-Dist: ruff>=0.9; extra == 'dev'
Description-Content-Type: text/markdown

# Text-to-Speech for Ukrainian

Check out our demo on [Hugging Face space](https://huggingface.co/spaces/Yehor/radtts-uk-vocos-demo).

## Notes

- Multispeaker: 2 female + 1 male voices;
- Tested on **Windows** and **WSL**.

## Install

```shell
# from PyPI
pip install tts-uk

# from GitHub
pip install git+https://github.com/egorsmkv/tts_uk

# using GitHub
git clone https://github.com/egorsmkv/tts_uk
cd tts_uk
uv sync
```

Read [uv's installation](https://github.com/astral-sh/uv?tab=readme-ov-file#installation) section.

Also, you can [download the repository](https://github.com/egorsmkv/tts_uk/archive/refs/heads/main.zip) as a ZIP archive.

## Google Colabs

- [CPU inference](https://colab.research.google.com/drive/1dsQiVhTaNw5lRfUiCZeECMuEbtEEYqbZ?usp=sharing)
- [GPU inference](https://colab.research.google.com/drive/1sdCPnZJRNAf12PhPut4gu6T_o6lYaUdo?usp=sharing)

## Example

As the code:

```python
import torchaudio

from tts_uk.inference import synthesis

mels, vocos_wav_gen, stats = synthesis(
    text="Ви можете протестувати синтез мовлення українською мовою. Просто введіть текст, який ви хочете прослухати.",
    voice="tetiana",  # tetiana, mykyta, lada
    n_takes=1,
    use_latest_take=False,
    token_dur_scaling=1,
    f0_mean=0,
    f0_std=0,
    energy_mean=0,
    energy_std=0,
    sigma_decoder=0.8,
    sigma_token_duration=0.666,
    sigma_f0=1,
    sigma_energy=1,
)

print(stats)

torchaudio.save("audio.wav", vocos_wav_gen.cpu(), 44_100, encoding="PCM_S")
```

Or using a terminal:

```shell
uv run example.py
```
