Skip to content
Open
14 changes: 10 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,16 @@ test-only PR. Docker Hub overview edits still publish through the small
timed out, no retries) and keeps PyPI on any doubt
(`electron/src/main/pypi-mirror.ts`); and Hugging Face model downloads
(gated on install state or an explicit user action).
- **Windows ROCm setup the user explicitly selects** (owner-approved
2026-10-26): the matched AMD SDK and PyTorch wheels from `repo.radeon.com`,
and the pinned HIP CTranslate2 archive from OpenNMT/CTranslate2 GitHub
Releases. Every artifact is SHA-256 pinned in
- **Windows ROCm setup the user explicitly selects:** the initial sources
approved on 2026-10-26 are `repo.radeon.com` SDK/PyTorch wheels and the HIP
CTranslate2 archive from OpenNMT/CTranslate2 GitHub Releases. PR #3712
implements a proposed RDNA 2 source-policy exception: `stable.repo.amd.com`
wheels and the unmodified expanded-target dependency mirror under
`dutch2005/VoiceStudio`. The exception is part of PR #3712's review and
requires explicit upstream maintainer acceptance before merge; development
integration/testing does not establish upstream approval. These hosts are
used only by user-selected RDNA 2 provisioning, never by readiness checks
or normal inference. Every artifact is SHA-256 pinned in
`scripts/windows-rocm-recipe.json` and verified before use. This opt-in
installer keeps every other package at its installed (locked) version and
uses the usual package indexes only for anything new; verification
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ licence/catalog data. CLA, identity and secret checks remain enabled.
## Change rules (see CLAUDE.md for full text)
- Root-cause the class, not the instance; fail-before/pass-after regression test; smallest correct change.
- Default behavior identical on macOS/Windows/Linux; platform-only features go behind explicit opt-in. Divergent default = P0.
- Local-first: no new required network calls; any HF download gated on installed-ness or explicit user action; all synthetic audio through the `mark_synthetic` chokepoint. Sanctioned calls are listed in `.github/CONTRIBUTING.md` → Quality gates: user-started first-run setup (ffmpeg from GitHub `zackees/ffmpeg_bins`, the huggingface.co/hf-mirror.com reachability probe, `uv.lock`-pinned package downloads from their locked URLs or the chosen/auto-selected regional mirror incl. the parallel wheel prefetch, the Auto region's one-wheel PyPI vs Aliyun speed check, HF model downloads), opening/enabling the galleries (jsDelivr manifest, GitHub Releases), packaged update checks, user-clicked yt-dlp updates from PyPI, user-selected Windows ROCm setup (owner-approved 2026-10-26, hash-pinned: `repo.radeon.com` wheels and the OpenNMT/CTranslate2 GitHub release), consent-gated analytics, prefilled-URL bug reports, phone content reports sent from a result's Report sheet, the Pro licence check after a key is entered, and VoiceStudio Cloud sign-in/account calls (and settings sync once cloud sync is on) only after the user turns them on (off by default; switching off stops them at once). Owner-approved exception (2026-09-28): the public GitHub star count may refresh automatically every 20 minutes, without credentials/referrer or user content; offline use remains unaffected.
- Local-first: no new required network calls; any HF download gated on installed-ness or explicit user action; all synthetic audio through the `mark_synthetic` chokepoint. Sanctioned calls are listed in `.github/CONTRIBUTING.md` → Quality gates: user-started first-run setup (ffmpeg from GitHub `zackees/ffmpeg_bins`, the huggingface.co/hf-mirror.com reachability probe, `uv.lock`-pinned package downloads from their locked URLs or the chosen/auto-selected regional mirror incl. the parallel wheel prefetch, the Auto region's one-wheel PyPI vs Aliyun speed check, HF model downloads), opening/enabling the galleries (jsDelivr manifest, GitHub Releases), packaged update checks, user-clicked yt-dlp updates from PyPI, user-selected Windows ROCm setup (initial sources approved 2026-10-26: `repo.radeon.com` and OpenNMT/CTranslate2; proposed RDNA 2 source-policy exception in #3712: `stable.repo.amd.com` and the expanded-target dependency mirror under `dutch2005/VoiceStudio`, used only for provisioning; explicit upstream maintainer acceptance is required before merge and development testing does not establish approval; every artifact is hash-pinned), consent-gated analytics, prefilled-URL bug reports, phone content reports sent from a result's Report sheet, the Pro licence check after a key is entered, and VoiceStudio Cloud sign-in/account calls (and settings sync once cloud sync is on) only after the user turns them on (off by default; switching off stops them at once). Owner-approved exception (2026-09-28): the public GitHub star count may refresh automatically every 20 minutes, without credentials/referrer or user content; offline use remains unaffected.
- Every user-facing string via i18n, present in ALL 21 `electron/src/renderer/src/i18n/locales/*.json` files (the catalog the app loads) with real translations; `tests/test_locale_parity.py` and Electron `locale:check` enforce it. The legacy `electron/src/shared/i18n/` catalog is loaded only by shared-module tests.
- Docs-sync in the same PR. Changelog: one quiet one-liner per PR in `changelog.d/<PR#>.<type>.md` (not `CHANGELOG.md`), ending `(#N)` + `— thanks @user!` for community work; the release script folds fragments into Unreleased.
- 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`).
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Everything else (new engines, fancy features) is downstream of "the thing instal
- **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.md` document), 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.compile` are 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. Auto bug reporting is opt-in and submits only to GitHub Issues (prefilled-URL, from the user's own browser). Product analytics (owner-sanctioned 2026-07-16; US project migration 2026-09-26) is opt-in PostHog US with a **first-run consent prompt** — 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) — carries the in-repo publishable write-only token and shows the same consent ask, with env/baked token overriding 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 GitHub `zackees/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 in `uv.lock` from 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`), 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`); packaged update checks against GitHub Releases (`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 in `scripts/windows-rocm-recipe.json`): AMD's `repo.radeon.com` SDK/PyTorch wheels and the OpenNMT/CTranslate2 GitHub release archive; phone content reports to `appapi.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.
- **Local-first guarantee preserved**: nothing leaves the machine without the user's **explicit yes**, and the app must remain fully functional with everything declined. Auto bug reporting is opt-in and submits only to GitHub Issues (prefilled-URL, from the user's own browser). Product analytics (owner-sanctioned 2026-07-16; US project migration 2026-09-26) is opt-in PostHog US with a **first-run consent prompt** — 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) — carries the in-repo publishable write-only token and shows the same consent ask, with env/baked token overriding 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 GitHub `zackees/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 in `uv.lock` from 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`), 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`); packaged update checks against GitHub Releases (`electron/src/main/updater.ts`); yt-dlp updates from PyPI when the user clicks update; opt-in Windows ROCm setup the user selects (hash-pinned in `scripts/windows-rocm-recipe.json`): initial sources approved on 2026-10-26 are AMD's `repo.radeon.com` SDK/PyTorch wheels and the OpenNMT/CTranslate2 GitHub release archive; PR #3712 implements a proposed RDNA 2 source-policy exception for `stable.repo.amd.com` wheels and the unmodified expanded-target dependency mirror under `dutch2005/VoiceStudio`; those provisioning-only sources require explicit upstream maintainer acceptance before merge, and development integration/testing does not establish upstream approval; phone content reports to `appapi.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 `-rc` tags. No phased release. The one sanctioned prerelease is the opt-in **Beta channel** (owner-approved 2026-10-22): `vX.Y.Z-beta.N` tags cut from `main`, published as GitHub prereleases that never become `latest`, with their own `electron-beta-*` update feed and `:beta` Docker tag (see `docs/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 follow `main` for previews; users wanting stable stay on the latest tagged release.
<!-- GSD:project-end -->

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ Start with **VoiceStudio** (default, powered by k2-fsa/OmniVoice), or pick from

Desktop and phone installers are on the [latest release](https://github.com/debpalash/VoiceStudio/releases/latest); Docker images come from GHCR. No GPU? The app is fully usable on the CPU, just slower. Native GGUF engines can also use Vulkan on AMD, Intel and NVIDIA GPUs; OmniVoice GGUF picks its GPU and model size automatically on Windows and Linux ([OmniVoice](docs/engines/omnivoice-gguf.md#vulkan-acceleration), [CosyVoice](docs/engines/cosyvoice-gguf.md)). Speed by engine and hardware: [performance](docs/performance.md).

Experimental [Windows ROCm setup](docs/install/windows-rocm.md) also supports
RDNA 2 RX 6000 GPUs. Its separately pinned CTranslate2 build includes native
`gfx1031` kernels for RX 6700 XT transcription; setup checks actual GPU kernel
execution. RX 6700 XT tests also cover native Torch speech generation and
PyTorch Whisper. ROCm 10 faster-whisper uses a separate inference process to
preserve safe CPU selection and fallback. Other cards and workloads retain the qualification limits in the guide.
Performance presets validate changed engine selections in an offline child
process before saving them, preserving fallback when an installed runtime fails.

## Get started

**macOS / Linux**
Expand Down
30 changes: 29 additions & 1 deletion backend/core/device_caps.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,25 @@ def _normalize_arch(tag: str) -> str:
return str(tag).split(":")[0].strip().lower()


def _installed_rocm_arches(version: str) -> set[str]:
"""TheRock wheels list targets even when their kernel packages are absent."""
from importlib import metadata

result = set()
for dist in metadata.distributions():
name = str(dist.metadata.get("Name", "")).lower().replace("_", "-")
prefix = "amd-torch-device-gfx"
if not name.startswith(prefix) or dist.version != version:
continue
arch = "gfx" + name[len(prefix):]
try:
if metadata.version(f"rocm-sdk-device-{arch}") == "10.0.0":
result.add(arch)
except metadata.PackageNotFoundError:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
continue # A Torch device wheel alone does not provide the SDK kernels.
return result


def build_arch_list(torch) -> list[str]:
"""This torch build's compiled architecture list, or ``[]`` if unknown.

Expand All @@ -211,9 +230,18 @@ def build_arch_list(torch) -> list[str]:
fn = getattr(torch.cuda, name, None)
if callable(fn):
try:
return [str(a) for a in (fn() or [])]
arches = [str(a) for a in (fn() or [])]
except Exception:
return []
version = str(getattr(torch, "__version__", ""))
if sys.platform == "win32" and version == "2.13.0+rocm10.0.0":
try:
installed = _installed_rocm_arches(version)
except Exception: # noqa: BLE001 - unknown kernel packages must not authorize the GPU
installed = set()
# A nonempty sentinel makes absence fail closed in arch_unsupported.
return [a for a in arches if _normalize_arch(a) in installed] or ["no-installed-kernels"]
return arches
return []


Expand Down
Loading
Loading