* feat(dub): download the dubbing demo videos on demand * docs: changelog fragment for on-demand dub demo videos * fix(dub): ignore a stale initial status answer once Download starts * fix(dub): CI fixes for the demo card (docstring marker, structure counts, fake backend status route) * fix(dub): harden demo download (Windows paths, error detail, proxy errors, poll races) * fix(dub): poll demo download status one request at a time
27 KiB
Active desktop: Electron only
Electron (electron/) is the only desktop and web UI. The Tauri shell and legacy
UI entrypoints are removed; do not restore build, runtime, release, or CI paths for
them. Triage reports from final Tauri installations toward the migration guide and
preserve their immutable updater feeds. Some modules under electron/src/shared/ remain
temporarily shared by Electron; they are not a runnable app. New UI, IPC, setup
instructions, tests, and browser assets belong in Electron; validate Electron on
macOS, Windows and Linux.
Mobile: native iOS and Android (owner-set 2026-10-17)
Every release builds desktop, iOS, Android and Docker from the same release tag and version (owner-set 2026-10-26). Phone downloads belong on the same GitHub Release; a missing channel is a release bug.
mobile/ios/ (Swift/SwiftUI) and mobile/android/ (Kotlin/Compose) are native
apps that run models on the phone (TTS, dictation, voice cloning, dub
translation; owner-set 2026-10-18) and can also drive a user's own VoiceStudio
computer. Phone first: once models are downloaded they work offline with no
computer; pairing adds the heavy engines, chosen per task. The companion-only
build is the base, not the product. They implement one shared contract,
mobile/contract/SPEC.md: a mobile feature ships on both or neither.
Theme, API and strings are generated, never hand-copied: bun scripts/export-mobile-tokens.ts (from the Electron theme), uv run python scripts/export_openapi.py (from the backend) and the Electron locale catalogs;
tests/test_mobile_contract.py fails on drift. Desktop/web UI still belongs in
Electron only.
Project
VoiceStudio
VoiceStudio is an open-source, fully-local ElevenLabs alternative — a desktop app for voice cloning, voice design, video dubbing, and real-time dictation across 646 languages. It runs entirely on the user's machine (CUDA/MPS/ROCm/CPU auto-detect), with no API keys, no accounts, and no cloud dependencies. It's an active beta with a growing user base who hit it with real workloads (50-video batches, multi-engine setups, edge-OS platforms) and report friction in GitHub Issues and Discord. The current version lives in the root package.json (the single source of truth — see Versioning); the latest stable tag is on the Releases page. With AUTO_VERSION_BUMP off (the current owner setting), main holds at the released version between releases.
Core Value: A first-run that actually works. A user who downloads the installer (or clones the repo) should reach a working voice-cloning or dubbing output without hitting a wall — and when something does go wrong, the error or docs should tell them exactly what to do.
Everything else (new engines, fancy features) is downstream of "the thing installs and runs reliably across platforms, with the engines and pipelines users already depend on staying compatible."
Constraints
- Existing engine compatibility: Users with already-installed engines (IndexTTS, CosyVoice, etc.) must not have to reinstall. Fixes touching engine code must be backward-compatible with on-disk model state.
- Cross-platform parity: Every fix must work on macOS (Apple Silicon; Intel Macs are limited to the app UI with a remote backend, as README.md and
docs/install/macos.mddocument), Windows (x64), and Linux (AppImage + deb). No platform-only regressions; the cross-platform bug bash (PR #51) is the baseline. - Default features must work on every platform (strict rule, 2026-05-20): A feature that ships in default mode — out-of-the-box, no user customization, no opt-in toggle — must behave identically on macOS, Windows, and Linux. Platform-specific implementation code is allowed for OS APIs / shells / packaging, but the user-visible default behavior cannot diverge. Platform-only features (e.g., a macOS-only global shortcut, a Windows-only path picker) must go behind explicit user opt-in: Settings toggle, env var, or CLI flag. When a default doesn't work on a platform, that's a P0 bug — either fix it on the missing platform or move it behind opt-in. No third option. This rule governs BEHAVIOUR, not PERFORMANCE (clarified 2026-07-30, council): hardware acceleration is expected to vary by host — CUDA, MPS, DirectML, Triton availability and
torch.compileare all host-dependent by design, and reading the rule to forbid that would forbid GPU support itself. An optimization that is skipped where it cannot work (missing Triton, an arch the wheel lacks, a path its toolchain cannot link) is NOT a parity violation; a feature the user can see and use on one OS but not another is. - Backward-compatible project data: Existing
omnivoice_data/(user voices, projects, settings) must keep working without manual migration. Any DB schema change goes through alembic with a tested upgrade path. - Local-first guarantee preserved: nothing leaves the machine without the user's explicit yes, and the app must remain fully functional with everything declined. Manual bug reporting submits to GitHub Issues (prefilled-URL, from the user's own browser). Owner-approved exception (2026-11-14): automatic failure reports may use Supermetry after a separate explicit opt-in, off by default even for existing analytics users; follow
config/diagnostics.jsonanddocs/electron-privacy.md, with no user content, exception messages, logs, raw stacks or crash dumps. Withdrawal stops delivery and invalidates queued reports. Product analytics (owner-sanctioned 2026-07-16; US project migration 2026-09-26) is opt-in Supermetry (https://app.supermetry.com, public site id inconfig/analytics.json; replaced PostHog, owner decision 2026-11-08) with a first-run consent prompt — asked before runtime setup on a fresh install, two equal-weight Yes/No buttons, never default-on, skipping = off; consent-gated, allowlisted content-free metadata only (backend/core/analytics.py); every build — installer, Docker, and source alike (owner reversal 2026-07-20, #1193) — uses the public site id inconfig/analytics.jsonand shows the same consent ask, withSUPERMETRY_SITE_IDoverriding it. No required cloud calls, accounts, or API keys. Sanctioned calls (owner-set 2026-10-02; full list in.github/CONTRIBUTING.md→ Quality gates): during first-run setup the user starts — the pinned ffmpeg download from GitHubzackees/ffmpeg_bins(backend/services/media_tools.py), the huggingface.co/hf-mirror.com reachability probe for restricted networks (backend/services/endpoint_race.py), the dependency install's download of the packages pinned inuv.lockfrom their locked URLs or the user's chosen/auto-selected regional mirror, including the parallel wheel prefetch (electron/src/main/wheel-prefetch.ts, owner-approved 2026-10-27), the Auto region's one-wheel files.pythonhosted.org vs mirrors.aliyun.com speed check (two small ranged requests,electron/src/main/pypi-mirror.ts), a user-clicked setup connection check (256 KiB from the affected pinned package URL, 15-second limit, no uploads), and Hugging Face model downloads; opening the community gallery (jsDelivr manifest,backend/api/routers/community.py) or enabling the voice-preview gallery (GitHub Releases,backend/services/gallery.py); the dubbing demo videos, only when the user clicks Download: sha256-pinned GitHub Release assets ofdebpalash/omnivoice-gallery(owner-approved 2026-11-21,backend/services/demo_assets.py); packaged update checks against GitHub Releases and the background download of a found update from that same release (owner-approved 2026-11-09; on by default, Settings → Updates → Download updates automatically turns it off so downloads wait for the user) (electron/src/main/updater.ts); yt-dlp updates from PyPI when the user clicks update; opt-in Windows ROCm setup the user selects (owner-approved 2026-10-26, hash-pinned inscripts/windows-rocm-recipe.json): AMD'srepo.radeon.comSDK/PyTorch wheels, AMD'sstable.repo.amd.com/rocm/whl-next/PyTorch wheels (owner-approved 2026-11-09), the OpenNMT/CTranslate2 GitHub release archive, and the HIP CTranslate2 wheels this repository builds and publishes on its own GitHub Releases (owner-approved 2026-11-09); dependency repair for an existing Python the user selected (owner-approved 2026-11-09,electron/src/main/ipc.ts):pip installof the listed missing packages from PyPI, only after the user confirms the plan; optional engine installs and repairs the user clicks (owner-approved 2026-11-07,backend/services/sidecar_install.py): the engine's GitHub source (a shallow branch clone, then the reviewed commit or its source archive, plus pinned GitHub archives of helper sources such as CosyVoice's Matcha-TTS, PyWorld and World), a uv-managed Python fromastral-sh/python-build-standalone(or the regional mirror) when its version is missing, its Python packages from PyPI or the user's chosen mirror, the host's PyTorch build fromdownload.pytorch.org(CUDA or CPU; on Linux AMD, engines with ROCm support use the ROCm index for their Torch version, replaced byOMNIVOICE_TORCH_INDEX; uv may also resolve other packages from that index), and its Hugging Face weights where the install fetches them (others download weights on first use, as Hugging Face model downloads);OMNIVOICE_TORCH_INDEXreplaces it), and its Hugging Face weights; phone content reports toappapi.voicestudio.sh/v1/content-reports, only when the user taps Send on a result's Report sheet (mobile/contract/SPEC.md); and, only after the user turns account features on (first-run setup or Settings → Account, off by default), VoiceStudio Cloud sign-in and account calls from Electron main (electron/src/main/account/), plus settings sync from the backend (backend/services/cloud_sync/) once cloud sync is also on, all stopped at once when switched off. Narrow owner-approved exception (2026-09-28): the GitHub Star badge may fetch the public repository star count when shown and refresh every 20 minutes while visible, without credentials or a referrer. It sends no project, recording, or account data, retains the last count on failure, and never blocks offline use. - Beta release cadence (no RC, no ceremony — strict rule, 2026-05-20): the current release line (0.5.x today) has no release candidates, no 48h soak, no formal release ceremony. Every fix goes continuous-to-main; the owner tags a patch from main whenever the current state is worth cutting. No
-rctags. No phased release. The one sanctioned prerelease is the opt-in Beta channel (owner-approved 2026-10-22):vX.Y.Z-beta.Ntags cut frommain, published as GitHub prereleases that never becomelatest, with their ownelectron-beta-*update feed and:betaDocker tag (seedocs/RELEASING.md→ Beta channel). It adds no soak, ceremony or side branch. No deferrals to a future minor or major version — every open issue and every open community PR gets absorbed into the current line or explicitly declined. Users followmainfor previews; users wanting stable stay on the latest tagged release.
Technology Stack
The May-2026 stack research that used to live here served five capabilities that have all since shipped (HF-token Settings panel, prefilled-URL bug reporting, uv mirror fallback for restricted networks, the Supertonic-3 engine, in-repo Markdown docs). Follow the patterns in the code itself; the durable don'ts that research established:
- No crash-dump endpoints (
sentry-tauriwas evaluated and rejected) — manual bug reporting stays opt-in via prefilled GitHub-issue URLs. Owner-approved exception (2026-11-14): separately opted-in automatic failure reports use the Supermetry public endpoint with the closed, content-free diagnostics policy; Electron main owns desktop delivery even without Python, and native phones/source/Docker own their separate consent. Raw messages, logs and dumps remain forbidden. The other sanctioned third-party endpoint is the opt-in Supermetry product analytics (owner-set 2026-07-16; moved from PostHog 2026-11-08), which is consent-gated behind the first-run prompt and ships allowlisted content-free metadata only. Raw exception, DOM, and session autocapture stay disabled; renderer failures are reduced to a coarse class and stage, never a message or stack. The interface sends events only through the local backend (/api/settings/analytics/event), which owns the destination. The public site id is committed inconfig/analytics.json(source builds get the same consent-gated analytics as installers;SUPERMETRY_SITE_IDoverrides it); no dashboard or API key is ever committed (tests/test_no_committed_analytics_token.py). - No PAT/token-based GitHub posting from the app — the user submits from their own browser.
- Don't recommend
setxfor env vars on Windows (silent truncation, no current-shell propagation) — use the in-app Settings panel or PowerShell[Environment]::SetEnvironmentVariable. - Don't adopt Material for MkDocs for any future docs site (maintenance mode since Nov 2025) — Astro Starlight is the precedent if docs ever outgrow the repo.
hf_transferis deprecated — defaulthuggingface_hub(hf-xet) handles downloads.
For anything new: prefer what's already pinned in pyproject.toml / electron/package.json, and check uv tree for conflicts before adding a dependency.
Conventions
Versioning (hard rule, owner-set 2026-06-11; single-source 2026-09-26): The root package.json is the SINGLE SOURCE OF TRUTH for the maintained Electron app version — Electron's builder reads it directly and Vite injects __APP_VERSION__ for the UI and bug reports. Two toolchain-required mirrors are kept equal to it and bumped in lockstep: pyproject.toml and backend/core/version.py's _FALLBACK_VERSION. Guarded by tests/test_app_version.py. Version bumps are manual and happen only when the owner asks; until then, main may equal the latest released version. Consequences:
- Every PR and preview build uses the canonical version. Preview artifacts add the workflow run number without changing the checked-in version.
- Releasing = obtain owner approval for the version, bump the canonical version and maintained mirrors together, then tag that exact version from
mainafter validation. - Docker:
ghcr.io/debpalash/voicestudio:latest= main (rolling preview);:X.Y.Z+:X.Y+:stable= tagged releases;:beta+:X.Y.Z-beta.N= beta prereleases (never:stable/:X.Y).:latestis the preview channel by design — stable users pin:stableor a version tag. The formerghcr.io/debpalash/omnivoice-studiocoordinate remains a compatibility alias. - Do not bump minor/major or invent RCs/codenames without the owner asking. A beta version (
X.Y.Z-beta.N) is bumped in the same three places, only when the owner asks, and uses the same lockstep. No "defer to next version" labels — scope is absorbed or declined, never re-versioned.
Docs-sync (hard rule, owner-set 2026-06-11): any change that alters something these docs describe — README.md, .github/CONTRIBUTING.md, .github/SECURITY.md, .github/SUPPORT.md, LICENSE, or docs/** (install flows, Docker tag semantics, platform support, versioning/release behavior, review process, supported versions) — must update those docs in the same PR as the change. If a doc impact is discovered after merge, the docs fix is the immediate next commit, not backlog. Stale docs are treated as bugs.
Release notes / changelog (hard rule, owner-set 2026-06-16): every tagged release gets a high-quality, user-facing ## [X.Y.Z] — DATE section in CHANGELOG.md before (or in the same hour as) the tag — never the "Auto-generated release for vX.Y.Z…" fallback. The desktop release workflow extracts that section verbatim as the GitHub Release body, so a missing/empty section ships a bare release. Quality bar (owner-restyled 2026-07-17, replaces the old bold-lead paragraphs): quiet and scannable change entries — after an optional tagged-release introduction (see the presentation rule below), a short **Highlights** bullet list (plain words, one line each), then ### Changed / ### Added / ### Docs / ### Fixed / ### License / ### CI subsections where each entry is a single one-liner with the (#NNN) issue/PR ref and contributor credit (— thanks @user!) where applicable. Change entries are written for users, grouped by theme, with no multi-line entry paragraphs or raw commit dumps. This applies to preview builds too: preview release notes summarize what's new on main since the last stable, in the same style. Workflow: as features merge, add a one-line fragment changelog.d/<PR#>.<type>.md (see changelog.d/README.md) instead of editing CHANGELOG.md, so PRs never conflict on it; scripts/release.py folds the fragments into ## [Unreleased] and deletes them, and entries already in [Unreleased] stay valid. At release time rename it to the version + date. If a release was already cut with the fallback body, the next action is to backfill CHANGELOG.md and gh release edit <tag> the live body — not backlog.
Release presentation and credits (owner-set 2026-09-17): Tagged release announcements lead with the biggest user-visible change; redesigns need real UI screenshots and migrations need installer links and steps. Verify all contributor credits from the tag comparison and included PRs; list authors and bug reporters separately (see docs/RELEASING.md). Keep Highlights to 3–5 bullets; the release introduction can include prose, images, and a download table before the concise change entries.
Localization (hard rule): No hardcoded non-English (CJK) user-facing text anywhere in the codebase except the translation layer: electron/src/renderer/src/i18n/ (the catalog the app loads; checked by tests/test_locale_parity.py and Electron locale:check). All UI strings go through i18n (t('...') keys in locales/*.json); native language names live in i18n/index.ts (LANGUAGES). Functional CJK is allowed and tracked via the allowlist in tests/test_no_hardcoded_cjk.py — text-processing regexes, model/engine vocabulary & identifiers (e.g. CosyVoice speaker IDs), localized error matching, demo/eval data, and test fixtures. CI fails on any hardcoded CJK outside the allowlist; to add legitimate functional CJK, add the path to _ALLOWED_FILES there with the reason it may hold it (the entry's value is what a reviewer reads, and a test keeps every reason real and every path existing).
Release deployment channels (hard rule, owner-set 2026-07-16): a version bump is not "released" until every maintained channel ships it — the full checklist lives in docs/RELEASING.md. The channels are the Electron GitHub Release (Linux x64, Windows x64 + experimental ARM64, macOS arm64 + x64), GHCR and Docker Hub in CUDA and ROCm flavors, and the Docker Hub overview page synced from deploy/dockerhub-overview.md. The final Tauri feeds are immutable compatibility assets copied into releases for old clients; they are never rebuilt. Verify all channels after tagging. Preview/RC builds always source from main; never cut a side-branch build.
Fix quality (hard rule, owner-set 2026-06-16): Fix issues properly and future-maintenance-proof — don't stop at the symptom. Root-cause fully, fix the whole class of the bug (not just the one reported instance), add a fail-before/pass-after regression test, and harden against recurrence (e.g. if a lockfile drift only fails in Docker, also make CI catch it). Go the extra mile where it durably pays off. Be token-efficient about it — extra effort, not extra verbosity: no padding, no redundant re-checks, the smallest correct change that is also recurrence-proof. Don't be shy to spend the effort a proper fix needs; do be shy about wasting tokens.
Keep main green (hard rule, owner-set 2026-06-16): A merge must never break main's CI. Before a change lands, verify the full active CI matrix and deploy/Dockerfile, not only the checks you happened to run. Dependency / lockfile / config changes must be validated against all maintained consumers. The lockfile is the repo-root bun.lock; any workspace package change requires regenerating it and confirming bun install --frozen-lockfile passes. Re-check CodeQL/Security on code changes and the Electron native helper on Rust changes. Do not use the archived Tauri build as a gate.
Documentation/test-only CI policy (owner-set 2026-10-31): skip runtime tests and product builds for documentation-only or test-only changes. Keep the required check green through an explicit detected skip; run changed tests locally. Mixed runtime/config/dependency changes still run CI, as do bundled app assets and licence/catalog data. CLA, identity and secret checks remain enabled.
Other conventions not yet established. Will populate as patterns emerge during development.
Attribution and identity (hard rule, owner-set 2026-10-02): commits, PR descriptions, and issue/PR comments carry only the submitter's own git identity. AI agents are never credited: no agent Co-authored-by: trailer, no "Generated with …" line, no session links, no agent author/committer. Never put names or emails other than the configured git identity into commits or comments (no personal emails, no placeholder identities). Human co-authors are fine. Enforced on PRs by scripts/check_commit_identities.py (the commit-identity check).
Architecture
Architecture not yet mapped. Follow existing patterns found in the codebase.
Project Skills
vite— Vite configuration, assets, HMR, builds, and Vitest guidance.fastapi-python— FastAPI and Pydantic implementation patterns.
Canonical copies live under .agents/skills/; skills-lock.json pins their sources and hashes. Claude should follow these paths directly, avoiding cross-platform symlinks.
Workflow
Direct repo edits are authorized (owner decision, 2026-07-08). The GSD command gate that used to live here referenced /gsd-quick / /gsd-debug / /gsd-execute-phase skills that are not installed in this environment; the owner chose to keep working directly rather than restore them. The working conventions that matter are in Conventions above — versioning, docs-sync, changelog, localization, fix quality, keep-main-green — plus: gate every merge on the "Tests (backend + frontend)" check passing and the PR being MERGEABLE, and check the open-PR queue before implementing any community-reported fix (contributors may have already submitted one).
Start from the latest main (owner rule, 2026-10-26): every PR, fix and feature starts from freshly fetched origin/main — git fetch origin, confirm local main has no incoming or outgoing commits (resolve first if it does), branch from origin/main, and merge the latest main again right before pushing. Never start work while incoming or outgoing commits are pending. Before merging, verify the effective main ruleset. GitHub merge queues require an organization-owned repository; while this repository remains user-owned, require branches to be up to date and merge current main into a stale PR before judging its checks. If a merge queue becomes available and is enabled, it tests each PR with the latest main and replaces that branch-up-to-date requirement; only then avoid refreshing a green PR merely to merge it.
Harvest bot reviews before merging (rule, 2026-07-20): CodeRabbit and Greptile auto-review every PR (tuned via .coderabbit.yaml / greptile.json, both fed CLAUDE.md as context). Before merging ANY PR — including your own — read their inline comments (gh api repos/<owner>/<repo>/pulls/<N>/comments filtered by bot login) and triage: fix real findings, ignore noise, never merge with an unread Critical/P1. They are the free first review pass; reserve deep agent-driven review for what they can't judge (architecture, cross-file semantics, product intent). Mechanical rules belong in deterministic CI tests, not in any AI reviewer.
Token economy (owner directive, 2026-07-20; tightened 2026-07-28): default to the shortest response that fully answers — outlines and tables over prose, no preamble, no recap of work just done, no re-explaining what the diff shows; applies to every response, not just status updates. Lead with the outcome; one-line statuses; no narration, filler, or diff-restating. Read what CI/linters/review bots already computed instead of re-deriving it. Mechanical rules belong in deterministic tests (changelog style, locale parity, version lockstep, CJK — all in tests/), never in agent effort. Targeted tests while iterating; full suites only before landing. AGENTS.md carries this contract for all agents — keep the two in sync.
Never accept a PR as-is (owner directive, 2026-07-20): review findings — bot, agent, or human — get FIXED on the PR branch before merge (maintainer commits are fine and credit the contributor in the changelog); do not merge with known issues, do not merge-then-fix, do not leave findings as comments for someone else. Also merge current main into stale community branches before judging their CI, so the PR runs today's workflow gates (PR-green under an old workflow ≠ main-green).
Developer Profile
Profile not yet configured. Run
/gsd-profile-userto generate your developer profile. This section is managed bygenerate-claude-profile-- do not edit manually.
Agent skills
Diagnostic app intake (owner task, 2026-11-15)
Separately opted-in automatic failure reports may replace the public events
request with /api/public/v1/app-events on the sanctioned Supermetry hosts
https://app.supermetry.com (unconfigured host default) or
https://app.voicestudio.sh (the owner-configured packaged app intake, owner-set
2026-11-16). App ID and write-only ingest key come only from
runtime environment or git-ignored build metadata. Release CI must use GitHub
Actions Secrets for the app ID and ingest key, never public repository variables,
and must not log their values; fork builds receive no upstream credentials.
SUPERMETRY_APP_HOST is an
explicit operator override, unset by default; any other production host must
be recorded and approved by the owner. Product analytics and the closed failure
schema stay unchanged. diagnostics.sessionPings is default off, additionally
requires diagnostics consent, and stays unset in release workflow defaults.
Issue tracker
GitHub Issues on debpalash/VoiceStudio, via the gh CLI. See docs/agents/issue-tracker.md.
Triage labels
The five canonical roles, each label string equal to its name. See docs/agents/triage-labels.md.
Domain docs
Single-context: docs/adr/ plus a root CONTEXT.md that is created lazily and does not exist yet — skip it when absent. See docs/agents/domain.md.