Skip to content

dubbing: carry the free 15-second preview on DubbingResult (sonilo 0.21.0, sonilo-cli 0.20.0) - #46

Merged
spencer-zqian merged 1 commit into
mainfrom
feat/dubbing-free-preview
Sep 19, 2026
Merged

spencer-zqian merged 1 commit into
mainfrom
feat/dubbing-free-preview

Conversation

@spencer-zqian

Copy link
Copy Markdown
Contributor

What

The API now gives every self-serve account one free video translation run as a 15-second preview (sonilo-api-dashboard #374, live 2026-09-19): the first single-language call without scripts translates only the first 15 seconds of the video, at no charge, and the task carries trial_preview in every state:

"trial_preview": {
  "preview_seconds": 15,
  "source_duration_seconds": 60.0,
  "trimmed": true,
  "languages": 1,
  "full_video_cost_usd": 3.49,
  "message": "Free preview: the first 15 seconds of your 60-second video, in 1 language. Translating the full video costs $3.49 — add funds at https://platform.sonilo.com/dashboard/billing"
}

DubbingResult is a dataclass with explicit fields, so the block was dropped on parse; both READMEs and the context7 rule said dubbing had no free trial.

Changes

  • DubbingResult.trial_preview: Optional[Dict[str, Any]] — passed through whole (its fields are server-owned, like the subtitle reports); a non-object reads as None.
  • sonilo-cli dubbing: after the Wrote … line, prints the preview's message, so a 15 s clip is never mistaken for the whole translation.
  • README + sonilo-cli README: free-trial tables (1, as a 15-second preview for dubbing) and the dubbing sections; context7.json rule (kept under the 255-char limit).
  • Versions: sonilo 0.21.0 (pyproject.toml + _version.py), sonilo-cli 0.20.0 with its core pin widened to sonilo>=0.21.0,<0.22.

Tests

Two new parse tests (preview carried; None on a paid run or a malformed value). Run from a CI-identical throwaway venv (pip install -e ".[dev]" -e ./sonilo-video-kit[dev] -e ./sonilo-cli[dev]): core 359, sonilo-cli 182, sonilo-video-kit 53 — all passed.

Release order

Tag v0.21.0 first, then sonilo-cli-v0.20.0 — the CLI requires sonilo>=0.21.0, and the reverse order leaves pip install sonilo-cli unresolvable for the window between.

…onilo 0.21.0 and sonilo-cli 0.20.0

The API now gives every self-serve account one free video translation run
as a 15-second preview: the first single-language call without scripts
translates only the first 15 seconds, at no charge, and the task carries
`trial_preview` (preview_seconds, source_duration_seconds, trimmed,
languages, full_video_cost_usd, message). DubbingResult dropped that
field, and both READMEs and context7 said dubbing had no free trial.

- DubbingResult.trial_preview (dict or None), parsed whole; a non-object
  reads as "not a preview".
- sonilo-cli: after the "Wrote …" line, print the preview's message so
  the 15 s clip is never mistaken for the whole video.
- READMEs (free-trial tables + dubbing sections), context7 rule.
- sonilo 0.21.0 (pyproject + _version), sonilo-cli 0.20.0 with its core
  pin widened to >=0.21.0,<0.22.
@lightsage-app

lightsage-app Bot commented Sep 19, 2026

Copy link
Copy Markdown

Lightsage docs evals

Waiting 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: d0a361a
Status: waiting for staging docs URL

@spencer-zqian
spencer-zqian merged commit e94df66 into main Sep 19, 2026
2 checks passed
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.

1 participant