mrfakename commited on
Commit
c6f3692
1 Parent(s): 475b2e4

Sync from GitHub repo

Browse files

This Space is synced from the GitHub repo: https://github.com/SWivid/F5-TTS. Please submit contributions to the Space there

Files changed (1) hide show
  1. finetune_gradio.py +4 -4
finetune_gradio.py CHANGED
@@ -339,7 +339,7 @@ def transcribe(file_audio,language="english"):
339
  )["text"].strip()
340
  return text_transcribe
341
 
342
- def transcribe_all(name_project,audio_file,language,user=False,progress=gr.Progress()):
343
  name_project+="_pinyin"
344
  path_project= os.path.join(path_data,name_project)
345
  path_dataset = os.path.join(path_project,"dataset")
@@ -357,7 +357,7 @@ def transcribe_all(name_project,audio_file,language,user=False,progress=gr.Progr
357
  if user:
358
  file_audios = [file for format in ('*.wav', '*.ogg', '*.opus', '*.mp3', '*.flac') for file in glob(os.path.join(path_dataset, format))]
359
  else:
360
- file_audios = [audio_file]
361
 
362
  print([file_audios])
363
 
@@ -580,7 +580,7 @@ with gr.Blocks() as app:
580
  ...
581
  ```""",visible=False)
582
 
583
- audio_speaker = gr.Audio(label="voice",type="filepath")
584
  txt_lang = gr.Text(label="Language",value="english")
585
  bt_transcribe=bt_create=gr.Button("transcribe")
586
  txt_info_transcribe=gr.Text(label="info",value="")
@@ -686,4 +686,4 @@ if __name__ == "__main__":
686
  #transcribe_all(name)
687
  #create_metadata(name)
688
 
689
- main()
 
339
  )["text"].strip()
340
  return text_transcribe
341
 
342
+ def transcribe_all(name_project,audio_files,language,user=False,progress=gr.Progress()):
343
  name_project+="_pinyin"
344
  path_project= os.path.join(path_data,name_project)
345
  path_dataset = os.path.join(path_project,"dataset")
 
357
  if user:
358
  file_audios = [file for format in ('*.wav', '*.ogg', '*.opus', '*.mp3', '*.flac') for file in glob(os.path.join(path_dataset, format))]
359
  else:
360
+ file_audios = audio_files
361
 
362
  print([file_audios])
363
 
 
580
  ...
581
  ```""",visible=False)
582
 
583
+ audio_speaker = gr.File(label="voice",type="filepath",file_count="multiple")
584
  txt_lang = gr.Text(label="Language",value="english")
585
  bt_transcribe=bt_create=gr.Button("transcribe")
586
  txt_info_transcribe=gr.Text(label="info",value="")
 
686
  #transcribe_all(name)
687
  #create_metadata(name)
688
 
689
+ main()