fix: copy read-only numpy array before torch conversion in EAT preprocessing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 16:13:34 +02:00
parent fd043f4172
commit 7d6fee9df1
+1 -1
View File
@@ -135,7 +135,7 @@ def _eat_preprocess(chunks: list[np.ndarray], sr: int, device: str):
mels = []
for chunk in chunks:
wav = torch.from_numpy(chunk).unsqueeze(0).float()
wav = torch.from_numpy(np.array(chunk)).unsqueeze(0).float()
fbank = kaldi.fbank(
wav, htk_compat=True, sample_frequency=sr, use_energy=False,
window_type='hanning', num_mel_bins=128, dither=0.0, frame_shift=10,