zameer2662 commited on
Commit
7123e51
·
verified ·
1 Parent(s): 27a2c19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -32,11 +32,24 @@ def run_tts(ref_audio, ref_text, gen_text, remove_silence=False):
32
  return output_wav_path
33
 
34
  # Create the main interface
35
- with gr.Blocks(title="🗣️ F5-TTS | Integrated By Muhammad Zameer ul Hassan") as demo:
 
 
 
 
 
 
 
36
  gr.Markdown("""
37
  # 🗣️ F5-TTS Text-to-Speech
38
 
39
  Upload a reference voice, give reference and generation text, and hear it in the same voice!
 
 
 
 
 
 
40
  """)
41
 
42
  with gr.Row():
@@ -59,8 +72,6 @@ with gr.Blocks(title="🗣️ F5-TTS | Integrated By Muhammad Zameer ul Hassan")
59
  with gr.Column():
60
  output_audio = gr.Audio(label="Generated Speech")
61
 
62
-
63
-
64
  generate_btn.click(
65
  fn=run_tts,
66
  inputs=[ref_audio, ref_text, gen_text, remove_silence],
@@ -68,4 +79,4 @@ with gr.Blocks(title="🗣️ F5-TTS | Integrated By Muhammad Zameer ul Hassan")
68
  )
69
 
70
  if __name__ == "__main__":
71
- demo.launch()
 
32
  return output_wav_path
33
 
34
  # Create the main interface
35
+ with gr.Blocks(
36
+ title="🗣️ F5-TTS | Integrated By Muhammad Zameer ul Hassan",
37
+ theme=gr.themes.Default(),
38
+ css="""
39
+ footer {visibility: hidden}
40
+ .gradio-container .prose {display: none !important}
41
+ """
42
+ ) as demo:
43
  gr.Markdown("""
44
  # 🗣️ F5-TTS Text-to-Speech
45
 
46
  Upload a reference voice, give reference and generation text, and hear it in the same voice!
47
+
48
+ **Instructions:**
49
+ 1. Upload a reference audio file (preferably 3-10 seconds)
50
+ 2. Enter the text that corresponds to your reference audio
51
+ 3. Enter the text you want to generate in the same voice
52
+ 4. Optionally enable silence removal for cleaner output
53
  """)
54
 
55
  with gr.Row():
 
72
  with gr.Column():
73
  output_audio = gr.Audio(label="Generated Speech")
74
 
 
 
75
  generate_btn.click(
76
  fn=run_tts,
77
  inputs=[ref_audio, ref_text, gen_text, remove_silence],
 
79
  )
80
 
81
  if __name__ == "__main__":
82
+ demo.launch(show_api=False)