File size: 1,272 Bytes
b32a73c
 
 
 
 
 
 
 
f8aa70f
 
af6f933
f8aa70f
dab652c
 
 
 
 
f8aa70f
b21a778
 
af6f933
 
b21a778
f8aa70f
 
 
 
 
 
 
 
 
1bbd5e1
f8aa70f
e7fac01
f8aa70f
 
 
 
 
 
 
 
 
0888f06
f8aa70f
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
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)
```