fffiloni commited on
Commit
b5682ef
1 Parent(s): cc07fe9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -25
app.py CHANGED
@@ -91,7 +91,7 @@ def infer(prompt, input_wav_file):
91
 
92
  tts_video = gr.make_waveform(audio="output.wav")
93
 
94
- return "output.wav", tts_video, f"bark_voices/{file_name}/{contents[1]}"
95
 
96
 
97
  css = """
@@ -116,31 +116,34 @@ with gr.Blocks(css=css) as demo:
116
  [![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-sm.svg#center)](https://huggingface.co/spaces/fffiloni/instant-TTS-Bark-cloning?duplicate=true)
117
 
118
  """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
 
120
- prompt = gr.Textbox(
121
- label="Text to speech prompt"
122
- )
123
 
124
- audio_in = gr.Audio(
125
- label="WAV voice to clone",
126
- type="filepath",
127
- source="upload"
128
- )
129
-
130
- submit_btn = gr.Button("Submit")
131
- submit_with_npz_btn = gr.Button("Submit 2", visible=False)
132
-
133
- cloned_out = gr.Audio(
134
- label="Text to speech output"
135
- )
136
-
137
- video_out = gr.Video(
138
- label = "Waveform video"
139
- )
140
-
141
- npz_file = gr.File(
142
- label=".npz file"
143
- )
144
 
145
  submit_btn.click(
146
  fn = infer,
@@ -155,4 +158,4 @@ with gr.Blocks(css=css) as demo:
155
  ]
156
  )
157
 
158
- demo.queue().launch()
 
91
 
92
  tts_video = gr.make_waveform(audio="output.wav")
93
 
94
+ return "output.wav", tts_video, gr.update(value=f"bark_voices/{file_name}/{contents[1]}", visible=True)
95
 
96
 
97
  css = """
 
116
  [![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-sm.svg#center)](https://huggingface.co/spaces/fffiloni/instant-TTS-Bark-cloning?duplicate=true)
117
 
118
  """)
119
+ with gr.Row():
120
+ with gr.Column():
121
+ prompt = gr.Textbox(
122
+ label="Text to speech prompt"
123
+ )
124
+
125
+ audio_in = gr.Audio(
126
+ label="WAV voice to clone",
127
+ type="filepath",
128
+ source="upload"
129
+ )
130
+
131
+ submit_btn = gr.Button("Submit")
132
+
133
+ with gr.Column():
134
 
135
+ cloned_out = gr.Audio(
136
+ label="Text to speech output"
137
+ )
138
 
139
+ video_out = gr.Video(
140
+ label = "Waveform video"
141
+ )
142
+
143
+ npz_file = gr.File(
144
+ label = ".npz file",
145
+ visible = False
146
+ )
 
 
 
 
 
 
 
 
 
 
 
 
147
 
148
  submit_btn.click(
149
  fn = infer,
 
158
  ]
159
  )
160
 
161
+ demo.queue(max_size=20).launch()