Spaces:
Build error
Build error
Commit
·
82f9906
1
Parent(s):
e04af2a
Temp file
Browse files
app.py
CHANGED
@@ -1,15 +1,18 @@
|
|
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 |
-
|
8 |
-
|
|
|
|
|
9 |
print("> Done")
|
10 |
|
11 |
-
return
|
12 |
|
13 |
app = gr.Interface(fn=greet, inputs=[gr.Audio(type="filepath"), gr.Audio(type="filepath")], outputs=gr.Audio(type="filepath"))
|
14 |
-
app.queue(max_size=5000, concurrency_count=
|
15 |
app.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from TTS.api import TTS
|
3 |
+
import tempfile
|
4 |
|
5 |
api = TTS(model_name="voice_conversion_models/multilingual/vctk/freevc24")
|
6 |
|
7 |
def greet(source, target):
|
8 |
+
path = tempfile.NamedTemporaryFile().name
|
9 |
+
|
10 |
+
print("adio", source, target, path)
|
11 |
+
api.voice_conversion_to_file(source_wav=source, target_wav=target, file_path=path)
|
12 |
print("> Done")
|
13 |
|
14 |
+
return path
|
15 |
|
16 |
app = gr.Interface(fn=greet, inputs=[gr.Audio(type="filepath"), gr.Audio(type="filepath")], outputs=gr.Audio(type="filepath"))
|
17 |
+
app.queue(max_size=5000, concurrency_count=5)
|
18 |
app.launch()
|