mirror of
https://github.com/openai/whisper.git
synced 2025-03-30 14:28:27 +00:00
Merge 144640ded4aa2ce62e0519b58b855989a2a64f26 into 517a43ecd132a2089d85f4ebc044728a71d49f6e
This commit is contained in:
commit
dcf899fb4a
@ -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