Spaces:
Running
Running
Commit
·
44f4964
1
Parent(s):
d8c37e7
Update app.py
Browse files
app.py
CHANGED
@@ -46,17 +46,21 @@ def inference(
|
|
46 |
else:
|
47 |
voice_samples, conditioning_latents = load_voices(voices)
|
48 |
|
49 |
-
|
50 |
|
51 |
for j, text in enumerate(texts):
|
52 |
for audio_frame in tts.tts_with_preset(
|
53 |
text,
|
54 |
voice_samples=voice_samples,
|
55 |
conditioning_latents=conditioning_latents,
|
56 |
-
preset=
|
57 |
k=1
|
58 |
):
|
59 |
-
|
|
|
|
|
|
|
|
|
60 |
|
61 |
def main():
|
62 |
title = "Tortoise TTS "
|
|
|
46 |
else:
|
47 |
voice_samples, conditioning_latents = load_voices(voices)
|
48 |
|
49 |
+
audio_frames = []
|
50 |
|
51 |
for j, text in enumerate(texts):
|
52 |
for audio_frame in tts.tts_with_preset(
|
53 |
text,
|
54 |
voice_samples=voice_samples,
|
55 |
conditioning_latents=conditioning_latents,
|
56 |
+
preset=Preset,
|
57 |
k=1
|
58 |
):
|
59 |
+
audio_frames.append(torch.from_numpy(audio_frame.cpu().detach().numpy()))
|
60 |
+
|
61 |
+
complete_audio = torch.cat(audio_frames, dim=0)
|
62 |
+
|
63 |
+
yield (24000, complete_audio.numpy())
|
64 |
|
65 |
def main():
|
66 |
title = "Tortoise TTS "
|