diff --git a/whisper/audio.py b/whisper/audio.py index 826250f..caf0feb 100644 --- a/whisper/audio.py +++ b/whisper/audio.py @@ -59,7 +59,7 @@ def load_audio(file: str, sr: int = SAMPLE_RATE): except CalledProcessError as e: raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e - return np.frombuffer(out, np.int16).flatten().astype(np.float32) / 32768.0 + return np.frombuffer(out, np.int16).astype(np.float32) / 32768.0 def pad_or_trim(array, length: int = N_SAMPLES, *, axis: int = -1):