Repository navigation
fix: dub with a real translation, any TTS provider, and lines placed on time - #359
Merged
Merged
Conversation
…on time `vibe audio dub` "translated" by calling Claude's storyboard analysis and reading each scene description as a translated line, so output was garbage or silently the source text. It then concatenated the spoken lines, ignoring when each was said, and required ElevenLabs and Anthropic keys. - `translateTexts` (extracted from translate-srt) translates in batches with Claude, or OpenAI without an Anthropic key, matching replies by their [N] index so a skipped or reordered line cannot shift later ones. translate-srt uses it too. - Each line is spoken through `tts-resolve` (new `--tts auto|elevenlabs| openai|kokoro`), placed at its segment's start time with ffmpeg, and sped up (up to 1.5x) when it would overrun its slot. - Only OPENAI_API_KEY is required (Whisper); temp files live in a temp dir that is always removed. Claude-Session: https://claude.ai/code/session_011S1BLTaFctZNQzGERpkCuA
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Bug
vibe audio dubhad three problems:analyzeContent) and read each returned scenedescriptionas a translated line. The output was either unrelated text or, through a silent fallback, the untranslated source.Fix
translateTexts, extracted fromtranslate-srt, translates in batches with Claude, or OpenAI when there's no Anthropic key. Replies are matched by their[N]index, so a skipped, reordered, or chatty reply cannot shift later lines; missing lines keep the source text.translate-srtuses it too, so both share one implementation overproviderRequest.tts-resolve(new--tts auto|elevenlabs|openai|kokoro, also on theaudio_dubtool).adelay+amix), and sped up (at most 1.5x) when it would overrun its slot.OPENAI_API_KEY(Whisper) is required. Temp files go in a temp dir that is always removed.Verification
translateTextstests cover index matching with out-of-order, missing, and preamble lines, the OpenAI fallback, batching, and a missing key asauth.pnpm build,lint,typecheck, tests (CLI 1347 including integration), pre-push gate.vibe audio dub long.mp3 -l ko --tts openai --jsonon a 7.5 s English clip with two lines:https://claude.ai/code/session_011S1BLTaFctZNQzGERpkCuA