Repository navigation
feat(caption): add --cloud option for CapCut Cloud ASR transcription - #157
Merged
renezander030 merged 2 commits intoOct 21, 2026
Merged
Conversation
Owner
|
Thanks a lot for this, @datnt-97! Captions without a local Whisper install is a great idea, and the zero-dependency SigV4 signer fits the project nicely. I'm reviewing it now and will get back to you shortly. |
… to ByteDance - The cloud task was always created for 200 s, whatever the audio's length. It now covers the real length, read with ffprobe (the draft's material duration for --from-segment), and refuses before any upload when the length cannot be read. - --cloud is labelled experimental and unofficial in the help, the command spec, the API reference, the changelog and the module header: it calls CapCut's private endpoints, not a published API. - Every --cloud run names the uploaded file on stderr, and the README's "no upload" promise (EN and zh-CN) names the one opt-in exception. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
This PR adds an opt-in
--cloudflag tocapcut caption, allowing users to transcribe audio directly via CapCut's official cloud ASR service without requiring a local Whisper installation (such asopenai-whisperorwhisper-cli).Key Highlights
src/capcut-cloud-asr.ts) uses Node 18+ standard built-ins (fetch,node:crypto,node:fs). It includes a pure TypeScript implementation of AWS Signature Version 4 (signAwsV4) and lookup-table CRC32 calculation.--karaoke,--word-reveal,--scriptalignment, and--highlight-words.--cloudonly runs when explicitly requested.--cloudwith--wordsor--whisper-*) and handles timeout/retry gracefully.Test Coverage