tobiccino commited on
Commit
3d29f27
1 Parent(s): 10f2c96

add stop duration option

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- stop_duration_float,
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=["text","text"],
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 = [