jiamengjiameng commited on
Commit
a8f789a
·
verified ·
1 Parent(s): ea7eb85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
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(ref_text, ref_audio_path, gen_text):
 
 
 
 
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