Skip to content

feat: add zero-dep ByteDance CapCut cloud subtitle translation - #169

Merged
renezander030 merged 1 commit into
renezander030:masterfrom
datnt-97:feat/cloud-translate
Nov 4, 2026
Merged

renezander030 merged 1 commit into
renezander030:masterfrom
datnt-97:feat/cloud-translate

Conversation

@datnt-97

@datnt-97 datnt-97 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for native ByteDance CapCut cloud subtitle translation, completing the companion workflow for #157:

  1. capcut translate <project> --to <lang> --out <path> --cloud:

    • Zero-dependency cloud translation using CapCut's native sync task endpoint (/lv/v1/common_task/sync with req_key: cc_audio_subtitle_translate).
    • Translates all draft text materials to the target language without requiring an Anthropic API key (ANTHROPIC_API_KEY).
    • Supports language aliases and normalization (e.g. vietnamese / vi, spanish / es, simplified chinese / zh-CN, traditional chinese / zh-TW, japanese / ja, korean / ko, russian / ru, etc.).
    • Batches utterances in chunks of 50 with built-in retries and timeouts.
    • Supports --dry-run to inspect what would be translated without making network calls.
  2. capcut caption <project> ... --translate <lang>:

    • Integrates translation directly into the caption workflow.
    • Preserves word-level timing offsets for translated captions (translation_words), enabling word-reveal and gold karaoke highlighting (--karaoke, --word-reveal) in the translated language.
  3. Validation & Tests:

    • Added unit and integration tests in test/cloud-translate.test.mjs covering language normalization, empty input guards, --dry-run, live draft translation, and live caption translation with word timing verification.
    • Updated command specifications and generated documentation via npm run docs:commands.
    • Formatted and verified with @biomejs/biome check (0 errors, 0 warnings).

@renezander030
renezander030 merged commit ae4c0fc into renezander030:master Nov 4, 2026
14 of 15 checks passed
renezander030 added a commit that referenced this pull request Nov 4, 2026
Follow-up to #169 (CapCut cloud translation, contributed by datnt-97), the way #158 followed #157. Neither flag has been released yet.
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.

2 participants