Spaces:
Running
Running
F5 TTS API fix
Browse files- app/models.py +4 -7
- test_tts_e2_f5_f5.py +4 -7
app/models.py
CHANGED
@@ -346,8 +346,8 @@ HF_SPACES = {
|
|
346 |
# F5 TTS
|
347 |
'mrfakename/E2-F5-TTS': {
|
348 |
'name': 'F5 TTS',
|
349 |
-
'function': '/
|
350 |
-
'text_param_index': '
|
351 |
'return_audio_index': 0,
|
352 |
'is_zero_gpu_space': True,
|
353 |
# 'series': 'E2 TTS',
|
@@ -781,12 +781,9 @@ OVERRIDE_INPUTS = {
|
|
781 |
|
782 |
# F5
|
783 |
'mrfakename/E2-F5-TTS': {
|
784 |
-
'
|
785 |
-
'
|
786 |
'remove_silence': False,
|
787 |
-
'cross_fade_duration_slider': 0.15,
|
788 |
-
'nfe_slider': 32,
|
789 |
-
'speed_slider': 1,
|
790 |
},
|
791 |
|
792 |
# E2 TODO: call switch model
|
|
|
346 |
# F5 TTS
|
347 |
'mrfakename/E2-F5-TTS': {
|
348 |
'name': 'F5 TTS',
|
349 |
+
'function': '/predict',
|
350 |
+
'text_param_index': 'gen_text',
|
351 |
'return_audio_index': 0,
|
352 |
'is_zero_gpu_space': True,
|
353 |
# 'series': 'E2 TTS',
|
|
|
781 |
|
782 |
# F5
|
783 |
'mrfakename/E2-F5-TTS': {
|
784 |
+
'ref_audio': handle_file('voice_samples/EN_B00004_S00051_W000213.mp3'),
|
785 |
+
'ref_text': 'Our model manager is Graham, whom we observed leading a small team of chemical engineers within a multinational European firm we\'ll call Kruger Bern.',
|
786 |
'remove_silence': False,
|
|
|
|
|
|
|
787 |
},
|
788 |
|
789 |
# E2 TODO: call switch model
|
test_tts_e2_f5_f5.py
CHANGED
@@ -4,12 +4,9 @@ from gradio_client import Client, handle_file
|
|
4 |
client = Client("mrfakename/E2-F5-TTS", hf_token=os.getenv('HF_TOKEN'))
|
5 |
endpoints = client.view_api(all_endpoints=True, print_info=False, return_format='dict')
|
6 |
result = client.predict(
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
remove_silence=False,
|
11 |
-
|
12 |
-
nfe_slider=32,
|
13 |
-
speed_slider=1,
|
14 |
-
api_name="/basic_tts",
|
15 |
)
|
|
|
4 |
client = Client("mrfakename/E2-F5-TTS", hf_token=os.getenv('HF_TOKEN'))
|
5 |
endpoints = client.view_api(all_endpoints=True, print_info=False, return_format='dict')
|
6 |
result = client.predict(
|
7 |
+
ref_audio=handle_file('voice_samples/EN_B00004_S00051_W000213.mp3'),
|
8 |
+
ref_text="The Hispaniola was rolling scuppers under in the ocean swell. The booms were tearing at the blocks, the rudder was banging to and fro, and the whole ship creaking, groaning, and jumping like a manufactory.",
|
9 |
+
gen_text="Please surprise me and speak in whatever voice you enjoy.",
|
10 |
remove_silence=False,
|
11 |
+
api_name="/predict",
|
|
|
|
|
|
|
12 |
)
|