From fcc0680ee10f6fb58109165451c45a913a3b38db Mon Sep 17 00:00:00 2001 From: Steven Pan Date: Mon, 24 Aug 2026 12:01:30 -0700 Subject: [PATCH] Document ar, tr, vi and id as dubbing targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pipeline gained Arabic, Turkish, Vietnamese and Indonesian; this SDK and its CLI kept listing thirteen. Neither validates language codes locally — `languages` travels as an opaque JSON array string that the backend parses — so nothing was rejecting the new codes. What was stale is the list a caller reads: `--languages --help`, both READMEs, and the context7 rule a model reads when it picks languages on the user's behalf. ar is unqualified Arabic rather than one of HeyGen's seventeen country variants, so it is the es/pt shape and not the pt_br one; each doc line says so, because "Arabic" alone invites the assumption that a dialect can be requested. tr, vi and id are plain single-region entries. context7.json's rule needed tightening rather than just extending: four more codes pushed it past the 255-character ceiling that sonilo-cli/tests/test_context7.py enforces. "several" became "many" and "a list of codes (...)" lost its parenthesis, which buys the room without dropping anything the rule exists to convey. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 5 +++-- context7.json | 2 +- sonilo-cli/README.md | 6 +++--- sonilo-cli/src/sonilo_cli/__main__.py | 5 +++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6ca61d9..3d7605e 100644 --- a/README.md +++ b/README.md @@ -391,8 +391,9 @@ Async-only; use `submit()` plus async call. Pass exactly one of `video` / `video_url` (`video_url` must be **https**), plus optional `languages` — it defaults server-side to `["zh_cn", "es", "fr"]`; supported codes are `en, zh_cn, ja, ko, pt, pt_br, -es, es_419, de, fr, it, ru, th` (`pt_br` is Brazilian Portuguese and `es_419` -Latin American Spanish; plain `pt` and `es` stay unqualified). The optional `ducking` boolean (default off, free) ducks the +es, es_419, de, fr, it, ru, th, ar, tr, vi, id` (`pt_br` is Brazilian +Portuguese and `es_419` Latin American Spanish; plain `pt` and `es` stay +unqualified, as does `ar`). The optional `ducking` boolean (default off, free) ducks the background music/effects bed under the dubbed voice while it speaks; when off the bed is kept at a constant level. (Every endpoint's `ducking` defaults off, so this one is no exception.) Source videos may be diff --git a/context7.json b/context7.json index 7cdb984..b075072 100644 --- a/context7.json +++ b/context7.json @@ -30,7 +30,7 @@ "Self-serve accounts start with free runs per endpoint (2 each for text-to-music, text-to-sfx, audio-ducking, video-analysis; 1 each for other video endpoints; none for dubbing), then bill normally. A first call succeeding is not proof billing works.", "Before a paid call, read client.account.services().get(\"trial\", {}) and degrade gracefully when a service's remaining is 0: that call raises TrialExhaustedError (402 trial_exhausted), which no retry fixes \u2014 ask for a payment method. trial may be absent.", "client.audio_ducking ducks an EXISTING music bed under an EXISTING voice track; nothing is generated. One of voice/voice_url, one of music/music_url. Voice may be audio or video (video returns a .mp4); music must be audio. Result: output_url, no stems.", - "client.dubbing dubs one video into several languages in one async call. languages is a list of codes (en, zh_cn, ja, ko, pt, pt_br, es, es_419, de, fr, it, ru, th); omit for the default [\"zh_cn\", \"es\", \"fr\"]. Billed per language; no free trial runs.", + "client.dubbing dubs one video into many languages in one async call. languages is a list of en, zh_cn, ja, ko, pt, pt_br, es, es_419, de, fr, it, ru, th, ar, tr, vi, id; omit for the default [\"zh_cn\",\"es\",\"fr\"]. Billed per language; no free trial runs.", "A DubbingResult has no audio/video/output_url. Its results live in result.outputs, a map of language code to dubbed .mp4 URL: use result.save(lang, path) or result.save_all(dir). dubbing's video_url must be https.", "client.video_analysis returns a creative BRIEF, not media: the method is analyze() (not generate()) and VideoAnalysisResult has no save(). Read result.segments (start/end/label/prompt) and result.variations[i].prompt.", "Pass a video_analysis variation's prompt straight to video_to_music / video_to_sfx / video_to_sound as their prompt. It takes one of video/video_url plus optional prompt and variants_num (1-5, billed per brief); max 360s, 10s billing floor." diff --git a/sonilo-cli/README.md b/sonilo-cli/README.md index e406ead..d0bef08 100644 --- a/sonilo-cli/README.md +++ b/sonilo-cli/README.md @@ -273,9 +273,9 @@ command that produces no media file — nothing is generated: # writes dubbed.es.mp4 and dubbed.fr.mp4 - `--languages` is comma-separated; omit it to use the server default `zh_cn,es,fr`. Supported - codes: `en, zh_cn, ja, ko, pt, pt_br, es, es_419, de, fr, it, ru, th` - (`pt_br` is Brazilian Portuguese and `es_419` Latin American Spanish; plain - `pt` and `es` stay unqualified). + codes: `en, zh_cn, ja, ko, pt, pt_br, es, es_419, de, fr, it, ru, th, ar, + tr, vi, id` (`pt_br` is Brazilian Portuguese and `es_419` Latin American + Spanish; plain `pt` and `es` stay unqualified, as does `ar`). - Source videos may be at most 300 seconds long. - `--output` is a filename template, not a single destination: a dubbing task returns one video per language, so `--output clip.mp4` writes `clip.es.mp4`, `clip.fr.mp4`, etc. diff --git a/sonilo-cli/src/sonilo_cli/__main__.py b/sonilo-cli/src/sonilo_cli/__main__.py index 0288bfc..e42ff6b 100644 --- a/sonilo-cli/src/sonilo_cli/__main__.py +++ b/sonilo-cli/src/sonilo_cli/__main__.py @@ -1006,8 +1006,9 @@ def build_parser() -> argparse.ArgumentParser: "--languages", default=None, help="Comma-separated target languages. Default: zh_cn,es,fr. " "Supported: en, zh_cn, ja, ko, pt, pt_br, es, es_419, de, fr, " - "it, ru, th. pt_br is Brazilian Portuguese and es_419 Latin " - "American Spanish; plain pt and es stay unqualified.", + "it, ru, th, ar, tr, vi, id. pt_br is Brazilian Portuguese and " + "es_419 Latin American Spanish; plain pt and es stay " + "unqualified, as does ar.", ) p_dub.add_argument( "--output", default=None,