Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import os
|
|
| 3 |
import sys
|
| 4 |
sys.path.append("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")
|
|
@@ -18,7 +19,11 @@ tts = NeuTTSAir(
|
|
| 18 |
)
|
| 19 |
|
| 20 |
@spaces.GPU()
|
| 21 |
-
def infer(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
"""
|
| 23 |
Generates speech using NeuTTS-Air given a reference audio and text, and new text to synthesize.
|
| 24 |
|
|
|
|
| 3 |
import sys
|
| 4 |
sys.path.append("neutts-air")
|
| 5 |
from neuttsair.neutts import NeuTTSAir
|
| 6 |
+
import numpy as np
|
| 7 |
import gradio as gr
|
| 8 |
|
| 9 |
SAMPLES_PATH = os.path.join(os.getcwd(), "neutts-air", "samples")
|
|
|
|
| 19 |
)
|
| 20 |
|
| 21 |
@spaces.GPU()
|
| 22 |
+
def infer(
|
| 23 |
+
ref_text: str,
|
| 24 |
+
ref_audio_path: str,
|
| 25 |
+
gen_text: str,
|
| 26 |
+
) -> tuple[int, np.ndarray]:
|
| 27 |
"""
|
| 28 |
Generates speech using NeuTTS-Air given a reference audio and text, and new text to synthesize.
|
| 29 |
|