From 7d6fee9df1b90d9521ffd871045b08ae00de2455 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sun, 19 Apr 2026 16:13:34 +0200 Subject: [PATCH] fix: copy read-only numpy array before torch conversion in EAT preprocessing Co-Authored-By: Claude Opus 4.6 --- core/audio_scan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/audio_scan.py b/core/audio_scan.py index d41dfbe..bffd23d 100644 --- a/core/audio_scan.py +++ b/core/audio_scan.py @@ -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,