Pranjal12345 commited on
Commit
b38366a
·
1 Parent(s): 944b0be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -11,21 +11,17 @@ VOICE_OPTIONS = [
11
  "angie",
12
  "deniro",
13
  "freeman",
14
- "random", # special option for random voice
15
  ]
16
 
17
  def inference(
18
  text,
19
  voice,
20
- voice_b,
21
  ):
22
- # Set split_by_newline to "No" regardless of the user input
23
 
24
  texts = [text]
25
 
26
  voices = [voice]
27
- if voice_b != "disabled":
28
- voices.append(voice_b)
29
 
30
  if len(voices) == 1:
31
  voice_samples, conditioning_latents = load_voice(voice)
@@ -55,12 +51,6 @@ def main():
55
  voice = gr.Dropdown(
56
  VOICE_OPTIONS, value="jane_eyre", label="Select voice:", type="value"
57
  )
58
- voice_b = gr.Dropdown(
59
- VOICE_OPTIONS,
60
- value="disabled",
61
- label="(Optional) Select second voice:",
62
- type="value",
63
- )
64
 
65
  output_audio = gr.Audio(label="streaming audio:", streaming=True, autoplay=True)
66
  interface = gr.Interface(
@@ -68,7 +58,6 @@ def main():
68
  inputs=[
69
  text,
70
  voice,
71
- voice_b,
72
  ],
73
  title=title,
74
  outputs=[output_audio],
 
11
  "angie",
12
  "deniro",
13
  "freeman",
14
+ "random",
15
  ]
16
 
17
  def inference(
18
  text,
19
  voice,
 
20
  ):
 
21
 
22
  texts = [text]
23
 
24
  voices = [voice]
 
 
25
 
26
  if len(voices) == 1:
27
  voice_samples, conditioning_latents = load_voice(voice)
 
51
  voice = gr.Dropdown(
52
  VOICE_OPTIONS, value="jane_eyre", label="Select voice:", type="value"
53
  )
 
 
 
 
 
 
54
 
55
  output_audio = gr.Audio(label="streaming audio:", streaming=True, autoplay=True)
56
  interface = gr.Interface(
 
58
  inputs=[
59
  text,
60
  voice,
 
61
  ],
62
  title=title,
63
  outputs=[output_audio],