ollieollie commited on
Commit
da790c3
·
verified ·
1 Parent(s): 3e1f112

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -12
app.py CHANGED
@@ -24,9 +24,8 @@ def generate(text, audio_prompt_path, exaggeration, pace, temperature, seed_num)
24
  wav = model.generate(
25
  text,
26
  audio_prompt_path=audio_prompt_path,
27
- exaggeration=exaggeration,
28
  pace=pace,
29
- temperature=temperature,
30
  )
31
  return model.sr, wav.squeeze(0).numpy()
32
 
@@ -34,14 +33,9 @@ def generate(text, audio_prompt_path, exaggeration, pace, temperature, seed_num)
34
  with gr.Blocks() as demo:
35
  with gr.Row():
36
  with gr.Column():
37
- text = gr.Textbox(value="What does the fox say?", label="Text to synthesize")
38
  ref_wav = gr.Audio(sources="upload", type="filepath", label="Reference Audio File", value=None)
39
- exaggeration = gr.Slider(0.25, 2, step=.05, label="exaggeration", value=.7)
40
-
41
- with gr.Accordion("More options", open=False):
42
- seed_num = gr.Number(value=0, label="Random seed (0 for random)")
43
- temp = gr.Slider(0.05, 5, step=.05, label="temperature", value=.8)
44
- pace = gr.Slider(0.8, 1.2, step=.01, label="pace", value=1)
45
 
46
  run_btn = gr.Button("Generate", variant="primary")
47
 
@@ -54,9 +48,6 @@ with gr.Blocks() as demo:
54
  text,
55
  ref_wav,
56
  exaggeration,
57
- pace,
58
- temp,
59
- seed_num,
60
  ],
61
  outputs=audio_output,
62
  )
 
24
  wav = model.generate(
25
  text,
26
  audio_prompt_path=audio_prompt_path,
27
+ emotion_adv=exaggeration,
28
  pace=pace,
 
29
  )
30
  return model.sr, wav.squeeze(0).numpy()
31
 
 
33
  with gr.Blocks() as demo:
34
  with gr.Row():
35
  with gr.Column():
36
+ text = gr.Textbox(value="I know what you're thinking. "Did he fire six shots, or only five?" Well, to tell you the truth, in all this excitement, I kind of lost track myself.", label="Text to synthesize")
37
  ref_wav = gr.Audio(sources="upload", type="filepath", label="Reference Audio File", value=None)
38
+ exaggeration = gr.Slider(0.25, 2, step=.05, label="Exaggeration (extreme values are unstable)", value=.7)
 
 
 
 
 
39
 
40
  run_btn = gr.Button("Generate", variant="primary")
41
 
 
48
  text,
49
  ref_wav,
50
  exaggeration,
 
 
 
51
  ],
52
  outputs=audio_output,
53
  )