Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -75,9 +75,13 @@ def tts(
|
|
| 75 |
speed_str = f"+{speed}%"
|
| 76 |
else:
|
| 77 |
speed_str = f"{speed}%"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
asyncio.run(
|
| 79 |
edge_tts.Communicate(
|
| 80 |
-
tts_text,
|
| 81 |
).save(edge_output_filename)
|
| 82 |
)
|
| 83 |
t1 = time.time()
|
|
@@ -93,11 +97,12 @@ def tts(
|
|
| 93 |
None,
|
| 94 |
)
|
| 95 |
|
| 96 |
-
|
|
|
|
| 97 |
model_name=model_name,
|
| 98 |
-
input_path=
|
| 99 |
pitch=f0_up_key,
|
| 100 |
-
|
| 101 |
index_rate=index_rate,
|
| 102 |
protect=protect,
|
| 103 |
filter_radius=filter_radius,
|
|
@@ -130,8 +135,8 @@ def tts(
|
|
| 130 |
|
| 131 |
with gr.Blocks() as app:
|
| 132 |
gr.Markdown(initial_md)
|
| 133 |
-
gr.Markdown("MikuTTS V3")
|
| 134 |
-
gr.Markdown("Modern - Stylish")
|
| 135 |
with gr.Row():
|
| 136 |
with gr.Column():
|
| 137 |
model_name = gr.Dropdown(
|
|
@@ -215,4 +220,4 @@ with gr.Blocks() as app:
|
|
| 215 |
inputs=[tts_text, tts_voice, f0_key_up],
|
| 216 |
)
|
| 217 |
|
| 218 |
-
app.launch(theme="NeoPy=Soft", ssr_mode=False)
|
|
|
|
| 75 |
speed_str = f"+{speed}%"
|
| 76 |
else:
|
| 77 |
speed_str = f"{speed}%"
|
| 78 |
+
|
| 79 |
+
# Fix: Extract just the ShortName from the voice selection
|
| 80 |
+
voice_name = tts_voice.split("-")[0]
|
| 81 |
+
|
| 82 |
asyncio.run(
|
| 83 |
edge_tts.Communicate(
|
| 84 |
+
tts_text, voice_name, rate=speed_str
|
| 85 |
).save(edge_output_filename)
|
| 86 |
)
|
| 87 |
t1 = time.time()
|
|
|
|
| 97 |
None,
|
| 98 |
)
|
| 99 |
|
| 100 |
+
# Fix: Use edge_output_filename as input_path and fix typo in f0_method
|
| 101 |
+
audio_opt, times, tgt_sr = run_inference_script(
|
| 102 |
model_name=model_name,
|
| 103 |
+
input_path=edge_output_filename,
|
| 104 |
pitch=f0_up_key,
|
| 105 |
+
f0_method=f0_method, # Fixed typo from f0_metho
|
| 106 |
index_rate=index_rate,
|
| 107 |
protect=protect,
|
| 108 |
filter_radius=filter_radius,
|
|
|
|
| 135 |
|
| 136 |
with gr.Blocks() as app:
|
| 137 |
gr.Markdown(initial_md)
|
| 138 |
+
gr.Markdown("# MikuTTS V3")
|
| 139 |
+
gr.Markdown("# Modern - Stylish")
|
| 140 |
with gr.Row():
|
| 141 |
with gr.Column():
|
| 142 |
model_name = gr.Dropdown(
|
|
|
|
| 220 |
inputs=[tts_text, tts_voice, f0_key_up],
|
| 221 |
)
|
| 222 |
|
| 223 |
+
app.launch(theme="NeoPy=Soft", ssr_mode=False)
|