Spaces:
Runtime error
Runtime error
Digital Xingtong
commited on
Commit
•
cabd1e3
1
Parent(s):
9116564
Update app.py
Browse files
app.py
CHANGED
@@ -77,6 +77,7 @@ def convert_wav_to_ogg(wav_file):
|
|
77 |
os.rename(wav_file.name, renamed_input_path)
|
78 |
command = ["ffmpeg", "-i", renamed_input_path, "-acodec", "libopus", "-y", output_path_ogg]
|
79 |
os.system(" ".join(command))
|
|
|
80 |
def tts_fn(text, speaker, sdp_ratio, noise_scale, noise_scale_w, length_scale):
|
81 |
with torch.no_grad():
|
82 |
audio = infer(text, sdp_ratio=sdp_ratio, noise_scale=noise_scale, noise_scale_w=noise_scale_w, length_scale=length_scale, sid=speaker)
|
|
|
77 |
os.rename(wav_file.name, renamed_input_path)
|
78 |
command = ["ffmpeg", "-i", renamed_input_path, "-acodec", "libopus", "-y", output_path_ogg]
|
79 |
os.system(" ".join(command))
|
80 |
+
return output_path_ogg
|
81 |
def tts_fn(text, speaker, sdp_ratio, noise_scale, noise_scale_w, length_scale):
|
82 |
with torch.no_grad():
|
83 |
audio = infer(text, sdp_ratio=sdp_ratio, noise_scale=noise_scale, noise_scale_w=noise_scale_w, length_scale=length_scale, sid=speaker)
|