mirror of
https://github.com/openai/whisper.git
synced 2025-11-24 14:35:57 +00:00
Hiding a window is now only for Windows systems
This commit is contained in:
parent
4fda47955b
commit
2566f688ee
@ -55,7 +55,10 @@ def load_audio(file: str, sr: int = SAMPLE_RATE):
|
||||
]
|
||||
# fmt: on
|
||||
try:
|
||||
out = run(cmd, capture_output=True, check=True, creationflags=CREATE_NO_WINDOW).stdout
|
||||
creationflags = None
|
||||
if os.name == 'nt':
|
||||
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