add stop duration option
Browse files
app.py
CHANGED
@@ -11,12 +11,12 @@ def text_to_speech(text,stop_duration_text):
|
|
11 |
# prevent too long text
|
12 |
if len(text) > 500:
|
13 |
text = text[:500]
|
14 |
-
stop_duration_float = float(stop_duration_text)
|
15 |
text = nat_normalize_text(text)
|
16 |
mel = text2mel(
|
17 |
text,
|
18 |
"lexicon.txt",
|
19 |
-
|
20 |
"acoustic_latest_ckpt.pickle",
|
21 |
"duration_latest_ckpt.pickle",
|
22 |
)
|
@@ -38,7 +38,7 @@ description = "SLT Vietnamese Text to speech demo."
|
|
38 |
|
39 |
gr.Interface(
|
40 |
fn=speak,
|
41 |
-
inputs=
|
42 |
outputs="audio",
|
43 |
title = title,
|
44 |
examples = [
|
|
|
11 |
# prevent too long text
|
12 |
if len(text) > 500:
|
13 |
text = text[:500]
|
14 |
+
# stop_duration_float = float(stop_duration_text)
|
15 |
text = nat_normalize_text(text)
|
16 |
mel = text2mel(
|
17 |
text,
|
18 |
"lexicon.txt",
|
19 |
+
stop_duration_text,
|
20 |
"acoustic_latest_ckpt.pickle",
|
21 |
"duration_latest_ckpt.pickle",
|
22 |
)
|
|
|
38 |
|
39 |
gr.Interface(
|
40 |
fn=speak,
|
41 |
+
inputs="text","number",
|
42 |
outputs="audio",
|
43 |
title = title,
|
44 |
examples = [
|