- Hand /generate ids to the global SSE watcher so playback fires on completion. The mutation onSuccess was checking audio_path on a queued row, which is always empty — autoplay never ran.
- Bind the Play As voice selection to capture_settings.default_playback_voice_id, kept in sync with the Settings → Captures and Settings → MCP pickers. Picking from the split-button dropdown writes back to settings.
- Extract AudioBars from HistoryTable into a shared component; use it for the Play As generating state in place of Loader2.
- Stop the active-state hover from flashing white text when the button is in its lighter accent/10 fill.
- Drop the gradient avatar swatches from the Settings → Captures voice dropdown.
- Backend: when the gen worker exits without writing a terminal status (e.g. SQLite lock racing the failed-status write inside its own exception handler), the cancel endpoint now flips the row to failed instead of 409-ing. Worker also force-fails on its way out as a belt-and-suspenders.
ListPane is a compound component (Header / TitleRow / Title / Actions /
Search / Scroll) that owns the relative wrapper, faded right divider
(50px top fade), top scroll mask, and absolute-positioned header used by
every list-detail tab. Wires up CapturesTab, StoryList, and EffectsList.
EffectsTab gets -mx-8 / pr-8 to match the edge-to-edge layout used
elsewhere.
Other changes:
- MCPPage: native <select> → shadcn <Select> for default voice and
per-binding voice pickers
- Button outline variant: add hover:border-accent
- Drop hover:text-destructive from trailing delete buttons
(HistoryTable, GpuAcceleration, GpuPage, EffectsChainEditor,
EffectsDetail)
- HistoryTable empty state moved behind t('history.empty')
- StoryContent scroll padding pt-14 → pt-16
- backend health reports the captures dir
- landing CapturesMockup: "Send to" → "Export" with Download icon
- CHANGELOG: drop [Unreleased] personality section
useQuery was firing GET /capture/readiness every 5s forever, and also
on every window focus. Once stt.ready and llm.ready are both true the
answer can only change when the user swaps a model in settings, and
useSettings already invalidates the query on that path — the polling
was pure noise.
Gate both refetchInterval and refetchOnWindowFocus on "not fully ready"
so we fall silent once the checklist is green.
0.2 read CGEventFlags via CGEventGetIntegerValueField(event, 0x81),
which is not a valid CGEventField id — macOS silently returned 0, so
FlagsChanged events produced no KeyDown / KeyUp for any modifier key
and the PTT / toggle chords never armed on macOS. 0.4 uses the
documented CGEventGetFlags(event) API.
0.3 (tracing / serde / Fn / IntlBackslash) is picked up as a free
consequence; no API surface we depend on changed.
Dep swap:
- Drop the git-pinned jamiepine/rdev fork we were carrying since the
upstream crate is abandoned.
- Depend on keytap 0.2 from crates.io — our own cross-platform global
keyboard tap crate. Clean shutdown via Drop, Sonoma-safe by design
(no TSMGetInputSourceProperty calls off the main thread, so
`set_is_main_thread(false)` is gone), and properly versioned.
Chord engine rewrite:
- Delete hotkey_monitor.rs's internal Chord state machine (Match enum,
KeyEvent enum, step()/classify() methods, associated unit tests).
keytap's ChordMatcher subsumes it: Momentary chord for PTT,
add_toggle() for Toggle-to-talk, longest-match resolution, sticky-end
for Toggle. Net: -80 LOC in hotkey_monitor.rs; the remaining module
is the dispatcher loop + Effect→Tauri translation.
- Preserve the PTT→Toggle "RestartRecording" upgrade signal. keytap
emits End(PTT)+Start(Toggle) atomically (same Instant) when the held
set upgrades from a shorter chord to a longer superset. The
dispatcher peeks at the matcher with a 5 ms recv_timeout after any
End and coalesces the pair into Effect::RestartRecording so the
frontend still gets the "discard the transition-moment audio" signal
instead of an unrelated Stop+Start pair.
- HotkeyMonitor::update_bindings now actually tears down the tap on
empty bindings instead of leaving an idle CGEventTap around. New
bindings rebuild the matcher and the dispatcher thread from scratch.
key_codes.rs:
- Rewrite the browser-code → Key table against keytap's cleaner Key
variant names (`A`..`Z` not `KeyA`..`KeyZ`, `Digit0`..`Digit9` not
`Num0`..`Num9`, `ArrowUp` not `UpArrow`, `AltLeft`/`AltRight` instead
of `Alt`/`AltGr`, `Period` not `Dot`, …). On-disk chord string
format (W3C `KeyboardEvent.code` identifiers) is unchanged, so
capture_settings rows written before the swap round-trip identically.
Legacy aliases (`Alt`, `AltGr`, `Num0`, `UpArrow`, `Dot`, …) kept for
forward-compat on old rows.
main.rs / input_monitoring.rs:
- Update the few doc comments that referenced `rdev::listen` to
describe keytap's Tap; no behavioural change.
- build_chord_bindings now imports from keytap::Key.
- enable_hotkey / disable_hotkey / update_chord_bindings reach into
HotkeyMonitor via &mut since apply()/update_bindings() now mutate.
Tests live in keytap now (22 chord-related tests in keytap 0.2,
including the PTT→Toggle upgrade scenario that used to be tested in
hotkey_monitor.rs). Voicebox's hotkey_monitor.rs is thin enough that
local testing would be trivia.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two surfaces leaked macOS-specific copy onto other platforms:
1. The Input Monitoring + Accessibility rows in the readiness
checklist rendered everywhere. On Windows/Linux the Rust permission
stubs return true, so the rows showed as permanent green checkmarks
with copy like "macOS allows Voicebox to detect your global
shortcut." — nonsense when you're on Windows. Gate both rows on a
userAgent-based isMacOS check so they only render where the
underlying TCC permission actually exists.
2. The global-shortcut setting description ended with "macOS will ask
for Input Monitoring permission the first time you turn this on."
That sentence rendered on every platform. The readiness checklist
already surfaces the TCC requirement at the right moment on macOS,
so the description doesn't need the platform note — drop it from
en / ja / zh-CN / zh-TW.
Other macOS strings (AccessibilityNotice, InputMonitoringNotice, their
"stillMissing" hints) are already gated behind the Rust permission
booleans returning false, which never happens on Windows/Linux, so they
stay inert without further changes.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
useCaptureSettings updated its own cache optimistically but never
invalidated ['capture-readiness'], so for up to 5 s (the poll interval)
after switching stt_model or llm_model the checklist kept showing the
previous model's ready/missing state. The backend endpoint resolves
the model live on each call — it was just the frontend cache that
lagged. Invalidate in onSettled only when the patch touched a model
field, so unrelated updates (chord keys, toggles) don't pay for a
refetch.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two small follow-ups to the sidebar checklist placement. Move it below
the What's different section so the sticky top of the sidebar stays the
page's narrative context (About → differences) and the checklist reads
as a status panel rather than preamble. Gate the whole block on
!readiness.allReady so once every gate is green the sidebar drops back
to just About + What's different — no value in real estate full of
checkmarks.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The six-gate checklist only rendered in the CapturesTab empty state, so
a user already on the settings page had no single surface showing which
gate was red — the inline InputMonitoringNotice covered one, the model
pickers covered another, and Accessibility was only hinted at by the
auto-paste toggle. Mirror the same component into the right sidebar of
the settings page so every gate (STT model, LLM model, Input Monitoring,
Accessibility, plus the hotkey toggle in the main column) is always
visible while the user configures dictation.
New compact prop on DictationReadinessChecklist drops the centered
header and empty-state max-width so it fits the 280 px sidebar next to
the existing About / Differences blocks. Callers in compact mode own
the heading — CapturesPage reuses the existing captures.readiness.title
key (present in en / ja / zh-CN / zh-TW already) as an h3 matching the
sibling sidebar sections.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Wrap useUIStore in zustand/middleware's persist under the key
voicebox-ui. partialize only selectedProfileId so volatile UI state
(dialog open flags, form drafts, engine/voice pickers, sidebar) stays
in-memory as before — but reopening the app no longer loses whichever
profile the user was last working with.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Replace the placeholder fake-waveform + play button in CapturesTab's
audio card with a real CaptureInlinePlayer (wavesurfer.js). The player
renders the actual waveform, lets users scrub through the clip, and
shows a proper current/total timestamp pair in place of the
duration-only label.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
POST /speak is a REST wrapper around voicebox.speak for agents that
don't talk MCP (shell scripts, ACP, A2A). It reads X-Voicebox-Client-Id
and uses it for the same per-client profile resolution + default
personality lookup the MCP tool does (speak.py:39-64), so its callers
are first-class clients — but the ClientIdMiddleware only stamped
last_seen_at on /mcp* paths. REST speak callers showed up as "never
seen" in Settings → MCP despite actively acting on their bindings.
Widen the stamp predicate to an explicit ("/mcp", "/speak") prefix
list, and require a path boundary on match so future routes named
/mcpfoo or /speakers don't silently inherit the stamp via the prefix.
New test_client_id_middleware.py pins the scope with 17 parametrised
cases (both the allowed set and the overlap cases that must not match).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The inline lifespan ran _run_shutdown inside the MCP context, so the
TTS / Whisper / LLM models were unloaded *before* FastMCP's __aexit__
got a chance to cancel its in-flight session tasks. Any MCP request
mid-generate at shutdown time would crash on "model unloaded" instead
of receiving a clean session-cancelled error.
Rewire via compose_lifespan (which was already defined in
mcp_server.server for exactly this purpose but never used):
AsyncExitStack enters factories in order and exits in LIFO, so
MCP teardown fires first — cancelling sessions — and _run_shutdown
runs after nothing is holding the models. Smoke test shows the
log order flipped as expected:
Ready
StreamableHTTP session manager started
... running ...
StreamableHTTP session manager shutting down ← was last, now first
Voicebox server shutting down... ← was first, now last
As a side benefit, _run_shutdown is now paired with _run_startup via
try/finally inside voicebox_lifespan, so a partial startup (models
half-loaded, MCP __aenter__ fails) still unloads whatever was loaded
instead of leaking it to process exit.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
SQLite gained ALTER TABLE … DROP COLUMN in 3.35 (Mar 2021). Production
PyInstaller builds bundle Python 3.12 which links to SQLite 3.40+ so
that path is always safe, but a dev running the backend directly on
Ubuntu 20.04 (3.31) or Debian 11 (3.34) would crash on first startup
trying to drop the legacy default_intent column.
Add _supports_drop_column(engine) — returns True on non-SQLite
dialects (Postgres / MySQL have supported DROP COLUMN for decades) and
gates on the runtime sqlite_version for SQLite. When unsupported, log a
warning and leave the unused column in place: SQLAlchemy only maps
declared columns, so a stray default_intent column does no reads or
writes and can't interfere with runtime behaviour.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The word-level pass catches single-word Whisper loops ("URL URL URL…")
but misses two common hallucination patterns the PR had to claim as
"edge cases":
1. Multi-word English loops — "thanks for watching thanks for watching…"
× 6 sails through because no two consecutive tokens are identical
after text.split().
2. CJK loops — "謝謝觀看" × 7 sails through because text.split() returns
a single unsplit token for the whole loop (no whitespace between
characters).
Add a character-level second pass: a non-greedy regex finds any 2–60
char substring that repeats min_run+ times immediately after itself and
strips the run. The 2-char floor keeps emphasised single-letter runs
("wooooooow") intact. The 60-char ceiling covers every observed
Whisper tail hallucination ("Please like and subscribe to my
channel.", "Subtitles by the Amara.org community") while staying short
enough that coincidental long-phrase repetition in legitimate speech
doesn't hit the threshold. Whitespace normalisation only runs when the
pass actually stripped something, so untouched transcripts keep their
original spacing.
New test_refinement_collapse.py gives the pre-processor its first
deterministic unit-test coverage: 17 tests pinning the word-level
legacy behaviour plus the new multi-word English / CJK / Japanese /
emphasis-preservation cases.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two reliability gaps in the /events/speak subscriber:
1. resp.chunk().await had no idle timeout. A backend that accepts the
TCP connection but stops producing frames (deadlocked SSE endpoint,
zombie process) would block the task forever without reconnecting.
The pill window would never surface for agent-initiated speech and
there would be nothing to log. Backend emits a `:ping` heartbeat
every 15 s, so 45 s without any data is now treated as a dead
stream — the task errors out and the reconnect loop takes over.
2. Flat 2 s backoff escalates nowhere. Logs fill with reconnect lines
when the backend is down for minutes, and a backend that accepts +
immediately closes connections (no data) spins the loop tightly.
Backoff now escalates 500 ms → 30 s on unproductive rounds and
resets only when at least one frame arrives (the connection was
genuinely productive, not just accepted).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Upstream Narsil/rdev has shipped no release since 2023-06 (crates.io
still serves 0.5.3), so the Sonoma main-thread fix we depend on — PR
#147, applied at hotkey_monitor.rs:184 — is only reachable via a git
pin. A pin to a third-party repo breaks the build whenever the remote
force-pushes, renames, or is taken down, and Cargo does not durably
cache git-dep archives the way it does crates.io tarballs.
Forking to jamiepine/rdev at the same SHA removes that failure mode
without changing crate behavior and gives us a place to cherry-pick
future OS-compatibility fixes on our own timeline. The SHA was verified
to exist on the fork before re-pinning.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two bugs in paste_final_text' clipboard handling:
1. Restore was unconditional. If the user ⌘C'd in the target app during
the 400 ms paste-consume window — or a clipboard history tool (Paste,
Pastebot, Maccy) or Universal Clipboard sync snapshotted our staged
text — the blind restore overwrote their newer content with the
pre-paste snapshot, silently losing user data.
2. send_paste' errors were propagated with ? before the restore, so a
CGEventPost / SendInput failure left the user's clipboard stuck on
the transcript.
Fix folds both into one pattern: capture the post-write change count,
re-read it after paste-consume, restore only when they match (plus treat
a change-count read failure as "unknown, don't overwrite"). Isolate
send_paste's error so the restore runs regardless of paste success, then
propagate the paste error after.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
macOS 14 deprecated NSRunningApplication.activateWithOptions: in favour
of a cooperative-activation pattern: the caller first yields activation
rights to the target, then the target activate()s against the tightened
Sonoma foreground rules. Without the yield, activate() on 14+ sometimes
silently fails or only bounces the dock icon — the exact "paste lands in
the wrong app" symptom we were previously one API break away from.
activate_pid now discovers the 14+ selector via respondsToSelector: and
branches: on 14+ it yieldActivationToApplication:'s from
NSRunningApplication.current then calls -activate on the target; on
11–13 it stays on -activateWithOptions: (still the only option). Both
branches propagate the BOOL return — if activation is refused we error
out before clobbering the clipboard instead of silently proceeding.
The respondsToSelector: result is cached in a OnceLock so the probe
isn't repeated on every paste.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
macOS apps match Cmd+V against the layout-translated character via NSMenu
key equivalents, so posting kVK_ANSI_V (= 9, the QWERTY V position) on
Dvorak produces Cmd+. and never triggers Paste. New keyboard_layout
module resolves the active layout's V keycode via
TISCopyCurrentKeyboardLayoutInputSource + UCKeyTranslate, caches it in an
AtomicU16, and refreshes on kTISNotifySelectedKeyboardInputSourceChanged.
All TIS calls run on the main thread (init from Tauri setup; observer
callback delivered to the main runloop); synthetic_keys::send_paste
reads the cached value once per paste. Falls back to kVK_ANSI_V when
resolution fails or the active input source carries no Unicode key
layout data.
Windows is intentionally left on hardcoded VK_V — SendInput delivers
WM_KEYDOWN with wParam = VK_V to the target regardless of the active
layout, which is why `Send "^v"` works for AutoHotkey on Dvorak Windows.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- Collapse intent tri-state (respond/rewrite/compose) to `personality: bool` on /generate, /speak, and voicebox.speak. Drop respond entirely; keep compose as a standalone button via /profiles/{id}/compose. Remove /rewrite, /respond, and /speak profile endpoints.
- FloatingGenerateBox: Wand2 persona toggle + Dices compose button appear when the selected profile has a personality. ProfileCard badges Wand2 alongside the effects Sparkles.
- MCP bindings: default_intent column → default_personality: bool. Migration drops the legacy column.
- i18n: en / ja / zh-CN / zh-TW translation files filled out and wired through the capture, server, and profile UI.
```ts
voicebox.speak({
text: "Deploy complete.",
profile: "Morgan",
personality: true, // rewrite through the profile's personality LLM
});
```
Stops the "stuck pill" failure where pressing the chord with missing
STT/LLM models triggers a recording that has nowhere to land. The
hotkey now stays disarmed until every gate (models downloaded, Input
Monitoring + Accessibility granted) is green; the empty-state checklist
in CapturesTab surfaces each unmet gate with a one-click action and
auto-arms the chord once everything turns green.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The pill window now surfaces for agent-initiated speech without main-window
involvement. Rust subscribes to /events/speak via a tokio task + reqwest
streaming body (speak_monitor.rs), shows the pill, and forwards events to
the dictate webview over Tauri's event bus. The pill plays audio via a
plain HTMLAudioElement and emits dictate:hide when playback ends. The
pill stays hidden through the ~1 s generation wait and only surfaces when
audio actually starts, with the counter armed at that moment.
Fixes a shared-dict mutation in mcp_server/events.publish() that caused
the second subscriber (Rust speak_monitor) to receive `event: message`
instead of named speak-start/speak-end frames. Also teaches the speak_monitor
parser to handle CRLF framing (sse-starlette default). Main-window
AudioPlayer now skips autoplay for source in {mcp, rest} to avoid
double-play when both windows are alive.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Ships the Capture release end to end. Global-hotkey dictation with
synthetic paste into the focused app on macOS and Windows, an on-screen
pill across recording / transcribing / refining, customizable push-to-
talk and toggle chords, and an accessibility-permission prompt scoped to
Settings → Captures with inline re-check feedback.
Voice profiles gain optional personalities that power compose / rewrite /
respond actions via a local Qwen3 LLM — shared with refinement, so there
is one local LLM in the app, not two.
Refinement hardened with deterministic Whisper-loop collapse before the
LLM sees the transcript, per-capture flag snapshots for re-runs, and a
ten-transcript evaluation harness across every bundled refinement size.
Version bump 0.4.5 → 0.5.0.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* fix(offline): patch transformers mistral-regex check to survive HF failures
transformers 4.57.x's `PreTrainedTokenizerBase._patch_mistral_regex` calls
`huggingface_hub.model_info(repo_id)` unconditionally during any non-local
tokenizer load to probe for Mistral-family models. The call raises on
`HF_HUB_OFFLINE=1`, on network outages, and on slow/blocked HF endpoints,
and transformers doesn't catch any of it — the exception bubbles out of
`from_pretrained` and kills the load for unrelated engines (Qwen TTS,
Qwen CustomVoice, TADA, etc.).
0.4.2's load-time `force_offline_if_cached` guard walked straight into
this trap: on cached online users it flipped `HF_HUB_OFFLINE=1` and
converted a healthy load into a hard crash. 0.4.3's inference-path guard
masked it; #524 removed the inference guard in 0.4.4, and users updating
to 0.4.4 started hitting the same error on the load path instead
(#526).
Fix:
- Wrap `_patch_mistral_regex` so any exception from the inner HF
metadata check is swallowed and the tokenizer is returned unchanged.
Voicebox never loads Mistral models, so the regex rewrite this check
gates is a no-op for us; matches the success-path behavior for
non-Mistral repos (tokenization_utils_base.py:2503).
- Drop the `force_offline_if_cached` wraps from every load path
(pytorch_backend Qwen + Whisper, qwen_custom_voice_backend,
mlx_backend Qwen + Whisper). With the mistral patch in place they
provide zero value and only risk re-introducing the same class of
bug. Helper and its unit tests stay — still correct for targeted
future use.
- Add `backend/tests/test_offline_patch.py` covering
OfflineModeIsEnabled / ConnectionError suppression, success
pass-through, idempotence, and the missing-method no-op path.
Fixes#526.
* fix(offline): install mistral-regex patch for non-MLX backends
The previous commit left the patch wired only through ``mlx_backend.py``'s
existing import of ``hf_offline_patch``. On Windows/Linux/CUDA users who
never load the MLX backend (everyone who hit #526), the patch module was
never imported, so ``patch_transformers_mistral_regex`` never ran and the
crash persisted.
Hoist the import into ``backends/__init__.py``. Every backend imports from
this package, so the module-level patch install runs before any
``from_pretrained`` call regardless of which engine the user picks.
Caught by CodeRabbit and Cursor Bugbot on #530.
0.4.3 wrapped every inference body (`generate`, `transcribe`,
`create_voice_clone_prompt`) with `force_offline_if_cached(True, …)` to
prevent lazy HF lookups from hanging when the network drops
mid-inference (#462). That trade broke online users: the guard flips
`huggingface_hub.constants.HF_HUB_OFFLINE` globally, so any legitimate
metadata call the library makes during generation (e.g. revision
resolution via `HfApi().model_info`) now raises:
Cannot reach https://huggingface.co/api/models/Qwen/Qwen3-TTS-…:
offline mode is enabled.
Hit by multiple users on 0.4.3 within hours of release. The offline
blast radius is much larger than the original hang it fixed.
This reverts the inference-path guards. Load-path guards stay — those
worked fine in 0.4.2 and aren't the source of the regression. The
`force_offline_if_cached` helper itself is unchanged; tests still pass.
The #462 hang (network dropping mid-inference) remains unaddressed by
this commit and will need a targeted fix that doesn't flip a global
flag — most likely per-call timeouts or library-specific
`local_files_only` arguments, not a process-wide env mutation.
* fix(release): notarize and staple macOS DMGs
Tauri's bundler signs the .app and notarizes it, but ships the .dmg
wrapper unnotarized. Gatekeeper rejects that on macOS 15 Sequoia
(caught by Homebrew Cask CI) and causes the 'app isn't signed'
dialog on older Intel Macs when Apple's notarization servers are
slow (issue #509).
New step submits each built DMG to notarytool, staples the ticket,
verifies with spctl, then overwrites the release asset tauri-action
already uploaded to the draft release.
Adds ~5-10 min per macOS job (notarytool round-trip).
* fix(release): fail loudly when no DMG is found to notarize
Empty glob + nullglob was silently skipping the loop body, so if
Tauri's bundler output path changed we'd re-publish the unnotarized
DMGs with a green CI. Assert the glob matched at least one file.
* fix(release): resolve release tag from tauri.conf.json, not GITHUB_REF_NAME
GITHUB_REF_NAME is the branch name when the workflow runs via
workflow_dispatch, so the gh release upload targeted the wrong thing
on manual runs. tauri-action derives its tag from tauri.conf.json's
version field via the v__VERSION__ template; use the same source so
the two always agree.
fugashi (pulled in by misaki[ja]) needs a MeCab dictionary at runtime.
The `unidic` package that ships today contains no data — it relies on
`python -m unidic download` (~526MB), which isn't run by `just setup`
and won't survive PyInstaller freezing.
Switch to `unidic-lite`, which bundles a MeCab-compatible dict inside
the wheel (~50MB). Collect its data files in build_binary.py so frozen
builds also pick up the dicdir. Same failure mode and same fix shape as
the existing en_core_web_sm pre-install.
The 0.4.1 → 0.4.2 version bump (a756295) was done manually and missed
.bumpversion.cfg; catching it up so the next bumpversion run picks up
the right base. Also writes the 0.4.2 release story into CHANGELOG.md
so the release workflow can extract it as the GitHub Release body.
Bundler still hangs on linuxdeploy download mid-rpm even with
createUpdaterArtifacts: false. Drop the ubuntu-22.04 matrix entry
until we figure out a reliable path; the ubuntu-specific setup steps
stay so we can re-enable by adding the matrix row back.
* feat(i18n): add i18next foundation with English + zh-CN locales
Installs i18next + react-i18next + language detector and wires up a
language selector in the General settings page. Extracts strings from
the highest-visibility surfaces: all settings tabs, model management,
sidebar nav, main editor, and the floating generate box. Remaining
strings (profile forms, history, stories/effects/voices/audio tabs)
can land in follow-up PRs.
Closes#411.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* fix(i18n): ensure language switch actually re-renders the tree
- `nonExplicitSupportedLngs: true` was normalizing `zh-CN` → `zh` in
some code paths; since we have explicit `zh-CN` resources, swap it
for `load: 'currentOnly'` which keeps the code as-is.
- `react: { useSuspense: false }` — react-i18next v17 defaults Suspense
on, which can silently suspend components mid-switch and look like
"nothing happens" to the user.
- Use `i18n.language` (the raw current code) instead of
`resolvedLanguage` in the selector so the dropdown always mirrors
what we just set.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): localize ProfileCard, HistoryTable, and relative dates
- ProfileCard: "No description", "designed" badge, aria-labels, and
delete dialog.
- HistoryTable: delete / clear-failed / import / effects dialogs.
- formatDate: switch date-fns `formatDistance` locale based on
`i18n.language` so "5 minutes ago" becomes "5 分钟前" under zh-CN.
HistoryTable now subscribes via useTranslation so the table
re-renders when language flips.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): localize Stories tab (list, content, dialogs, toasts)
Covers the title + "New Story" button, empty states, story row
metadata (item count, updated time), the create/edit/delete dialogs,
and all toast notifications. Also handles StoryContent: "Select a
story" placeholder, search popover, "Export Audio" button, and the
"Generating N audios" pending indicator.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): localize history item and story item dropdown menus
Covers the "..." action menu on both the History table (Play, Export
Audio, Export Package, Apply Effects, Regenerate, Delete) and on
individual story chat items (Play from here, Remove from Story).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): localize Effects tab (list, detail, dialogs, toasts)
Covers EffectsList (title, "New Preset", section headers, preset
cards) and EffectsDetail (header buttons for Save / Save as Custom /
Delete, name/description fields, preview section, Save as Custom
dialog, all toasts).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): localize EffectsChainEditor and built-in preset names
- Effect type labels (Chorus/Flanger, Reverb, Delay, Compressor, Gain,
High-Pass, Low-Pass, Pitch Shift) and every param label (LFO speed,
Modulation depth, Threshold, Ratio, etc.) go through
`effects.types.<type>.{label,params.<param>}` with the backend string
as defaultValue fallback.
- Chain-level controls: "Load preset…", "Add effect…", "Clear",
Power/Remove button titles.
- Built-in preset names + descriptions (Robotic, Radio, Echo Chamber,
Deep Voice) are translated client-side; user-created presets keep
their original names.
Backend keeps returning English — frontend intercepts and translates
via key lookup, defaulting to the backend string so unknown
effects/params don't break.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): localize Create/Edit Voice modal and audio sample panels
ProfileForm now routes its title, description, voice-source toggle
(Clone from audio / Built-in voice), field labels (Name, Description,
Language, Engine, Voice, Reference Text, Default Engine, Default
Effects), sample tabs (Upload / Record / System Audio), action
buttons, and every toast + Zod validation message through i18n.
Also covers the three AudioSample panels (Upload/Record/System) — the
choose-file / start-recording / start-capture call-to-actions, the
"N remaining" countdown, "Recording complete" / "Capture complete"
states, and the Play / Transcribe / Remove / Record Again buttons.
SampleList too — the "No samples yet" empty state, per-sample edit
mode, mini-player aria labels, Delete Sample dialog, and toasts.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): localize Audio Channels tab (list, dialogs, device picker)
Covers the "Audio Channels" title and "New Channel" button, the empty
state, per-channel section labels (Output Devices / Assigned Voices),
the Available Devices right pane with its three contextual hints, the
"No voices assigned" fallback, and both Create/Edit dialogs (titles,
descriptions, field labels, Select placeholders, and the "(default)"
badge).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): localize Voices tab (table header, search, inspector)
VoicesTab now translates the "Voices" title, search placeholder,
"New Voice" button, all six table column headers (Name, Language,
Generations, Samples, Effects, Channels), the avatar alt text, and
the per-row channel MultiSelect (placeholder + "(Default)" suffix).
VoiceInspector routes its form labels through the existing
`profileForm.fields.*` keys, has its own "Default Effects" hint and
avatar/save toasts, and reuses the ProfileForm Zod validation.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): localize ProfileList unsupported-model note and empty state
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): add Traditional Chinese (zh-TW) locale
Adds a zh-TW translation with Taiwan vocabulary conventions
(e.g. 預設 / 儲存 / 載入 / 匯入 / 匯出 / 設定 / 檔案 / 伺服器 / 裝置 / 網路).
Registers it alongside en and zh-CN; the language dropdown picks it up
automatically from SUPPORTED_LANGUAGES.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(i18n): add Japanese (ja) locale
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* fix(i18n): localize relative dates for ja and zh-TW
formatDate only mapped zh-CN, so history timestamps stayed in English for
ja and zh-TW users even after the rest of the UI translated. Extend the
switch to ja and zhTW from date-fns/locale.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* fix(i18n): address PR review feedback
Bugs:
- GeneralPage: network access toast used the keep-server-running title key
(wrong semantic scope). Add networkAccess.updatedTitle and use it.
- GeneralPage: fallback "Unknown" version was stored as a translated string
in state, so it stayed stale across language switches. Store null, resolve
the label at render time.
- GeneralPage: memoize the zod resolver on t and retrigger validation when
the locale changes so existing error messages retranslate.
- GpuPage: adding t to the CUDA progress EventSource effect deps caused the
SSE connection to be torn down and reopened on every language change,
potentially dropping in-flight download events. Capture t in a ref.
- HistoryTable: Effects dialog still rendered English "Source" / "Select
source version" / "Cancel" / "Apply" / "Applying..." — localize them.
- Locales: zh-CN / zh-TW / ja devSuffix was missing the leading space before
"(开发版)"/"(開發版)"/"(開発版)", so dev builds rendered "v0.4.2(开发版)"
instead of "v0.4.2 (开发版)".
Nits:
- ModelManagement: rename .find((t) => ...) callback param to avoid
shadowing useTranslation().t.
- GenerationPage: rename chunkLimit.value interpolation key from count →
chars so i18next doesn't silently activate pluralization if a translator
later adds _one/_other forms.
- LanguageSelect: narrow onValueChange handler param to LanguageCode.
Key count now 559 across en/zh-CN/zh-TW/ja (added 4 effectsDialog keys
plus networkAccess.updatedTitle).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
mlx-audio's STT path imports miniaudio, but we install mlx-audio
--no-deps to dodge its transformers>=5.x pin. Nothing else pulls
miniaudio transitively, so fresh Apple Silicon installs fail to
transcribe with ModuleNotFoundError: miniaudio. Listed explicitly
and updated the stale comments in requirements-mlx.txt and
release.yml that claimed it came from other engines.
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
* fix(offline): guard inference paths with HF_HUB_OFFLINE (#462)
PR #443 wrapped the model *load* path with `force_offline_if_cached` so
cached models don't phone home at startup. The context manager restores
`HF_HUB_OFFLINE` on exit, which left inference paths (generate,
transcribe, voice-prompt creation) unguarded — and `qwen_tts`,
`mlx_audio`, and `transformers` perform lazy tokenizer/processor/config
lookups during inference. With internet on, those lookups are
near-instant and invisible; with internet off, `requests` hangs on DNS
or connect until the network returns. This is exactly what users in
#462 describe: model shows "Loaded", internet drops, generation
"thinks" forever, internet comes back, generation completes.
Chatterbox and LuxTTS don't exhibit this because their engine libs
resolve everything through already-cached paths at load time.
Fix: wrap each inference-sync body with `force_offline_if_cached(True,
...)`. Since inference only runs after a successful load, weights are
known to be on disk, so `is_cached=True` is unconditional.
Also adds the load-time guard that was missing from
`qwen_custom_voice_backend.py` — CustomVoice previously had no offline
protection at all.
Paths patched:
- PyTorchTTSBackend.create_voice_prompt (create_voice_clone_prompt)
- PyTorchTTSBackend.generate (generate_voice_clone)
- PyTorchSTTBackend.transcribe (Whisper generate + decoder-prompt-ids)
- MLXTTSBackend.generate (mlx_audio generate, all branches)
- MLXSTTBackend.transcribe (mlx_audio whisper generate)
- QwenCustomVoiceBackend._load_model_sync + generate
Does not address the secondary `check_model_inputs() missing 'func'`
error reported in the same issue — that's a `transformers` 5.x
version-skew bug on the install path, separate concern.
Fixes#462.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* fix(offline): mutate cached HF constants + threadsafe refcount
Review feedback on the initial fix surfaced two real issues:
1. ``os.environ`` toggles alone don't flip offline mode.
``huggingface_hub.constants.HF_HUB_OFFLINE`` is read once at import
time into a module-level bool; ``transformers.utils.hub._is_offline_mode``
mirrors that bool at its own import time. The hot paths
(``_http._default_backend_factory`` in huggingface_hub,
``is_offline_mode`` in transformers) read the cached bools — not the
env — so mutating only ``os.environ`` was a no-op.
2. Race condition on concurrent inference. Two threads running inside
``force_offline_if_cached`` via ``asyncio.to_thread`` could have
thread A's ``finally`` strip thread B's offline protection mid-run.
Rewrite the helper to:
- mutate ``huggingface_hub.constants.HF_HUB_OFFLINE`` and
``transformers.utils.hub._is_offline_mode`` directly
- refcount concurrent users under a single ``threading.RLock`` so a
shared offline window is restored only when the last caller exits
- still write ``os.environ`` for anything that reads it dynamically
Also addresses the unused-variable ruff flag on the Whisper transcribe
path (``audio, sr`` → ``audio, _sr``).
New unit tests cover the cached-constant mutation, env propagation,
no-op on ``is_cached=False``, nested contexts, and a threaded race
where a slow thread must retain offline mode after a peer exits.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* fix(offline): atomic entry rollback + tidy test assertions
Review follow-up:
- Wrap the `_offline_refcount == 0` setup in a try/except so any failure
during the cached-constant mutation (including unexpected non-ImportError
like RuntimeError or AttributeError from a half-initialized module)
rolls back *all* partial state before re-raising. Without this, a
mid-setup crash could leave `huggingface_hub.constants.HF_HUB_OFFLINE`
mutated but the refcount at 0 — a persistent offline flag outliving
the process.
- Swap ruff-flagged Yoda comparisons in the new test file (SIM300) and
add a module-level note warning that these tests mutate global state
and are not safe under cross-process parallelism.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* test(offline): make concurrency test deterministic and bounded
Replace the `sleep(0.15)` ordering hack with an explicit `threading.Event`
the fast thread sets in `finally`. The slow thread waits on that event
(bounded), then observes the flag — so we deterministically verify the
slow thread still sees offline mode after the fast thread has exited.
Also add timeouts to `barrier.wait()` and assert `not thread.is_alive()`
after the joins so the test can't hang on an unexpected failure path.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
* feat(ci): re-enable Linux release builds (CPU, deb+rpm)
Linux shipped briefly in March 2026 (b580189..103e98b) then was removed
with the message "github runners suck." The post-mortem: standard
ubuntu-22.04 hit disk-pressure during pip+PyInstaller, and a namespace
custom-runner attempt proved flaky. Nothing in the app itself was the
problem — the NVIDIA-package exclusions in build_binary.py (~3 GB
shaved from CPU builds), the CPU-only torch install order, the
PulseAudio/PipeWire audio capture code, and the Tauri deb/rpm bundle
targets all still work.
This restores ubuntu-22.04 to the release matrix as a CPU-only Linux
build with a disk-space cleanup step (jlumbroso/free-disk-space) to
address the root cause of the March failures. Ships .deb + .rpm only
— AppImage was explicitly dropped in e18757b due to glibc portability
issues, keeping that decision.
CUDA-for-Linux is intentionally deferred to a follow-up PR: the
GpuAcceleration.tsx frontend hard-codes CUDA download as Tauri-only
without a Linux branch, and AMD users already get ROCm acceleration
for free on a stock CPU-torch install (backend/app.py:148-160). The
NVIDIA-on-Linux case is the only remaining gap and is non-blocking
for a v1 Linux ship.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* chore(release): bump version 0.4.1 → 0.4.2
tauri-action uses tauri.conf.json's version to name the release, so
pushing v0.4.2 as a tag alone was insufficient — the workflow was still
trying to publish to v0.4.1 (immutable) and failing. Bumps all workspace
package.json files, Cargo.toml, Cargo.lock, and tauri.conf.json.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* ci(release): add Linux bundle-step watchdog + verbose cargo logging
The first v0.4.2 attempt hung inside tauri-action at the bundling stage
on ubuntu-22.04 for ~28 min with no output. Same failure mode that drove
the March 2026 removal (commit 103e98b). Without visibility we're
guessing — probable causes include linuxdeploy/AppImage download stalls
(despite --bundles deb,rpm), cargo link on a cold cache, or disk
pressure during the final link step.
- timeout-minutes: 30 on tauri-action for Ubuntu (45 min elsewhere) —
fail fast with logs instead of waiting out the 6hr job timeout.
- --verbose added to the Linux build args so cargo streams progress.
- CARGO_TERM_VERBOSE + RUST_BACKTRACE=1 exported on tauri-action.
- New 'Disk / environment snapshot' step dumps df/free/tool versions
right before the tauri step so we can correlate with any later
OOM/ENOSPC failure.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* ci(release): disable Tauri updater artifacts on Linux (stops linuxdeploy hang)
Round-2 diagnosis from the v0.4.2 attempt: cargo finished in 3m 55s,
.deb and .rpm were bundled within 22s, then the step hung silently for
25 min until our 30-min watchdog killed it — no further log lines.
tauri.conf.json has `createUpdaterArtifacts: "v1Compatible"`. On Linux
the v1-compatible updater path wants a .AppImage.tar.gz, which means
downloading linuxdeploy-x86_64.AppImage from GitHub at build time.
That download is the silent blocker — same signature as the March 2026
"github runners suck" removal (commit 103e98b).
Fix: pass `--config {"bundle":{"createUpdaterArtifacts":false}}` on the
Linux build only. Mac/Windows continue to produce signed updater
artifacts as before. Linux users update via apt/dnf; Tauri in-app
auto-update for Linux can come later (and would require shipping
AppImage alongside deb/rpm).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* ci(release): pin free-disk-space action + stop removing LLVM
Review feedback on the Linux release workflow:
1. `jlumbroso/free-disk-space@main` was an unpinned ref in a job that
runs with `contents: write` and handles signing secrets. Pin to the
v1.3.1 commit SHA so a force-push or repo compromise can't inject
arbitrary code into our release flow.
2. `large-packages: true` runs `apt-get remove '^llvm-.*'`, wiping LLVM
just before the next step installs `llvm-dev`. That wastes CI time
and risks cascade-removal of reverse deps that won't be pulled back
in by `llvm-dev` alone. The remaining toggles (android, dotnet,
haskell, swap-storage) already clear ~20 GB, which is enough
headroom for the Python + torch + PyInstaller build.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
* fix(audio): preprocess reference samples instead of rejecting them
Uploaded/recorded voice samples were rejected outright whenever the peak
exceeded 0.99 ("Audio is clipping (reduce input gain)"). That wasn't
actionable: a recording in the app has no pre-gain control, and an
already-captured file can't be re-taken by the user. The Settings
"Normalize audio" toggle only affects generated TTS output, so users who
enabled it expecting it to help with sample uploads were still blocked.
Replace the hard reject with a small, always-on preprocess step that
runs right after load:
- DC-offset removal
- Conservative edge-silence trim (top_db=30) with 100 ms padding kept
- Peak cap at 0.95 if the input peak exceeds that
Duration and RMS checks now run on the preprocessed waveform, so
samples that were previously rejected for being "hot" are accepted and
stored with safe headroom. True in-waveform clipping artifacts still
can't be repaired — peak scaling only prevents downstream re-clipping
during multi-sample combination and TTS inference.
Adds a unit-test file (previously none existed for audio.py).
Fixes#456.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* fix(audio): raise trim threshold, cap pad at net-neutral
Review feedback on the preprocessor:
1. ``trim_top_db=30`` was labelled "conservative" in the docstring but is
actually *more* aggressive than librosa's default of 60. Normal
speech dynamic range sits around 30 dB, so 30 dB would eat quiet
trailing syllables and soft consonants. Raise the default to 40 dB —
below normal speech dynamic range but still catching obvious edge
silence — and fix the docstring.
2. Unconditional 100 ms edge padding ran even when ``librosa.effects.trim``
removed nothing. For a well-recorded 29.9 s upload that path would
push the waveform past the 30 s ceiling and trigger a spurious "too
long" rejection. Only pad when trimming actually shortened the
audio, and cap the pad so the output never exceeds the input length.
Adds a regression test for the net-neutral length behaviour.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
The 0.6B slot was aliased to the 1.7B repo as a temporary fallback
because `mlx-community/Qwen3-TTS-12Hz-0.6B-Base-bf16` wasn't published
when MLX support shipped. That conversion is live now, so use it —
Apple Silicon users picking 0.6B get the actual 0.6B model (1.2 GB
instead of 3.5 GB).
Also drops the now-obsolete troubleshooting entry and updates the
triage notes in PROJECT_STATUS.md.
Fixes#485.
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>