mirror of
https://github.com/openai/whisper.git
synced 2025-11-24 14:35:57 +00:00
Merge 144640ded4aa2ce62e0519b58b855989a2a64f26 into c0d2f624c09dc18e709e37c2ad90c039a4eb72a2
This commit is contained in:
commit
d94ea77a90
@ -55,7 +55,11 @@ def load_audio(file: str, sr: int = SAMPLE_RATE):
|
||||
]
|
||||
# fmt: on
|
||||
try:
|
||||
out = run(cmd, capture_output=True, check=True).stdout
|
||||
creationflags = None
|
||||
if os.name == 'nt':
|
||||
from subprocess import CREATE_NO_WINDOW
|
||||
creationflags = CREATE_NO_WINDOW
|
||||
out = run(cmd, capture_output=True, check=True, creationflags=creationflags).stdout
|
||||
except CalledProcessError as e:
|
||||
raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user