Spaces:
Running
title: Ukrainian TTS
emoji: π
colorFrom: blue
colorTo: yellow
sdk: gradio
sdk_version: 3.3
python_version: 3.9
app_file: app.py
pinned: false
Ukrainian TTS π’π€
Ukrainian TTS (text-to-speech) using Coqui TTS.
Link to online demo -> https://huggingface.co/spaces/robinhad/ukrainian-tts
Link to source code and models -> https://github.com/robinhad/ukrainian-tts
Telegram bot -> https://t.me/uk_tts_bot
Code is licensed under MIT License
, models are under GNU GPL v3 License
.
Support β€οΈ
If you like my work, please support β€οΈ -> https://send.monobank.ua/jar/48iHq4xAXm
For collaboration and question please contact me here:
Telegram https://t.me/robinhad
Twitter https://twitter.com/robinhad
You're welcome to join UA Speech Recognition and Synthesis community: Telegram https://t.me/speech_recognition_uk
Examples π€
Mykyta (male)
:
https://user-images.githubusercontent.com/5759207/190852232-34956a1d-77a9-42b9-b96d-39d0091e3e34.mp4
Olena (female)
:
https://user-images.githubusercontent.com/5759207/190852238-366782c1-9472-45fc-8fea-31346242f927.mp4
Dmytro (male)
:
https://user-images.githubusercontent.com/5759207/190852251-db105567-52ba-47b5-8ec6-5053c3baac8c.mp4
Olha (female)
:
https://user-images.githubusercontent.com/5759207/190852259-c6746172-05c4-4918-8286-a459c654eef1.mp4
Lada (female)
:
https://user-images.githubusercontent.com/5759207/190852270-7aed2db9-dc08-4a9f-8775-07b745657ca1.mp4
How to use: π’
As a package:
- Install using command:
pip install git+https://github.com/robinhad/ukrainian-tts.git
- Run a code snippet:
from ukrainian_tts.tts import TTS, Voices, StressOption
tts = TTS()
with open("test.wav", mode="wb") as file:
tts.tts("ΠΡΠΈΠ²ΡΡ", Voices.Olena.value, StressOption.Model.value, file)
Run manually:Caution: this won't use normalizer and autostress like a web demo.
pip install -r requirements.txt
.- Download
model.pth
andspeakers.pth
from "Releases" tab. - Launch as one-time command:
tts --text "Text for TTS" \
--model_path path/to/model.pth \
--config_path path/to/config.json \
--speaker_idx dmytro \
--out_path folder/to/save/output.wav
or alternatively launch web server using:
tts-server --model_path path/to/model.pth \
--config_path path/to/config.json
How to train: ποΈ
- Refer to "Nervous beginner guide" in Coqui TTS docs.
- Instead of provided
config.json
use one from this repo.
Attribution π€
- Model training - Yurii Paniv @robinhad
- Mykyta, Olena, Lada, Dmytro, Olha 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