BasToTheMax commited on
Commit
212dccf
·
1 Parent(s): c990b0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,7 +1,11 @@
1
  import gradio as gr
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
7
  iface.launch()
 
1
  import gradio as gr
2
+ from TTS.api import TTS
3
 
4
+ api = TTS(model_name="voice_conversion_models/multilingual/vctk/freevc24")
 
5
 
6
+ def greet(source, target):
7
+ tts.voice_conversion_to_file(source_wav=source, target_wav=target, file_path="/tmp/out.wav")
8
+ return "/tmp/out.wav"
9
+
10
+ iface = gr.Interface(fn=greet, inputs=[gr.Audio(type="filepath"), gr.Audio(type="filepath")], outputs=gr.Audio(type="filepath"))
11
  iface.launch()