Repository navigation
Proofread: transcribe a video and translate the transcript to editable SRTs - #84
Merged
Merged
Conversation
…e SRTs Adds client.proofread (submit/generate) for POST /v1/proofread, mirroring dubbing's shape: multipart with exactly one of video / videoUrl (https only, checked locally because the pipeline rejects plain http), optional languages sent as a JSON-array form field and omitted when unset — omitting it is what asks for the source-language transcript alone — and optional sourceLanguage. Language codes are not validated client-side; the server owns that list. ProofreadResult carries subtitles (language -> .srt URL, always including the detected source_language), source_language, cue_count and warnings, a map of language to non-blocking ProofreadIssue (cue, code, severity, plus whatever measurement the server-owned code brought with it). No save helpers, because DubbingResult has none in this SDK either. CLI: `sonilo proofread` with --video/--video-url, --languages, --source-language and --output, a filename template defaulting to proofread.srt that writes one .srt per language with the code inserted before the extension (scripts/clip.srt -> scripts/clip.en.srt) and creates missing directories. It then prints the detected source language, the cue count and one line per warning, and waits with the SDK's normal default timeout rather than dubbing's two hours.
Lightsage docs evalsWaiting for the staging docs URL before running evals. Lightsage will start the selected PR evals automatically when GitHub reports a successful docs deployment for this PR. This usually happens within 15 minutes. Commit: |
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
Adds the new
POST /v1/proofreadendpoint tosoniloandsonilo-cli, the TypeScript twin of sonilo-ai/sonilo-python#45. Proofread transcribes a video and translates the transcript into editable.srtfiles, one per requested language plus the detected source language. It is the step beforedubbing: correct the wording, then pass the files todubbingassubtitles[<language>].client.proofread.submit(...)/generate(...)with exactly one ofvideo/videoUrl(https), optionallanguages(sent as the JSON-array string part) andsourceLanguage; language codes are not validated client-side (server-owned, like dubbing).ProofreadResultwithsubtitles(language → URL),source_language,cue_count,warnings(language →ProofreadIssue[]), snake_case like every other result type here. No save helpers, matchingDubbingResult.sonilo proofread --video clip.mp4 --languages ja,zh_cn --output scripts/clip.srtwritesscripts/clip.<lang>.srtthrough the same--outputtemplate asdubbing, then prints the source language, cue count and one line per warning.sonilominor,sonilo-climinor.Test plan
npm ci && npm run lint && npm run build && npm test: cli 205, sonilo 237 (13 new), video-kit 137 pass.ProofreadResult.