Spaces:
Running
Running
Commit
·
3f3d89a
1
Parent(s):
58068be
added defaults
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import spaces
|
|
|
|
| 2 |
import sys
|
| 3 |
sys.path.append("neutts-air")
|
| 4 |
from neuttsair.neutts import NeuTTSAir
|
|
@@ -27,12 +28,12 @@ def infer(ref_text, ref_audio_path, gen_text):
|
|
| 27 |
demo = gr.Interface(
|
| 28 |
fn=infer,
|
| 29 |
inputs=[
|
| 30 |
-
gr.Textbox(label="Reference Text"),
|
| 31 |
-
gr.Audio(type="filepath", label="Reference Audio"),
|
| 32 |
-
gr.Textbox(label="Text to Generate"),
|
| 33 |
],
|
| 34 |
outputs=gr.Audio(type="numpy", label="Generated Speech"),
|
| 35 |
-
title="NeuTTS-Air",
|
| 36 |
description="Upload a reference audio sample, provide the reference text, and enter new text to synthesize."
|
| 37 |
)
|
| 38 |
|
|
|
|
| 1 |
import spaces
|
| 2 |
+
import os
|
| 3 |
import sys
|
| 4 |
sys.path.append("neutts-air")
|
| 5 |
from neuttsair.neutts import NeuTTSAir
|
|
|
|
| 28 |
demo = gr.Interface(
|
| 29 |
fn=infer,
|
| 30 |
inputs=[
|
| 31 |
+
gr.Textbox(label="Reference Text", value="So I'm live on radio. And I say, well, my dear friend James here clearly, and the whole room just froze. Turns out I'd completely misspoken and mentioned our other friend."),
|
| 32 |
+
gr.Audio(type="filepath", label="Reference Audio", value=os.path.join(os.getcwd(), "/neutts-air/samples/dave.wav")),
|
| 33 |
+
gr.Textbox(label="Text to Generate", value="My name is Dave, and um, I'm from London."),
|
| 34 |
],
|
| 35 |
outputs=gr.Audio(type="numpy", label="Generated Speech"),
|
| 36 |
+
title="NeuTTS-Air☁️",
|
| 37 |
description="Upload a reference audio sample, provide the reference text, and enter new text to synthesize."
|
| 38 |
)
|
| 39 |
|