Преглед изворни кода

Remove silence padding (it make sounds unnatural)

Lengyue пре 1 година
родитељ
комит
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