Spaces:
Configuration error
Configuration error
Yurii Paniv
commited on
Commit
•
ab18fd9
1
Parent(s):
e2a6612
Update TTS to new version
Browse files- app.py +3 -5
- requirements.txt +1 -1
app.py
CHANGED
@@ -6,7 +6,7 @@ from ukrainian_tts.tts import TTS, Voices, Stress
|
|
6 |
from enum import Enum
|
7 |
|
8 |
|
9 |
-
tts = TTS(
|
10 |
|
11 |
p = pipeline(
|
12 |
"automatic-speech-recognition", "robinhad/wav2vec2-xls-r-300m-uk"
|
@@ -19,19 +19,17 @@ conv: ConversationalPipeline = pipeline(
|
|
19 |
)
|
20 |
|
21 |
class VoiceOption(Enum):
|
22 |
-
|
23 |
Mykyta = "Микита (чоловічий) 👨"
|
24 |
Lada = "Лада (жіночий) 👩"
|
25 |
Dmytro = "Дмитро (чоловічий) 👨"
|
26 |
-
Olga = "Ольга (жіночий) 👩"
|
27 |
|
28 |
|
29 |
voice_mapping = {
|
30 |
-
VoiceOption.
|
31 |
VoiceOption.Mykyta.value: Voices.Mykyta.value,
|
32 |
VoiceOption.Lada.value: Voices.Lada.value,
|
33 |
VoiceOption.Dmytro.value: Voices.Dmytro.value,
|
34 |
-
VoiceOption.Olga.value: Voices.Olga.value,
|
35 |
}
|
36 |
|
37 |
|
|
|
6 |
from enum import Enum
|
7 |
|
8 |
|
9 |
+
tts = TTS() # can try device=cpu|gpu|mps
|
10 |
|
11 |
p = pipeline(
|
12 |
"automatic-speech-recognition", "robinhad/wav2vec2-xls-r-300m-uk"
|
|
|
19 |
)
|
20 |
|
21 |
class VoiceOption(Enum):
|
22 |
+
Tetiana = "Тетяна (жіночий) 👩"
|
23 |
Mykyta = "Микита (чоловічий) 👨"
|
24 |
Lada = "Лада (жіночий) 👩"
|
25 |
Dmytro = "Дмитро (чоловічий) 👨"
|
|
|
26 |
|
27 |
|
28 |
voice_mapping = {
|
29 |
+
VoiceOption.Tetiana.value: Voices.Tetiana.value,
|
30 |
VoiceOption.Mykyta.value: Voices.Mykyta.value,
|
31 |
VoiceOption.Lada.value: Voices.Lada.value,
|
32 |
VoiceOption.Dmytro.value: Voices.Dmytro.value,
|
|
|
33 |
}
|
34 |
|
35 |
|
requirements.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
gradio==3.16
|
2 |
transformers==4.26
|
3 |
-
git+https://github.com/robinhad/ukrainian-tts.git@
|
4 |
# this would be needed if model would have an LM
|
5 |
#pyctcdecode
|
6 |
#https://github.com/kpu/kenlm/archive/master.zip
|
|
|
1 |
gradio==3.16
|
2 |
transformers==4.26
|
3 |
+
git+https://github.com/robinhad/ukrainian-tts.git@25d6741b8184c6b30cb6cfd76be0e0573ee5ef22
|
4 |
# this would be needed if model would have an LM
|
5 |
#pyctcdecode
|
6 |
#https://github.com/kpu/kenlm/archive/master.zip
|