hhguo commited on
Commit
10b5125
·
1 Parent(s): b6d3994
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import gradio as gr
 
2
  import os
3
  import requests
4
  from fireredtts.fireredtts import FireRedTTS
@@ -43,9 +44,9 @@ def tts_inference(text, prompt_wav='examples/prompt_1.wav', lang='zh'):
43
  iface = gr.Interface(
44
  fn=tts_inference,
45
  inputs=[
46
- gr.Textbox(label="输入文本"),
47
- # gr.Dropdown(["en-US-Wav2Vec2-Kendra", "en-US-Wav2Vec2-John"], label="选择声音"),
48
- # gr.Slider(minimum=0.5, maximum=2.0, value=1.0, label="语速")
49
  ],
50
  outputs=gr.Audio(label="生成的语音"),
51
  title="TTS Demo",
 
1
  import gradio as gr
2
+ import numpy as np
3
  import os
4
  import requests
5
  from fireredtts.fireredtts import FireRedTTS
 
44
  iface = gr.Interface(
45
  fn=tts_inference,
46
  inputs=[
47
+ gr.Textbox(label="Input text here"),
48
+ gr.Audio(source="upload", type="filepath", label="Upload reference audio")
49
+ gr.Dropdown(["en", "zh"], label="Select language"),
50
  ],
51
  outputs=gr.Audio(label="生成的语音"),
52
  title="TTS Demo",