Spaces:
Sleeping
Sleeping
mrfakename
commited on
Commit
•
6eb9ea3
1
Parent(s):
0a511af
Fix bug
Browse files
app.py
CHANGED
@@ -10,12 +10,12 @@ theme = gr.themes.Base(
|
|
10 |
voicelist = ['f-us-1', 'f-us-2', 'f-us-3', 'f-us-4', 'm-us-1', 'm-us-2', 'm-us-3', 'm-us-4']
|
11 |
voices = {}
|
12 |
# todo: cache computed style, load using pickle
|
13 |
-
if os.path.exists('voices.pkl'):
|
14 |
-
with open('voices.pkl', 'rb') as f:
|
15 |
-
voices = pickle.load(f)
|
16 |
-
else:
|
17 |
-
|
18 |
-
|
19 |
def synthesize(text, voice):
|
20 |
if text.strip() == "":
|
21 |
raise gr.Error("You must enter some text")
|
|
|
10 |
voicelist = ['f-us-1', 'f-us-2', 'f-us-3', 'f-us-4', 'm-us-1', 'm-us-2', 'm-us-3', 'm-us-4']
|
11 |
voices = {}
|
12 |
# todo: cache computed style, load using pickle
|
13 |
+
# if os.path.exists('voices.pkl'):
|
14 |
+
# with open('voices.pkl', 'rb') as f:
|
15 |
+
# voices = pickle.load(f)
|
16 |
+
# else:
|
17 |
+
for v in voicelist:
|
18 |
+
voices[v] = styletts2importable.compute_style(f'voices/{v}.wav')
|
19 |
def synthesize(text, voice):
|
20 |
if text.strip() == "":
|
21 |
raise gr.Error("You must enter some text")
|