fix(hyperframes-media): create the output dir for ElevenLabs TTS before writing#1960
Draft
miguel-heygen wants to merge 1 commit into
Draft
fix(hyperframes-media): create the output dir for ElevenLabs TTS before writing#1960miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
…re writing
synthesizeOne's elevenlabs branch spawns a Python helper that writes
straight to wavAbs, but — unlike the heygen path (which mkdirs via
transcodeToWav / directly) and the kokoro path (where the `hyperframes
tts` CLI owns the output dir) — it never created the parent directory.
On a fresh project with no assets/voice/ yet, the Python save failed and
the line was silently dropped as "TTS failed - omitted", so every
ElevenLabs line vanished until the user hand-created assets/voice.
Fix: mkdirSync(dirname(wavAbs), { recursive: true }) before spawning,
matching the other providers.
Test: new tts.test.mjs case drives synthesizeOne(elevenlabs) with a
nested, not-yet-created wavAbs and asserts the output dir exists
afterward — independent of whether the (keyless) Python actually writes
a file, since the mkdir runs before the spawn either way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
synthesizeOne's elevenlabs branch spawns a Python helper that writes straight towavAbs, but — unlike the heygen path (whichmkdirs viatranscodeToWav/ directly) and the kokoro path (where thehyperframes ttsCLI owns the output dir) — it never created the parent directory. On a fresh project with noassets/voice/yet, the Pythonsavefailed and the line was silently dropped as "TTS failed - omitted", so every ElevenLabs line vanished until the user hand-createdassets/voice.Reported precisely (the reporter traced it to the missing
mkdirSync(dirname(wavAbs))that the other two providers have).Fix
mkdirSync(dirname(wavAbs), { recursive: true })before spawning, matching the other providers. One line;dirname/mkdirSyncwere already imported.Test plan
New
tts.test.mjscase drivessynthesizeOne({ provider: "elevenlabs", … })with a nested, not-yet-createdwavAbsand asserts the output dir exists afterward — independent of whether the (keyless) Python actually writes a file, since themkdirruns before the spawn either way.node --test skills/hyperframes-media/scripts/lib/tts.test.mjs— 6/6 passing.node --check+oxlint/oxfmtclean; fullbun run buildclean.From the same ~20h feedback backlog: PR #1959 (Windows symlink EPERM) got a 2nd independent confirmation, and several "spawn EINVAL" reports corroborate PR #1937 (ffmpeg .cmd-vs-.exe). Other precise items logged for follow-up: a Windows npx/
npm_execpathsilent-TTS-failure, a Lambda__dirname-in-ESM boot crash (build-zip.tsbanner), and a static-dedup freeze for<template>-mounted sub-comps on a zero-tween host.