Ukrainian TTS using ESPNET
Project description
title: "Ukrainian TTS" emoji: 🐌 colorFrom: blue colorTo: yellow sdk: gradio sdk_version : 5.7.1 python_version: 3.10.3 app_file: app.py pinned: false
Ukrainian TTS 📢🤖
Ukrainian TTS (text-to-speech) using ESPNET.
Link to online demo -> https://huggingface.co/spaces/robinhad/ukrainian-tts
Note: online demo saves user input to improve user experience; by using it, you consent to analyze this data.
Link to source code and models -> https://github.com/robinhad/ukrainian-tts
Telegram bot -> https://t.me/uk_tts_bot
Features ⚙️
- Completely offline
- Multiple voices
- Automatic stress with priority queue:
acute->user-defined>dictionary>model - Control speech speed
- Python package works on Windows, Mac (x86/M1), Linux(x86/ARM)
- Inference on mobile devices (inference models through
espnet_onnxwithout cleaners)
Support ❤️
If you like my work, please support ❤️ -> https://send.monobank.ua/jar/48iHq4xAXm
You're welcome to join UA Speech Recognition and Synthesis community: Telegram https://t.me/speech_recognition_uk
Examples 🤖
Oleksa (male):
https://github.com/robinhad/ukrainian-tts/assets/5759207/ace842ef-06d0-4b1f-ad49-5fda92999dbb
More voices 📢🤖
Tetiana (female):
https://github.com/robinhad/ukrainian-tts/assets/5759207/a6ecacf6-62ae-4fc5-b6d5-41e6cdd3d992
Dmytro (male):
https://github.com/robinhad/ukrainian-tts/assets/5759207/67d3dac9-6626-40ef-98e5-ec194096bbe0
Lada (female):
https://github.com/robinhad/ukrainian-tts/assets/5759207/fcf558b2-3ff9-4539-ad9e-8455b52223a4
Mykyta (male):
https://github.com/robinhad/ukrainian-tts/assets/5759207/033f5215-3f09-4021-ba19-1f55158445ca
How to use: 📢
Quickstart
Installation
Option 1: Using pip (Recommended)
pip install ukrainian-tts
Option 2: Using uv (Fast & Modern)
uv add ukrainian-tts
Option 3: Development Installation
# Using pip
pip install ukrainian-tts[dev]
# Using uv
uv add ukrainian-tts[dev]
Features Included
- ✅ Self-contained: No external git dependencies required
- ✅ All stress methods: Both dictionary and model-based stress
- ✅ Multiple voices: 5 different Ukrainian voices
- ✅ Cross-platform: Works on Windows, macOS, and Linux
- ✅ Fast installation: Optimized for modern Python package managers
Alternative Installation Methods
From Source (Development)
git clone https://github.com/robinhad/ukrainian-tts.git
cd ukrainian-tts
pip install -e .
Using uv for Development
git clone https://github.com/robinhad/ukrainian-tts.git
cd ukrainian-tts
uv pip install -e .
Code example:
from ukrainian_tts.tts import TTS, Voices, Stress
import IPython.display as ipd
tts = TTS(device="cpu") # can try gpu, mps
with open("test.wav", mode="wb") as file:
_, output_text = tts.tts("Привіт, як у тебе справи?", Voices.Dmytro.value, Stress.Dictionary.value, file)
print("Accented text:", output_text)
ipd.Audio(filename="test.wav")
See example notebook: tts_example.ipynb
macOS Installation 🍎
Simple Installation (Recommended)
The package is now self-contained and doesn't require system dependencies for basic usage:
# Using pip
pip install ukrainian-tts
# Using uv (faster)
uv add ukrainian-tts
Note: The package now includes all dependencies and works out-of-the-box! No system dependencies required for basic usage.
For Development/Advanced Usage
If you need to build the package from source or encounter issues, you can use our automated installation script:
git clone https://github.com/robinhad/ukrainian-tts.git
cd ukrainian-tts
./install.sh
This script handles:
- ✅ System dependencies (SentencePiece, CMake, pkg-config)
- ✅ Python virtual environment setup
- ✅ Package installation and testing
Troubleshooting
Flash Attention Warning:
Failed to import Flash Attention, using ESPnet default: No module named 'flash_attn'
This warning is normal on macOS and can be safely ignored. Flash Attention is designed for NVIDIA GPUs and not available on macOS.
System Dependencies (if needed):
brew install sentencepiece cmake pkg-config libsndfile
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH"
How to contribute: 🙌
Look into this list with current problems: https://github.com/robinhad/ukrainian-tts/issues/35
How to train: 🏋️
Link to guide: training/STEPS.md
Attribution 🤝
- Model training - Yurii Paniv @robinhad
- Open Source Ukrainian Text-to-Speech dataset - Yehor Smoliakov @egorsmkv
- Dmytro voice - Dmytro Chaplynskyi @dchaplinsky
- Silence cutting using HMM-GMM - Volodymyr Kyrylov @proger
- Autostress (with dictionary) using ukrainian-word-stress - Oleksiy Syvokon @asivokon
- Autostress (with model) using ukrainian-accentor - Bohdan Mykhailenko @NeonBohdan + Yehor Smoliakov @egorsmkv
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ukrainian_tts-6.0.1.tar.gz.
File metadata
- Download URL: ukrainian_tts-6.0.1.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd3089abb4e9ff20179820f9cd8a66c207e1bfc9676f6d826a309e222f20449c
|
|
| MD5 |
f84ec911cad560e4a334a1df74714b62
|
|
| BLAKE2b-256 |
bd6841715d7fdc25bc78b0e3e4972542240949afe889a2378d6ae3e38e13ba6d
|
File details
Details for the file ukrainian_tts-6.0.1-py3-none-any.whl.
File metadata
- Download URL: ukrainian_tts-6.0.1-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca25923974be5a7b778af8dcfbd02a0df46824cc2c0202a5f0303ea3a4e99b03
|
|
| MD5 |
8036a8d9abc33140c2d7a9d6ad045d00
|
|
| BLAKE2b-256 |
a1f77ce4446f42a117976267e034c30903addced0b73c4dae3e2d0de06a50b3a
|