Merge 144640ded4aa2ce62e0519b58b855989a2a64f26 into c0d2f624c09dc18e709e37c2ad90c039a4eb72a2

This commit is contained in:
Menonro 2025-06-27 02:27:50 +00:00 committed by GitHub
commit d94ea77a90
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