Merge 3090931da0c4996a35557914c8c4d8edf5635a6f into c0d2f624c09dc18e709e37c2ad90c039a4eb72a2

This commit is contained in:
ryanheise 2025-06-27 02:27:46 +00:00 committed by GitHub
commit fab8919dc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,7 +59,7 @@ def load_audio(file: str, sr: int = SAMPLE_RATE):
except CalledProcessError as e: except CalledProcessError as e:
raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from 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): def pad_or_trim(array, length: int = N_SAMPLES, *, axis: int = -1):