Просмотр исходного кода

Remove silence padding (it make sounds unnatural)

Lengyue 1 год назад
Родитель
Сommit
58cdfd7b5c
2 измененных файлов с 0 добавлено и 2 удалено
  1. 0 1
      tools/api.py
  2. 0 1
      tools/webui.py

+ 0 - 1
tools/api.py

@@ -156,7 +156,6 @@ def inference(req: InvokeRequest):
             indices=result[None], feature_lengths=feature_lengths, return_audios=True
         )[0, 0]
         fake_audios = fake_audios.float().cpu().numpy()
-        fake_audios = np.concatenate([fake_audios, np.zeros((11025,))], axis=0)
 
         if req.streaming:
             yield (fake_audios * 32768).astype(np.int16).tobytes()

+ 0 - 1
tools/webui.py

@@ -139,7 +139,6 @@ def inference(
             indices=result[None], feature_lengths=feature_lengths, return_audios=True
         )[0, 0]
         fake_audios = fake_audios.float().cpu().numpy()
-        fake_audios = np.concatenate([fake_audios, np.zeros((11025,))], axis=0)
 
         if streaming:
             yield (fake_audios * 32768).astype(np.int16).tobytes(), None