Skip to content

feat: expand video translation source languages - #336

Merged
wulien merged 2 commits into
krillinai:masterfrom
Mijaelx:codex/issue-197-source-languages
Sep 29, 2026
Merged

wulien merged 2 commits into
krillinai:masterfrom
Mijaelx:codex/issue-197-source-languages

Conversation

@Mijaelx

@Mijaelx Mijaelx commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Spanish, Italian, Brazilian Portuguese, Indonesian, and Thai to the video translation source-language selector
  • keep the shared compact language codes (es, it, pt, id, th) across OpenCreator and KrillinAI
  • map compact codes at the Volcengine provider boundary (es-MX, it-IT, pt-BR, id-ID, th-TH) and send the language in the ASR request
  • cover Thai's existing non-space splitting and timestamp path

This is a follow-up to #197 and #330. Brazil is represented as Brazilian Portuguese in the UI while retaining pt internally for Whisper/OpenAI/Aliyun compatibility.

Verification

  • go test ./pkg/volcengine ./internal/service
  • pnpm --filter @opencreator/daemon test -- test/unit/creator-krillin-cli-protocol.test.ts
  • pnpm --filter @opencreator/web test -- src/features/dashboard/VideoTranslationWorkspace.control.test.tsx
  • pnpm --filter @opencreator/daemon typecheck
  • pnpm --filter @opencreator/web typecheck
  • pnpm exec playwright test apps/web/e2e/web-desktop-parity.spec.ts --project=chromium-desktop --grep "扩展源语言"

The tests cover catalog exposure, persisted settings, Browser/Desktop parity, CLI parameter forwarding, Volcengine provider-code mapping, and Thai timestamp handling.

Not yet verified

  • Real ASR quality was not sampled for all five new languages in this change. Each cloud provider still requires a correctly configured model/resource (for example, an Aliyun project AppKey bound to the intended language model).
  • No Desktop packaging resource changed, so a packaged Desktop build was not run.

@Mijaelx

Mijaelx commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

CI status note: classify, compile, and unit pass on this PR. web-parity is currently blocked by the pre-existing CreatorServicesSettingsView raw chunk budget failure (45,359 B vs 45,000 B).

The same failure is present on the PR base commit and the preceding master commit, with the same generated asset:

This PR does not modify CreatorServicesSettingsView or the settings bundle. I have not changed the unrelated performance budget/settings implementation here. The source-language unit, protocol, typecheck, and Browser/Desktop parity coverage passes locally.

@Mijaelx

Mijaelx commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Thai real-runtime validation uncovered a pre-existing KrillinAI short-subtitle issue that became user-visible when this PR exposed Thai as a source language.

Root cause:

  • Aliyun returned valid Thai text and word timestamps.
  • The primary source, target, and bilingual SRT files were generated.
  • The legacy short-source timestamp matcher treated a single Thai word as an invalid sentence, silently skipped all short cues, and produced an empty short_origin_srt.srt.
  • OpenCreator correctly rejected that artifact with invalid_subtitle_timeline.

Fixed in 50990bb by reusing the already-generated Thai block timeline and selecting ASR words within that time range for short subtitle generation. Other language paths are unchanged.

Validation performed:

  • Focused Thai regression test reproducing the single-word empty-short-SRT case: passed.
  • go test ./internal/service ./internal/pipeline -count=1: passed.
  • pnpm krillinai:test (all KrillinAI Go packages): passed.
  • Windows KrillinAI runtime build and staged-runtime SHA verification: passed.
  • Real Aliyun Thai Creator E2E with the same 16.44-second sample that previously failed: Job and subtitle stage succeeded at 100%, zero Issues, 8 source cues, 8 target cues, 16 vertical cues, and a valid non-empty 796-byte short-source SRT.

The ASR still has a minor provider-quality error on the product name (OpenCreator), but the complete Thai Creator pipeline now succeeds and exposes the real transcription rather than a synthetic fallback.

@wulien
wulien merged commit 6bd3da5 into krillinai:master Sep 29, 2026
4 of 5 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.

2 participants