Spaces:
Build error
Build error
fix bug
Browse files
app.py
CHANGED
|
@@ -329,8 +329,8 @@ def infer_long_text(text, preset_prompt, prompt=None, language='auto', accent='n
|
|
| 329 |
samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device))
|
| 330 |
|
| 331 |
model.to('cpu')
|
| 332 |
-
|
| 333 |
-
return
|
| 334 |
elif mode == "sliding-window":
|
| 335 |
complete_tokens = torch.zeros([1, NUM_QUANTIZERS, 0]).type(torch.LongTensor).to(device)
|
| 336 |
original_audio_prompts = audio_prompts
|
|
|
|
| 329 |
samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device))
|
| 330 |
|
| 331 |
model.to('cpu')
|
| 332 |
+
print(f"Cut into {len(sentences)} sentences")
|
| 333 |
+
return 24000, samples.squeeze(0).cpu().numpy()
|
| 334 |
elif mode == "sliding-window":
|
| 335 |
complete_tokens = torch.zeros([1, NUM_QUANTIZERS, 0]).type(torch.LongTensor).to(device)
|
| 336 |
original_audio_prompts = audio_prompts
|