Pendrokar commited on
Commit
390ef0c
1 Parent(s): a4649b3

F5 TTS API fixed

Browse files
Files changed (2) hide show
  1. app.py +6 -7
  2. test_tts_e2_f5_f5.py +6 -6
app.py CHANGED
@@ -251,8 +251,8 @@ HF_SPACES = {
251
 
252
  # E2/F5 TTS
253
  'mrfakename/E2-F5-TTS': {
254
- 'name': 'F5 of E2 TTS',
255
- 'function': '/infer',
256
  'text_param_index': 2,
257
  'return_audio_index': 0,
258
  'is_zero_gpu_space': True,
@@ -298,7 +298,7 @@ HF_SPACES = {
298
  'series': 'StyleTTS',
299
  },
300
 
301
- # StyleTTS v2 kokoro fine tune
302
  'amphion/maskgct': {
303
  'name': 'MaskGCT',
304
  'function': '/predict',
@@ -424,10 +424,9 @@ OVERRIDE_INPUTS = {
424
  'mrfakename/E2-F5-TTS': {
425
  0: DEFAULT_VOICE_SAMPLE, # voice sample
426
  1: DEFAULT_VOICE_TRANSCRIPT, # transcript of sample (< 15 seconds required)
427
- 3: "F5-TTS", # model
428
- 4: False, # cleanup silence
429
- 5: 0.15, #crossfade
430
- 6: 1, #speed
431
  },
432
 
433
  # IMS-Toucan
 
251
 
252
  # E2/F5 TTS
253
  'mrfakename/E2-F5-TTS': {
254
+ 'name': 'F5 TTS',
255
+ 'function': '/basic_tts',
256
  'text_param_index': 2,
257
  'return_audio_index': 0,
258
  'is_zero_gpu_space': True,
 
298
  'series': 'StyleTTS',
299
  },
300
 
301
+ # MaskGCT (by Amphion)
302
  'amphion/maskgct': {
303
  'name': 'MaskGCT',
304
  'function': '/predict',
 
424
  'mrfakename/E2-F5-TTS': {
425
  0: DEFAULT_VOICE_SAMPLE, # voice sample
426
  1: DEFAULT_VOICE_TRANSCRIPT, # transcript of sample (< 15 seconds required)
427
+ 3: False, # cleanup silence
428
+ 4: 0.15, #crossfade
429
+ 5: 1, #speed
 
430
  },
431
 
432
  # IMS-Toucan
test_tts_e2_f5_f5.py CHANGED
@@ -3,12 +3,12 @@ from gradio_client import Client, handle_file
3
 
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
- print(endpoints)
7
  result = client.predict(
8
- ref_audio_orig=handle_file('https://cdn-uploads.huggingface.co/production/uploads/63d52e0c4e5642795617f668/V6-rMmI-P59DA4leWDIcK.wav'),
9
- 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.",
10
- gen_text="Please surprise me and speak in whatever voice you enjoy.",
11
- exp_name="F5-TTS",
12
  remove_silence=False,
13
- api_name="/infer",
 
 
14
  )
 
3
 
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_input=handle_file('https://cdn-uploads.huggingface.co/production/uploads/63d52e0c4e5642795617f668/V6-rMmI-P59DA4leWDIcK.wav'),
8
+ ref_text_input="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_input="Please surprise me and speak in whatever voice you enjoy.",
 
10
  remove_silence=False,
11
+ cross_fade_duration_slider=0.15,
12
+ speed_slider=1,
13
+ api_name="/basic_tts",
14
  )