|
|
--- |
|
|
datasets: |
|
|
- Thomcles/Czech-Speech-Monospeaker |
|
|
language: |
|
|
- cs |
|
|
base_model: |
|
|
- rhasspy/piper-voices |
|
|
pipeline_tag: text-to-speech |
|
|
--- |
|
|
|
|
|
# 🇨🇿 Piper TTS Czech 🇨🇿 |
|
|
|
|
|
- Base model : https://huggingface.co/rhasspy/piper-voices/tree/main/cs/cs_CZ/jirka/medium |
|
|
|
|
|
- Finetuning dataset : https://huggingface.co/datasets/Thomcles/Czech-Speech-Monospeaker |
|
|
|
|
|
- Piper Github : https://github.com/OHF-Voice/piper1-gpl/tree/main |
|
|
|
|
|
<div align="center"><img width="400px" src="https://www.shutterstock.com/image-vector/travel-czech-republic-culture-elements-600nw-2588019031.jpg" alt="Czech-image" /></div> |
|
|
|
|
|
--- |
|
|
|
|
|
# Use the model with Python 🐍 |
|
|
|
|
|
## Install piper with : |
|
|
|
|
|
``` sh |
|
|
pip install piper-tts |
|
|
``` |
|
|
|
|
|
### Install medium quality or high quality model : |
|
|
|
|
|
Medium (recommended) : |
|
|
``` |
|
|
!wget -O cs_medium.onnx https://huggingface.co/Thomcles/Piper-TTS-Czech/resolve/main/medium/model.onnx |
|
|
!wget -O cs_medium.onnx.json https://huggingface.co/Thomcles/Piper-TTS-Czech/resolve/main/medium/model.onnx.json |
|
|
``` |
|
|
|
|
|
## Python API : |
|
|
|
|
|
``` |
|
|
import wave |
|
|
from piper import PiperVoice |
|
|
|
|
|
voice = PiperVoice.load("cs_medium.onnx", "cs_medium.onnx.json") |
|
|
with wave.open("test.wav", "wb") as wav_file: |
|
|
voice.synthesize_wav("Dobrý den, vítáme vás v našem testu syntézy řeči.", wav_file) |
|
|
``` |
|
|
|
|
|
|
|
|
|