ITS-C4SF733\Administrator commited on
Commit
034f0d6
·
1 Parent(s): e433fc3
Files changed (1) hide show
  1. app.py +2 -2
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
- message = f"Cut into {len(sentences)} sentences"
333
- return message, (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
 
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