Skip to content

fix(media-use): create the output dir before ElevenLabs TTS writes [P1]#2032

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/media-use-elevenlabs-mkdir
Jul 7, 2026
Merged

fix(media-use): create the output dir before ElevenLabs TTS writes [P1]#2032
miguel-heygen merged 1 commit into
mainfrom
fix/media-use-elevenlabs-mkdir

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Migrates #1960, whose skills/hyperframes-media path was retired into skills/media-use (via #… media-use v2). The bug moved with the file — I confirmed it still exists at the new path.

Problem

The ElevenLabs provider in skills/media-use/audio/scripts/lib/tts.mjs spawns a Python helper that writes straight to wavAbs via a bare open(). Unlike heygen (transcodeToWav) and kokoro (the hyperframes tts CLI), it never creates the parent dir, so on a fresh project (no assets/voice/ yet) the save throws ENOENT and the line is silently dropped as "TTS failed - omitted".

Fix

mkdir -p the output dir before the spawn, guarded so a mkdir failure (EACCES/EROFS) returns { ok:false } like the rest of the branch rather than throwing — synthesizeOne's contract is "never throws; failures return { ok:false }" (incorporates the try/catch parity note from @rames' review on #1960). Adds a regression test that drives synthesizeOne with a nested output path and asserts the dir is created. 6/6 tts.test.mjs pass.

The ElevenLabs provider spawns a Python helper that writes straight to wavAbs
via a bare open(), which (unlike heygen/kokoro) never creates the parent dir —
so on a fresh project the save throws ENOENT and the line is silently dropped
as 'TTS failed - omitted'. mkdir -p the dir first, guarded so a mkdir failure
(EACCES/EROFS) returns { ok:false } like the rest of the branch rather than
throwing. (Migrated from #1960, whose skills/hyperframes-media path was retired
into skills/media-use; the bug moved with it.)
@miguel-heygen miguel-heygen force-pushed the fix/media-use-elevenlabs-mkdir branch from 96bc759 to f28540b Compare July 7, 2026 21:12
@miguel-heygen miguel-heygen merged commit 42a2095 into main Jul 7, 2026
39 checks passed
@miguel-heygen miguel-heygen deleted the fix/media-use-elevenlabs-mkdir branch July 7, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant