bluenevus commited on
Commit
0b2e588
·
verified ·
1 Parent(s): 0d7ce74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- paragraph_audio = snac_model.generate_audio(torch.tensor(code_list).unsqueeze(0).to(device))
 
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)