Spaces:
Running
on
Zero
Running
on
Zero
mrfakename
commited on
Commit
•
1ef0d2e
1
Parent(s):
1646c30
Update app.py
Browse files
app.py
CHANGED
@@ -157,7 +157,7 @@ def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence):
|
|
157 |
generated_wave = generated_wave.squeeze().cpu().numpy()
|
158 |
|
159 |
if remove_silence:
|
160 |
-
gr.Info("Removing audio silences")
|
161 |
non_silent_intervals = librosa.effects.split(generated_wave, top_db=30)
|
162 |
non_silent_wave = np.array([])
|
163 |
for interval in non_silent_intervals:
|
@@ -195,7 +195,7 @@ The checkpoints support English and Chinese.
|
|
195 |
generate_btn = gr.Button("Synthesize", variant="primary")
|
196 |
with gr.Accordion("Advanced Settings", open=False):
|
197 |
ref_text_input = gr.Textbox(label="Reference Text", info="Leave blank to automatically transcribe the reference audio. If you enter text it will override automatic transcription.", lines=2)
|
198 |
-
remove_silence = gr.Checkbox(label="
|
199 |
|
200 |
audio_output = gr.Audio(label="Synthesized Audio")
|
201 |
spectrogram_output = gr.Image(label="Spectrogram")
|
|
|
157 |
generated_wave = generated_wave.squeeze().cpu().numpy()
|
158 |
|
159 |
if remove_silence:
|
160 |
+
gr.Info("Removing audio silences... This may take a moment")
|
161 |
non_silent_intervals = librosa.effects.split(generated_wave, top_db=30)
|
162 |
non_silent_wave = np.array([])
|
163 |
for interval in non_silent_intervals:
|
|
|
195 |
generate_btn = gr.Button("Synthesize", variant="primary")
|
196 |
with gr.Accordion("Advanced Settings", open=False):
|
197 |
ref_text_input = gr.Textbox(label="Reference Text", info="Leave blank to automatically transcribe the reference audio. If you enter text it will override automatic transcription.", lines=2)
|
198 |
+
remove_silence = gr.Checkbox(label="Remove Silences", info="The model tends to produce silences, especially on longer audio. We can manually remove silences if needed. Note that this is an experimental feature and may produce strange results. This will also increase generation time.", value=True)
|
199 |
|
200 |
audio_output = gr.Audio(label="Synthesized Audio")
|
201 |
spectrogram_output = gr.Image(label="Spectrogram")
|