mirror of
https://github.com/openai/whisper.git
synced 2025-11-24 14:35:57 +00:00
Merge 3090931da0c4996a35557914c8c4d8edf5635a6f into c0d2f624c09dc18e709e37c2ad90c039a4eb72a2
This commit is contained in:
commit
fab8919dc8
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user