File size: 3,364 Bytes
1c1e26d
 
 
 
 
e1968fb
cb734e8
e1968fb
1c1e26d
454658c
1c1e26d
454658c
 
e1968fb
454658c
 
 
 
 
 
 
 
 
 
e1968fb
 
454658c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
datasets:
- common_voice
language:
- uk
license: mit
base_model: microsoft/speecht5_tts
pipeline_tag: text-to-speech
---
This model is a fine-tuned version of SpeechT5 for the Ukrainian language, using the Common Voice dataset.

## Usage:
```python
!pip install git+https://github.com/huggingface/transformers

from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5ForSpeechToSpeech, SpeechT5HifiGan

processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
model = SpeechT5ForTextToSpeech.from_pretrained("tenebrisu/speecht5_tts_common_voice_uk")
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")

speaker_embeddings = 2 * torch.rand((1, 512)) - 1
text = """ pryvit yak spravy """

inputs = processor(text=text, return_tensors="pt")

speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, output_cross_attentions=True)
waveform = vocoder.forward(speech[0])
```

## Transliteration Table:
To support the transliteration of Ukrainian characters, the following table is used:

| Ukrainian | Transliteration |
|-----------|------------------|
| Є         | je               |
| І         | i                |
| Ї         | ji               |
| А         | a                |
| Б         | b                |
| В         | v                |
| Г         | h                |
| Д         | d                |
| Е         | e                |
| Ж         | zh               |
| З         | z                |
| И         | y                |
| Й         | j                |
| К         | k                |
| Л         | l                |
| М         | m                |
| Н         | n                |
| О         | o                |
| П         | p                |
| Р         | r                |
| С         | s                |
| Т         | t                |
| У         | u                |
| Ф         | f                |
| Х         | x                |
| Ц         | c                |
| Ч         | ch               |
| Ш         | sh               |
| Щ         | shch             |
| Ь         | q                |
| Ю         | ju               |
| Я         | ja               |
| а         | a                |
| б         | b                |
| в         | v                |
| г         | h                |
| д         | d                |
| е         | e                |
| ж         | zh               |
| з         | z                |
| и         | y                |
| й         | j                |
| к         | k                |
| л         | l                |
| м         | m                |
| н         | n                |
| о         | o                |
| п         | p                |
| р         | r                |
| с         | s                |
| т         | t                |
| у         | u                |
| ф         | f                |
| х         | x                |
| ц         | c                |
| ч         | ch               |
| ш         | sh               |
| щ         | shch             |
| ь         | q                |
| ю         | ju               |
| я         | ja               |
| є         | je               |
| і         | i                |
| ї         | ji               |
| Ґ         | g                |
| ґ         | g                |