557 Commits
Author SHA1 Message Date
Palash Debnath 2aa5f38012 Merge remote-tracking branch 'origin/main' into fix/review-2175
# Conflicts:
#	CHANGELOG.md
2026-09-17 22:25:24 +05:30
Palash Debnath 50a71fd176 Merge remote-tracking branch 'origin/main' into fix/review-2173 2026-09-17 21:32:02 +05:30
Palash Debnath a222974568 fix(generate): localize terminal language refusals across streaming paths 2026-09-17 20:21:30 +05:30
Shivendra-CoherentandClaude Opus 5 a6113762a4 fix(generate): answer a refused language on the remote path too
Review findings from greptile on this PR.

P1 — a profile-derived language refused by a *remote* worker never
reached the new branch. The worker's ValueError travels home as
RemoteJobFailed, a GatewayError caught ahead of the ValueError handler,
so the user got a retryable 503 offering "run it on this machine
instead" — which cannot help, because the same engine refuses the same
language wherever it runs. Both handlers now build the response through
one helper, so the local and remote paths cannot drift again. Only
language refusals change class there; a genuine worker failure keeps its
retryable 503 and its "run it here" offer.

P2 — a *generic* rejection was wrapped twice. `_language_rejection_or`
adds the engine remedy before the handler sees it, and the profile
message then quoted that wrapper, repeating both the engine-switch
advice and "Engine's own message:". The wrapper now keeps the engine's
own error reachable and the profile message quotes that, once. The
Kokoro path never showed this because its wording is self-describing and
skips the first wrapper, which is why the first cut's assertion passed.

Three regression tests, each failing before this commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 19:50:07 +05:30
Shivendra-CoherentandClaude Opus 5 fbede643c1 fix(generate): name the voice profile behind a refused language
A user on mlx-audio with the language picker on "Auto" got:

    400: mlx-audio's Kokoro model doesn't support language='Persian'.
    … Pick one of those, leave language as 'Auto', or switch to a
    multilingual engine …

They had left it on Auto. The UI omits `language` entirely while its
picker reads "Auto" (useProfiles.js only appends a non-Auto value), and
#533 fills that gap from the selected voice profile. So Auto is exactly
how 'Persian' got there: the remedy the message leads with is the state
the user was already in, and nothing points at the profile that actually
supplied the language. Three generate attempts in their action log, a
detour through Settings, then the report.

Provenance was the missing fact, and only the request scope has it — the
engine adapters are handed a language with no idea who chose it. So
_resolve_profile_conditioning now reports whether it filled the language,
and /generate uses that to answer a refused profile language by naming
the profile and the remedies that exist: change the profile's language,
pick a supported one explicitly, or switch engine.

An explicitly requested language is untouched — the user really did pick
it, so blaming the profile would be a lie — and #533 still drives
generation whenever the engine can speak the profile's language.

Recognising the refusal needed one more thing: Kokoro's wording
("doesn't support language=…") matched none of #1257's signatures, so
the engine that issue was written for was the one engine its rewrite
never fired for. That wording is now recognised, but kept out of #1257's
rewrite path — it already names its engine and its languages, and
re-wrapping it only nests "Engine's own message:" twice.

No per-model language map: #1257 weighed that and chose engine-naming
over "a brittle map that goes stale on each engine update". This follows
the same principle — say where the language came from, don't enumerate.

docs/engines/mlx-audio.md repeated the same "leave language on Auto"
advice and is corrected here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 18:04:51 +05:30
shivsin25 543f0f6f18 Merge branch 'main' into fix/2163-gated-install-token 2026-09-17 17:08:59 +05:30
Shivendra-CoherentandClaude Opus 5 37b498c891 fix(setup): send the HF token when installing a gated model
Installing a gated model failed the fast download path with "401
Unauthorized" even with a valid token and the licence accepted, then fell
back to snapshot_download and logged a 401 that reads like the token or
the licence grant is at fault when it is neither (#2163).

`token_resolver.resolve()` returns a ResolvedToken record, not the bearer
string. Two call sites handed that record straight to consumers typed
`token: str | None`, and both fail silently rather than loudly:

- `_segmented_snapshot` passes it to HfApi, get_hf_file_metadata and our
  own segmented_download. huggingface_hub's build_hf_headers ignores a
  non-str token and falls back to its own ambient discovery, so a token
  held only in VoiceStudio's Settings produces NO Authorization header
  and every gated file 401s. segmented_download instead interpolates it
  into `f"Bearer {token}"`, sending a malformed header that also inlines
  the raw secret into the request.
- `_step_fetch_weights` passes it to snapshot_download, so gated engine
  weights 401 the same way.

Every other resolve() caller already unwraps `.token`; these two were the
outliers. Both now unwrap once, at the seam.

The existing weights tests all stubbed resolve() to return None, so no
test ever exercised a resolved token — which is why this went unnoticed.
The new tests drive a real ResolvedToken through both seams and assert a
`str` reaches every consumer, plus an integration test that installs the
pyannote diarisation pipeline end to end: a weightless config_only repo
validates, both dependency repos are fetched, and every call carries the
bearer string.

Two catalogue invariants keep the rest of #2163 from returning by edit:
dependency repos must be revision-pinned (revision_for raises otherwise,
so an unpinned one ships an always-failing install), and a config_only
entry must declare config_required_files (without them the completeness
check can never pass and the error lists no files at all — the shape the
report hit on 0.5.2).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 16:50:16 +05:30
Palash Debnath e6e8f16f55 fix: guard voice conversion with active model cloning capability 2026-09-17 16:29:51 +05:30
Palash Debnath d2e2d6073a Merge branch 'fix/review-2138' into fix/community-integration
# Conflicts:
#	docs/dubbing/translation-engines.md
2026-09-17 15:40:36 +05:30
Palash Debnath 0f13d49363 fix(dubbing): guard diarization lifetime and task stream delivery 2026-09-17 15:40:23 +05:30
Palash Debnath e477251b35 Merge branch 'fix/review-2138' into fix/community-integration 2026-09-17 15:03:56 +05:30
Palash Debnath 9ee1f9c1ed fix(dubbing): make disconnect cleanup single-shot 2026-09-17 15:03:03 +05:30
Palash Debnath cef375e700 Merge branch 'fix/review-2165' into fix/community-integration
# Conflicts:
#	docs/dubbing/translation-engines.md
#	electron/src/renderer/src/i18n/locales/ar.json
#	electron/src/renderer/src/i18n/locales/de.json
#	electron/src/renderer/src/i18n/locales/en.json
#	electron/src/renderer/src/i18n/locales/es.json
#	electron/src/renderer/src/i18n/locales/fr.json
#	electron/src/renderer/src/i18n/locales/hi.json
#	electron/src/renderer/src/i18n/locales/id.json
#	electron/src/renderer/src/i18n/locales/it.json
#	electron/src/renderer/src/i18n/locales/ja.json
#	electron/src/renderer/src/i18n/locales/ko.json
#	electron/src/renderer/src/i18n/locales/nl.json
#	electron/src/renderer/src/i18n/locales/pl.json
#	electron/src/renderer/src/i18n/locales/pt.json
#	electron/src/renderer/src/i18n/locales/ru.json
#	electron/src/renderer/src/i18n/locales/sv.json
#	electron/src/renderer/src/i18n/locales/th.json
#	electron/src/renderer/src/i18n/locales/tr.json
#	electron/src/renderer/src/i18n/locales/uk.json
#	electron/src/renderer/src/i18n/locales/vi.json
#	electron/src/renderer/src/i18n/locales/zh-CN.json
#	electron/src/renderer/src/i18n/locales/zh-TW.json
#	frontend/src/i18n/locales/ar.json
#	frontend/src/i18n/locales/de.json
#	frontend/src/i18n/locales/en.json
#	frontend/src/i18n/locales/es.json
#	frontend/src/i18n/locales/fr.json
#	frontend/src/i18n/locales/hi.json
#	frontend/src/i18n/locales/id.json
#	frontend/src/i18n/locales/it.json
#	frontend/src/i18n/locales/ja.json
#	frontend/src/i18n/locales/ko.json
#	frontend/src/i18n/locales/nl.json
#	frontend/src/i18n/locales/pl.json
#	frontend/src/i18n/locales/pt.json
#	frontend/src/i18n/locales/ru.json
#	frontend/src/i18n/locales/sv.json
#	frontend/src/i18n/locales/th.json
#	frontend/src/i18n/locales/tr.json
#	frontend/src/i18n/locales/uk.json
#	frontend/src/i18n/locales/vi.json
#	frontend/src/i18n/locales/zh-CN.json
#	frontend/src/i18n/locales/zh-TW.json
#	tests/test_dub_translate.py
2026-09-17 13:15:43 +05:30
Palash Debnath 84290db784 fix: localize Argos runtime recovery across desktop and browser 2026-09-17 13:15:15 +05:30
Palash Debnath 8f06b4968f Merge branch 'fix/catalogue-install-capability' into fix/community-integration
# Conflicts:
#	CHANGELOG.md
#	docs/install/troubleshooting.md
2026-09-17 12:38:56 +05:30
Palash Debnath 4002801c00 Merge branch 'fix/review-2143' into fix/community-integration
# Conflicts:
#	CHANGELOG.md
#	docs/dubbing/translation-engines.md
#	tests/test_dub_translate.py
2026-09-17 12:38:56 +05:30
Palash Debnath e1e329e7f0 Merge branch 'fix/review-2073' into fix/community-integration
# Conflicts:
#	CHANGELOG.md
#	docs/install/troubleshooting.md
2026-09-17 12:38:36 +05:30
Palash Debnath 8ba4407d8a Merge branch 'fix/review-2074' into fix/community-integration
# Conflicts:
#	CHANGELOG.md
#	docs/dubbing/translation-engines.md
2026-09-17 12:38:36 +05:30
Palash Debnath b12fa3a13c Merge branch 'fix/review-2138' into fix/community-integration
# Conflicts:
#	CHANGELOG.md
#	docs/dubbing/translation-engines.md
2026-09-17 12:38:36 +05:30
Palash Debnath 119816d2b1 Merge branch 'fix/review-2109' into fix/community-integration
# Conflicts:
#	CHANGELOG.md
#	docs/install/troubleshooting.md
2026-09-17 12:38:36 +05:30
Palash Debnath a390da1590 fix(catalogue): explain local-only native installation 2026-09-17 12:37:34 +05:30
Palash Debnath 6c5a88260b fix: address updated review findings and regressions 2026-09-17 12:32:14 +05:30
Palash Debnath f26d5cc041 fix: address updated review findings and regressions 2026-09-17 12:31:57 +05:30
Palash Debnath 75efda84b1 fix(sidecars): reconcile receive deadlines with outer job budgets 2026-09-17 12:27:56 +05:30
Palash Debnath 8538702ecb fix(imports): preserve legacy text encodings in Electron and web 2026-09-17 12:27:56 +05:30
Palash Debnath 11584c6f4c fix(dubbing): retain ASR model until native work finishes on disconnect 2026-09-17 12:27:30 +05:30
Palash Debnath 3c4c8ed679 fix: harden native repair and preserve offline Whisper fallback 2026-09-17 12:18:02 +05:30
Palash Debnath 6772ad363f Merge remote-tracking branch 'origin/main' into fix/review-2074 2026-09-17 12:07:31 +05:30
Palash Debnath 552711b1d8 Merge remote-tracking branch 'origin/main' into fix/review-2111 2026-09-17 12:07:11 +05:30
sean park 67c61fe357 fix(asr): repair CTranslate2's exec-stack request instead of only routing around it (#692)
ctranslate2 <=4.4.0 marks its native library's stack RWE; kernels that
refuse the request fail the dlopen, taking whisperx, faster-whisper and
Argos translation down. main learned to detect and fall back; this also
fixes the library: core.execstack clears the one ELF bit in place on
first probe (Linux-only, memoized, never raises), so the engines load
normally on hardened kernels. Argos's probe moves to
argostranslate.translate so it cannot advertise an engine whose every
request 500s, and the dub route returns one actionable 400.

Also: pytorch-whisper survives a CUDA OOM at transcribe time by
stepping the batch down (16->4->1, 8->2->1 with word timestamps) and
finishing on CPU rather than dropping the chunk.
2026-09-17 13:19:30 +09:00
Palash Debnath 2faaafa9fc Merge remote-tracking branch 'origin/main' into review/gpu-2149 2026-09-17 01:39:08 +05:30
LMG XENON 15ef5da87d Merge branch 'debpalash:main' into fix/sidecar-recv-timeouts-2103 2026-09-16 19:34:58 +01:00
Shivendra-CoherentandClaude Opus 5 64f74e0dd2 fix: keep the backend alive on pre-Ampere NVIDIA GPUs (#2135)
On a Tesla T4 the backend exited during the first /generate with no
traceback and no HTTP response, leaving the client with
RemoteDisconnected and every later call with ConnectionRefused. Three
separate defects combined, which is why none of the reporter's
workarounds helped.

1. torch.compile(mode="reduce-overhead") captures CUDA graphs. T4
   (sm_75) passed the existing arch gate, so capture was attempted and
   aborted the process from inside the native CUDA library — below the
   interpreter, where neither the #278 eager-fallback wrapper nor any
   except clause can see it. The compile mode is now resolved per GPU:
   Ampere (sm_80) and newer keep the cudagraph mode, older cards drop to
   the non-cudagraph "default" mode and keep their compiled Inductor
   kernels. Fails open on any probe error, so no GPU that works today
   loses the optimization. OMNIVOICE_FORCE_CUDAGRAPH=1 restores it.

2. should_torch_compile() never read TORCH_COMPILE_DISABLE. main.py sets
   it on win32, build_engine_env injected it into subprocesses, and
   docs/install/windows.md tells users to export it — but the in-process
   gate ignored it, so the reporter exported the documented variable and
   still got "torch.compile applied". The gate now honours
   TORCH_COMPILE_DISABLE / TORCHDYNAMO_DISABLE / TORCHINDUCTOR_DISABLE on
   every platform, and an env opt-out on the parent propagates to engine
   subprocesses. The settings DB path is logged alongside the toggle:
   the reporter had three omnivoice.db files and edited one the backend
   never opened.

3. Settings -> Performance -> "Disable torch.compile" was rendered
   disabled outside Windows in both the Tauri and Electron UIs, so the
   one control that would have stopped this was unreachable for the
   affected Linux user. The toggle is now live on every platform, and
   build_engine_env honours it everywhere rather than only on win32.

Also arms faulthandler before torch is imported, so a fatal native
signal writes the faulting thread's Python stack to backend_err.log
instead of the process vanishing silently. This does not prevent a
crash; it makes one diagnosable. OMNIVOICE_DISABLE_FAULTHANDLER=1 skips
it.

Tests fail before / pass after, verified by stashing the source and
running the new tests against unfixed code. The crash test kills a real
child interpreter with a real SIGSEGV and requires a named Python frame
in the output. test_torch_compile_path_gate's fixture now clears the
compile-disable env vars: main.py setdefaults them on win32, so on a
Windows runner they leaked into os.environ and decided those tests.

Not verified on real hardware — no Turing GPU available. The sm_80 floor
is inferred from the crash report and from docs/hardware-notes-tesla-t4.md,
which already flagged cudagraphs on T4 as attempted by default and never
evaluated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 17:20:09 +05:30
denemon d6b1326aae fix(dub): observe late _ping_while failures and fix locale log labels
- _ping_while retrieves failures that occur after the consumer disconnects,
  preventing "exception was never retrieved" at GC; the early-exit test
  covers this case
- stream_cut_backend_alive_local now builds the Settings → Logs → Backend
  path from each locale's actual UI labels (`settings.title`,
  `settings.logs`, `common.backend`)
- Fix incorrect section names in 15 locales, including ru, de, and zh-TW

Addresses CodeRabbit review on #2138
2026-09-16 02:38:55 +09:00
denemon 052eb1050b fix(dub): cancel wrapped work when the transcribe stream closes early
`_ping_while` runs awaited work as its own task, so a client disconnect
previously cancelled only the ping loop. Reference-text refinement could
continue running while `run_transcribe_guarded` skipped its abandon path
and the stream finalizer unloaded the ASR model underneath it.

Cancel unfinished work on early exit, matching the cancellation behavior
of the bare `await` it replaced. Do not await it in `finally`, which can
also run under `GeneratorExit`.

- **dub_core**: `_ping_while` cancels an unfinished future in `finally`,
  covering all seven call sites
- **test**: verify that `_ping_while` cancels work on `aclose()` while
  leaving completed work untouched (fail-before / pass-after)
- **CHANGELOG**: add a Highlights entry for the user-visible fix; keep
  Fixed entries under `### Fixed` per `CLAUDE.md`

Addresses Greptile P1/P2 on #2138
2026-09-16 02:30:16 +09:00
denemon 22e52c64a4 fix(dub): keep SSE streams alive through byte-silent steps (#2108)
After transcription, several minutes of backend work could produce no
SSE bytes, causing the desktop webview to close the idle connection while
the job continued and eventually completed. This also led to a misleading
reverse-proxy error on local connections.

- dub_core: keep post-transcript awaits alive with `_ping_while` (5s pings)
- dub_export: send SSE comments after 15s of stream silence
- backendCrash.ts: show deployment-aware connection-loss guidance
- Add regression tests for post-transcript pings, task-stream keepalive,
  and local-mode error messaging

Fixes #2108
2026-09-16 02:08:54 +09:00
Palash Debnath 61d52944f2 fix(dub): correct long timeline rendering and repeated ASR context 2026-09-15 20:02:18 +05:30
Palash Debnath 730c7f377c feat(dub): save custom agent translation style instructions 2026-09-15 19:10:24 +05:30
Palash Debnath 7758ccc500 fix(dub): preserve original sound outside dialogue intervals 2026-09-15 19:02:25 +05:30
Palash Debnath 0a6ea976cb fix(dub): preserve complete speech and reject silent partial output 2026-09-15 15:44:57 +05:30
LMGXENON ddb8e4dd86 fix(engine): address review findings on sidecar deadlines, ASR timeout, and changelog credit (#2103) 2026-09-15 00:22:55 +01:00
Palash Debnath 141b42f7a6 fix: restore desktop integration contracts 2026-09-14 10:53:55 -07:00
Palash Debnath f832d616f7 feat(electron): add full VoiceStudio desktop app 2026-09-14 10:22:23 -07:00
kevin9327andClaude Opus 5 3cd67811e5 fix(subtitles): exported cue times keep their milliseconds
The SRT/VTT formatters in dub_export and openai_compat truncated
(seconds % 1) * 1000. Most decimal times are not exact in binary (2.3 is
2.29999...), so a cue imported as 00:00:02,300 exported as 00:00:02,299:
every such cue moved a millisecond early in the /dub/srt and /dub/vtt
downloads, burned-in subtitles, and /v1/audio/transcriptions srt/vtt.

All four now call srt_parser.format_cue_timestamp, which rounds the whole
value to milliseconds once and splits it, so 59.9996 carries to
00:01:00,000 rather than printing ",1000" -- the same round-then-divmod
shape karaoke_ass._ass_time already uses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 08:31:19 +09:00
kevin9327andClaude Opus 5 c8c833062b fix(import): read UTF-16 and Windows-1252 subtitles and manuscripts
/dub/import-srt fell back to Latin-1 when UTF-8 failed, so a UTF-16 .srt
(Notepad's "Unicode", many subtitle editors) decoded with a NUL between
every character and was rejected as having no cues, and a Windows-1252
one turned curly quotes and dashes into C1 control characters.
/audiobook/import decoded .txt/.md with errors="ignore", silently dropping
every accent, dash and curly quote from a Windows-1252 manuscript,
returning NUL-interleaved text for a UTF-16 one, and keeping a UTF-8 BOM
at the start of the editor text.

Both now use decode_text_upload: a BOM names the encoding, valid UTF-8
stays UTF-8, and anything else is read as Windows-1252, with Latin-1 for
the bytes cp1252 leaves undefined so the decode never raises.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 08:14:46 +09:00
Palash Debnath 686d9c5fcf fix(catalogue): repair the guidance the Weights-list rename broke
The rename to "the engine's Weights list in Model Catalogue" left several
messages without a verb, and pointed others at the wrong place:

- The offline and create-voice messages say what to do again.
- pyannote has no owning engine, so diarization points at Other weights.
- The Hugging Face mirror moved to Settings → Network, and voice previews
  moved to Settings → Storage.
- Unloading and switching engines happen in the engine list, not a
  Weights list.
- A bad saved path points at Settings → Storage or the env file.
- Docstrings that read "the the" are fixed.

The dub stream-drop fallback goes through i18n in all 21 locales. A
Dictation pick on a row that is already downloading no longer starts a
second install: the row's radio is disabled while it works, and
useModelDownloads refuses a second mutation for a repo already in flight.
The Supertonic-3 license test checks for the Accept wording.
2026-09-10 13:34:54 -07:00
Palash Debnath ba8f6cfd15 Merge feat/catalogue-one-page (with main) into feat/engine-list-detail
Conflicts: RecoBanner (deleted here: the recommendation card is gone),
ModelStoreTab + EngineCompatibilityMatrix (this branch's rewrite kept),
supertonic3 backend (main's own-venv check kept, message without the
retired "→ Engines" step), CHANGELOG (base layout + the #2020 line).

Carried over from main and the review:
- The list row hides Install while only the license review is left
  (main's #2017 rule, now in the row; Accept lives in the panel).
- Engine action aria labels go through i18n (engines.aria*, all 21
  locales) instead of hardcoded English.
- Every "Model Catalogue → Engines/Models" path main added, plus the
  frontend strings that still named the retired panes, now point at the
  one-page catalogue.
- test_engine_unavailable_reason_1866 reads the license matcher from its
  new home, engines/engineDisplay.js.
2026-09-10 12:17:02 -07:00
Palash Debnath 764fed09bc Merge pull request #2018 from debpalash/fix/license-reason-passthrough
fix(engines): say when a license or the platform is what blocks an engine
2026-09-10 09:04:07 -07:00
Palash Debnath 4fdde15079 Merge pull request #2023 from debpalash/fix/translation-uninstall-guard
fix(translation): uninstalling an engine never removes what others need
2026-09-10 09:00:07 -07:00
Palash Debnath e0879027d5 Merge remote-tracking branch 'origin/main' into fix/license-reason-passthrough
# Conflicts:
#	CHANGELOG.md
#	tests/test_engine_unavailable_reason_1866.py
2026-09-10 08:41:45 -07:00