From 153814ecc27f0c8c27715c43ea3b6eaa450fc9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Fri, 10 Apr 2026 13:19:20 -0700 Subject: [PATCH] scripts/evals: create recording subdirectories when saving audio Example files can live under subdirectories (e.g. foundational/01.py), so the recording path needs its parent directory created before the audio file is written. --- scripts/evals/eval.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/evals/eval.py b/scripts/evals/eval.py index 925853981..fc9997318 100644 --- a/scripts/evals/eval.py +++ b/scripts/evals/eval.py @@ -171,6 +171,7 @@ class EvalRunner: async def save_audio(self, name: str, audio: bytes, sample_rate: int, num_channels: int): if len(audio) > 0: filename = self._recording_file_name(name) + os.makedirs(os.path.dirname(filename), exist_ok=True) logger.debug(f"Saving {name} audio to {filename}") with io.BytesIO() as buffer: with wave.open(buffer, "wb") as wf: