Merge 144640ded4aa2ce62e0519b58b855989a2a64f26 into 517a43ecd132a2089d85f4ebc044728a71d49f6e

This commit is contained in:
Menonro 2025-01-16 08:02:00 -05:00 committed by GitHub
commit dcf899fb4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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