Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,6 +114,8 @@ def infer(
|
|
| 114 |
audio_prompt_speaker_b,
|
| 115 |
gen_conversation_input,
|
| 116 |
) -> tuple[np.ndarray, int]:
|
|
|
|
|
|
|
| 117 |
# Estimate token limit, otherwise failure might happen after many utterances have been generated.
|
| 118 |
if len(gen_conversation_input.strip() + text_prompt_speaker_a.strip() + text_prompt_speaker_b.strip()) >= 2000:
|
| 119 |
raise gr.Error("Prompts and conversation too long.", duration=30)
|
|
@@ -258,4 +260,4 @@ with gr.Blocks() as app:
|
|
| 258 |
outputs=[audio_output],
|
| 259 |
)
|
| 260 |
|
| 261 |
-
app.launch(ssr_mode=True,
|
|
|
|
| 114 |
audio_prompt_speaker_b,
|
| 115 |
gen_conversation_input,
|
| 116 |
) -> tuple[np.ndarray, int]:
|
| 117 |
+
"""Generates an audio conversation between two speakers """
|
| 118 |
+
|
| 119 |
# Estimate token limit, otherwise failure might happen after many utterances have been generated.
|
| 120 |
if len(gen_conversation_input.strip() + text_prompt_speaker_a.strip() + text_prompt_speaker_b.strip()) >= 2000:
|
| 121 |
raise gr.Error("Prompts and conversation too long.", duration=30)
|
|
|
|
| 260 |
outputs=[audio_output],
|
| 261 |
)
|
| 262 |
|
| 263 |
+
app.launch(ssr_mode=True,mcp_server=True)
|