Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -168,7 +168,8 @@ def generate_audio(script_output, voice1, voice2, num_hosts, temperature, top_p,
|
|
168 |
|
169 |
code_list = parse_output(generated_ids)
|
170 |
# Use the correct method for audio generation based on your SNAC model
|
171 |
-
|
|
|
172 |
paragraph_audio = paragraph_audio.cpu().numpy().flatten()
|
173 |
|
174 |
silences = detect_silence(paragraph_audio)
|
|
|
168 |
|
169 |
code_list = parse_output(generated_ids)
|
170 |
# Use the correct method for audio generation based on your SNAC model
|
171 |
+
codes_tensor = torch.tensor(code_list).unsqueeze(0).to(device)
|
172 |
+
paragraph_audio = snac_model(codes_tensor)
|
173 |
paragraph_audio = paragraph_audio.cpu().numpy().flatten()
|
174 |
|
175 |
silences = detect_silence(paragraph_audio)
|