Spaces:
Running
on
Zero
Running
on
Zero
app.py
#15
by
Vanjo
- opened
app.py
CHANGED
@@ -59,7 +59,7 @@ def generate_tts_audio(
|
|
59 |
maintains the prosody, tone, and vocal qualities of the reference speaker, or uses default voice if no reference is provided.
|
60 |
|
61 |
Args:
|
62 |
-
text_input (str): The text to synthesize into speech (maximum
|
63 |
audio_prompt_path_input (str, optional): File path or URL to the reference audio file that defines the target voice style. Defaults to None.
|
64 |
exaggeration_input (float, optional): Controls speech expressiveness (0.25-2.0, neutral=0.5, extreme values may be unstable). Defaults to 0.5.
|
65 |
temperature_input (float, optional): Controls randomness in generation (0.05-5.0, higher=more varied). Defaults to 0.8.
|
@@ -90,7 +90,7 @@ def generate_tts_audio(
|
|
90 |
generate_kwargs["audio_prompt_path"] = audio_prompt_path_input
|
91 |
|
92 |
wav = current_model.generate(
|
93 |
-
text_input[:
|
94 |
**generate_kwargs
|
95 |
)
|
96 |
print("Audio generation complete.")
|
@@ -107,7 +107,7 @@ with gr.Blocks() as demo:
|
|
107 |
with gr.Column():
|
108 |
text = gr.Textbox(
|
109 |
value="Now let's make my mum's favourite. So three mars bars into the pan. Then we add the tuna and just stir for a bit, just let the chocolate and fish infuse. A sprinkle of olive oil and some tomato ketchup. Now smell that. Oh boy this is going to be incredible.",
|
110 |
-
label="Text to synthesize (max chars
|
111 |
max_lines=5
|
112 |
)
|
113 |
ref_wav = gr.Audio(
|
|
|
59 |
maintains the prosody, tone, and vocal qualities of the reference speaker, or uses default voice if no reference is provided.
|
60 |
|
61 |
Args:
|
62 |
+
text_input (str): The text to synthesize into speech (maximum 1000 characters)
|
63 |
audio_prompt_path_input (str, optional): File path or URL to the reference audio file that defines the target voice style. Defaults to None.
|
64 |
exaggeration_input (float, optional): Controls speech expressiveness (0.25-2.0, neutral=0.5, extreme values may be unstable). Defaults to 0.5.
|
65 |
temperature_input (float, optional): Controls randomness in generation (0.05-5.0, higher=more varied). Defaults to 0.8.
|
|
|
90 |
generate_kwargs["audio_prompt_path"] = audio_prompt_path_input
|
91 |
|
92 |
wav = current_model.generate(
|
93 |
+
text_input[:1000], # Truncate text to max chars
|
94 |
**generate_kwargs
|
95 |
)
|
96 |
print("Audio generation complete.")
|
|
|
107 |
with gr.Column():
|
108 |
text = gr.Textbox(
|
109 |
value="Now let's make my mum's favourite. So three mars bars into the pan. Then we add the tuna and just stir for a bit, just let the chocolate and fish infuse. A sprinkle of olive oil and some tomato ketchup. Now smell that. Oh boy this is going to be incredible.",
|
110 |
+
label="Text to synthesize (max chars 1000)",
|
111 |
max_lines=5
|
112 |
)
|
113 |
ref_wav = gr.Audio(
|