Spaces:
Running
on
Zero
Running
on
Zero
Sync from GitHub repo
Browse filesThis Space is synced from the GitHub repo: https://github.com/SWivid/F5-TTS. Please submit contributions to the Space there
app.py
CHANGED
|
@@ -128,7 +128,7 @@ def load_text_from_file(file):
|
|
| 128 |
return gr.update(value=text)
|
| 129 |
|
| 130 |
|
| 131 |
-
@lru_cache(maxsize=
|
| 132 |
@gpu_decorator
|
| 133 |
def infer(
|
| 134 |
ref_audio_orig,
|
|
@@ -209,14 +209,6 @@ def infer(
|
|
| 209 |
return (final_sample_rate, final_wave), spectrogram_path, ref_text, used_seed
|
| 210 |
|
| 211 |
|
| 212 |
-
with gr.Blocks() as app_credits:
|
| 213 |
-
gr.Markdown("""
|
| 214 |
-
# Credits
|
| 215 |
-
|
| 216 |
-
* [mrfakename](https://github.com/fakerybakery) for the original [online demo](https://huggingface.co/spaces/mrfakename/E2-F5-TTS)
|
| 217 |
-
* [RootingInLoad](https://github.com/RootingInLoad) for initial chunk generation and podcast app exploration
|
| 218 |
-
* [jpgallegoar](https://github.com/jpgallegoar) for multiple speech-type generation & voice chat
|
| 219 |
-
""")
|
| 220 |
with gr.Blocks() as app_tts:
|
| 221 |
gr.Markdown("# Batched TTS")
|
| 222 |
ref_audio_input = gr.Audio(label="Reference Audio", type="filepath")
|
|
@@ -320,6 +312,12 @@ with gr.Blocks() as app_tts:
|
|
| 320 |
outputs=[ref_text_input],
|
| 321 |
)
|
| 322 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
generate_btn.click(
|
| 324 |
basic_tts,
|
| 325 |
inputs=[
|
|
@@ -932,6 +930,16 @@ Have a conversation with an AI using your reference voice!
|
|
| 932 |
)
|
| 933 |
|
| 934 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 935 |
with gr.Blocks() as app:
|
| 936 |
gr.Markdown(
|
| 937 |
f"""
|
|
|
|
| 128 |
return gr.update(value=text)
|
| 129 |
|
| 130 |
|
| 131 |
+
@lru_cache(maxsize=1000) # NOTE. need to ensure params of infer() hashable
|
| 132 |
@gpu_decorator
|
| 133 |
def infer(
|
| 134 |
ref_audio_orig,
|
|
|
|
| 209 |
return (final_sample_rate, final_wave), spectrogram_path, ref_text, used_seed
|
| 210 |
|
| 211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
with gr.Blocks() as app_tts:
|
| 213 |
gr.Markdown("# Batched TTS")
|
| 214 |
ref_audio_input = gr.Audio(label="Reference Audio", type="filepath")
|
|
|
|
| 312 |
outputs=[ref_text_input],
|
| 313 |
)
|
| 314 |
|
| 315 |
+
ref_audio_input.clear(
|
| 316 |
+
lambda: [None, None],
|
| 317 |
+
None,
|
| 318 |
+
[ref_text_input, ref_text_file],
|
| 319 |
+
)
|
| 320 |
+
|
| 321 |
generate_btn.click(
|
| 322 |
basic_tts,
|
| 323 |
inputs=[
|
|
|
|
| 930 |
)
|
| 931 |
|
| 932 |
|
| 933 |
+
with gr.Blocks() as app_credits:
|
| 934 |
+
gr.Markdown("""
|
| 935 |
+
# Credits
|
| 936 |
+
|
| 937 |
+
* [mrfakename](https://github.com/fakerybakery) for the original [online demo](https://huggingface.co/spaces/mrfakename/E2-F5-TTS)
|
| 938 |
+
* [RootingInLoad](https://github.com/RootingInLoad) for initial chunk generation and podcast app exploration
|
| 939 |
+
* [jpgallegoar](https://github.com/jpgallegoar) for multiple speech-type generation & voice chat
|
| 940 |
+
""")
|
| 941 |
+
|
| 942 |
+
|
| 943 |
with gr.Blocks() as app:
|
| 944 |
gr.Markdown(
|
| 945 |
f"""
|