Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -134,7 +134,7 @@ def extract_speech_ids(speech_tokens_str):
|
|
| 134 |
print(f"Unexpected token: {token_str}")
|
| 135 |
return speech_ids
|
| 136 |
|
| 137 |
-
|
| 138 |
def infer_with_speaker(
|
| 139 |
display_name,
|
| 140 |
target_text,
|
|
@@ -163,6 +163,9 @@ def infer_with_speaker(
|
|
| 163 |
|
| 164 |
|
| 165 |
@spaces.GPU(duration=15)
|
|
|
|
|
|
|
|
|
|
| 166 |
def infer(
|
| 167 |
sample_audio_path,
|
| 168 |
target_text,
|
|
@@ -335,7 +338,7 @@ with gr.Blocks() as app_tts:
|
|
| 335 |
) # Add textbox
|
| 336 |
|
| 337 |
generate_btn.click(
|
| 338 |
-
lambda *args:
|
| 339 |
inputs=[
|
| 340 |
ref_audio_input,
|
| 341 |
gen_text_input,
|
|
|
|
| 134 |
print(f"Unexpected token: {token_str}")
|
| 135 |
return speech_ids
|
| 136 |
|
| 137 |
+
@spaces.GPU(duration=15)
|
| 138 |
def infer_with_speaker(
|
| 139 |
display_name,
|
| 140 |
target_text,
|
|
|
|
| 163 |
|
| 164 |
|
| 165 |
@spaces.GPU(duration=15)
|
| 166 |
+
def gradio_infer(*args, **kwargs):
|
| 167 |
+
return infer(*args, **kwargs)
|
| 168 |
+
|
| 169 |
def infer(
|
| 170 |
sample_audio_path,
|
| 171 |
target_text,
|
|
|
|
| 338 |
) # Add textbox
|
| 339 |
|
| 340 |
generate_btn.click(
|
| 341 |
+
lambda *args: gradio_infer(*args, transcribed_text=None),
|
| 342 |
inputs=[
|
| 343 |
ref_audio_input,
|
| 344 |
gen_text_input,
|