Spaces:
Running
Running
Commit
·
7b8a54e
1
Parent(s):
45ef1c8
fixed it
Browse files
app.py
CHANGED
|
@@ -5,10 +5,10 @@ sys.path.append("neutts-air")
|
|
| 5 |
from neuttsair.neutts import NeuTTSAir
|
| 6 |
import gradio as gr
|
| 7 |
|
| 8 |
-
SAMPLES_PATH = "
|
| 9 |
DEFAULT_REF_TEXT = "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."
|
| 10 |
DEFAULT_REF_PATH = os.path.join(SAMPLES_PATH, "dave.wav")
|
| 11 |
-
DEFAULT_GEN_TEXT = "
|
| 12 |
|
| 13 |
tts = NeuTTSAir(
|
| 14 |
backbone_repo="neuphonic/neutts-air",
|
|
@@ -32,9 +32,12 @@ def infer(ref_text, ref_audio_path, gen_text):
|
|
| 32 |
demo = gr.Interface(
|
| 33 |
fn=infer,
|
| 34 |
inputs=[
|
| 35 |
-
gr.Textbox(label="Reference Text"
|
| 36 |
-
gr.Audio(type="filepath", label="Reference Audio"
|
| 37 |
-
gr.Textbox(label="Text to Generate"
|
|
|
|
|
|
|
|
|
|
| 38 |
],
|
| 39 |
outputs=gr.Audio(type="numpy", label="Generated Speech"),
|
| 40 |
title="NeuTTS-Air☁️",
|
|
|
|
| 5 |
from neuttsair.neutts import NeuTTSAir
|
| 6 |
import gradio as gr
|
| 7 |
|
| 8 |
+
SAMPLES_PATH = os.path.join(os.getcwd(), "neutts-air", "samples")
|
| 9 |
DEFAULT_REF_TEXT = "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."
|
| 10 |
DEFAULT_REF_PATH = os.path.join(SAMPLES_PATH, "dave.wav")
|
| 11 |
+
DEFAULT_GEN_TEXT = "My name is Dave, and um, I'm from London."
|
| 12 |
|
| 13 |
tts = NeuTTSAir(
|
| 14 |
backbone_repo="neuphonic/neutts-air",
|
|
|
|
| 32 |
demo = gr.Interface(
|
| 33 |
fn=infer,
|
| 34 |
inputs=[
|
| 35 |
+
gr.Textbox(label="Reference Text"),
|
| 36 |
+
gr.Audio(type="filepath", label="Reference Audio"),
|
| 37 |
+
gr.Textbox(label="Text to Generate"),
|
| 38 |
+
],
|
| 39 |
+
examples=[
|
| 40 |
+
[DEFAULT_REF_TEXT, DEFAULT_REF_PATH, DEFAULT_GEN_TEXT]
|
| 41 |
],
|
| 42 |
outputs=gr.Audio(type="numpy", label="Generated Speech"),
|
| 43 |
title="NeuTTS-Air☁️",
|