Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(voice): finish the on-device voice path (extra, drift test, UI proof, docs)

Ruben Lütke168094873a9d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dce2cd6a0b..0c489923a1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,73 @@ versioning per [SemVer](https://semver.org/).
---
+## [Unreleased]
+
+### Added
+
+- **Voice input and voice output can now run entirely on your own machine — no
+ API key, no cloud account, nothing leaving the device.** Three new providers
+ appear in the API-Keys view, each marked *Local · no key needed*:
+
+ - **Whisper (on this machine)** — OpenAI's Whisper `large-v3`, the full
+ multilingual model, for the highest accuracy. One-time download of about
+ 3 GB; noticeably slower than a hosted provider on a machine without a
+ graphics card, which is the price of keeping everything local.
+ - **Nemotron (on this machine)** — NVIDIA's Nemotron 3.5 streaming model.
+ Covers 40 languages including German, downloads about 690 MB instead of
+ 3 GB, and transcribes several times faster than real time on a plain CPU.
+ No NVIDIA hardware required despite the name.
+ - **Piper (on this machine)** — the established offline voice engine, about
+ 200 MB, with one voice each for German, English and Spanish. It speaks
+ faster than real time on a CPU. It sounds good rather than
+ indistinguishable from a person; a hosted voice is still the more natural
+ option.
+
+ **Everything is installed from inside the app.** Each card says honestly
+ whether its engine and model are actually on this machine, and offers a
+ single button that fetches what is missing. A provider whose files are not
+ there cannot be activated at all — instead of being switched on and then
+ failing silently on the first sentence.
+
+ **It degrades honestly.** If you select a local provider and later start
+ Jarvis on a machine where it is not installed, voice input crosses to
+ whichever cloud provider you do have a key for rather than going dead. Local
+ speech recognition also tells the rest of the app that your words never left
+ the device, so the optional dictation clean-up stays local too.
+
+- **Dictation now tidies up your wording, and this is ON by default.** After a
+ dictation is transcribed, a fast model rewrites the *structure* of the text —
+ punctuation, capitalization, filler words and sentence breaks — before it
+ lands in whatever you were typing in. Your exact words and their meaning are
+ kept; the pass is not allowed to rephrase you, and a rewrite that drifts too
+ far from what you said is discarded and your own text delivered instead.
+
+ **Where your text goes.** While the pass is on, the finished transcript is
+ sent to the model you selected. If your speech recognition already runs on
+ your own machine, the pass stays there too and never crosses to a cloud
+ provider on its own — picking a cloud model in the dropdown is the deliberate
+ exception. On an install with no text-model key at all, nothing happens and
+ the raw transcript is delivered exactly as before.
+
+ **Your raw text is always kept.** Every dictation stores what was actually
+ recognized alongside what was delivered, and the history shows both, so a
+ rewrite you dislike is never a loss. Each row also says what the pass did to
+ it, including when it did nothing and why.
+
+ **Where the switch is:** the Voice section → *Language* tab → *Clean up my
+ wording*. Turning it off is immediate and needs no restart. The same tab
+ chooses which model family answers, and a *Test* button runs one fixed sample
+ through your own setup so you can see the before and after before trusting it
+ with your words.
+
+### Fixed
+
+- A dictation that lost part of its audio no longer reports itself as a
+ success. It is marked as partly transcribed, the recording is kept, and the
+ history offers to transcribe it again.
+
+---
+
## [1.6.0] — 2026-07-27
> **On the version number.** This release jumps from 1.1.5 to 1.6.0. The
diff --git a/jarvis/ui/web/frontend/src/components/providers/LocalRuntimePanel.test.tsx b/jarvis/ui/web/frontend/src/components/providers/LocalRuntimePanel.test.tsx
new file mode 100644
index 0000000000..c5c7d286c0
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/providers/LocalRuntimePanel.test.tsx
@@ -0,0 +1,175 @@
+/**
+ * Component tests for the on-device provider panel.
+ *
+ * What these pin is the lesson behind the whole feature: a local provider card
+ * may never imply a readiness nobody verified. The previous local Whisper card
+ * was removed from the product because it rendered as ready on installs where
+ * the engine was never installed, so the panel must:
+ *
+ * - render the SERVER's sentence verbatim, never a client-side guess;
+ * - offer the install exactly when the server says it is not ready;
+ * - stay silent on cloud cards, which have no local runtime at all;
+ * - keep polling to a finished state, because the download takes minutes and
+ * a card frozen on "Installing…" is its own kind of lie.
+ */
+import { afterEach, describe, expect, it, vi } from "vitest";
+import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
+
+import { AuthWidget } from "@/components/providers/ProviderTierSection";
+import type { ProviderDescriptor } from "@/hooks/useProviders";
+
+vi.mock("@/i18n", () => ({
+ useT: () => (key: string) =>
+ ({
+ "apikeys_view.local_install_cta": "Install on this machine",
+ "apikeys_view.local_installing": "Installing…",
+ "apikeys_view.local_install_retry": "Try again",
+ "apikeys_view.local_install_hint": "This downloads a few gigabytes.",
+ })[key] ?? key,
+}));
+
+const LOCAL_CARD: ProviderDescriptor = {
+ id: "faster-whisper",
+ label: "Whisper (on this machine)",
+ tier: "stt",
+ auth_mode: "none",
+ secret_keys: [],
+ secrets_set: {},
+ dashboard_url: null,
+ login_cli: null,
+ install_hint: null,
+ credential_path_hint: null,
+ configured: true,
+ active: false,
+ cli_installed: null,
+ credential_help: "Runs on this machine.",
+ signup_url: null,
+ billing: "local",
+ alt_credential: null,
+ local_runtime: {
+ runtime: "faster-whisper",
+ engine_installed: false,
+ model_present: false,
+ model_label: "Whisper large-v3",
+ ready: false,
+ detail: "The local speech engine is not installed yet.",
+ },
+} as ProviderDescriptor;
+
+function withRuntime(
+ patch: Partial<NonNullable<ProviderDescriptor["local_runtime"]>> | null,
+): ProviderDescriptor {
+ return {
+ ...LOCAL_CARD,
+ local_runtime: patch === null ? null : { ...LOCAL_CARD.local_runtime!, ...patch },
+ };
+}
+
+function installFetchMock(handler: (url: string, init?: RequestInit) => unknown) {
+ const fetchMock = vi.fn(async (input: RequestInfo | URL, init?: RequestInit) => {
+ const body = handler(String(input), init);
+ return {
+ ok: true,
+ status: 200,
+ statusText: "OK",
+ json: async () => body,
+ text: async () => JSON.stringify(body),
+ } as Response;
+ });
+ (globalThis as unknown as { fetch: typeof fetch }).fetch =
+ fetchMock as unknown as typeof fetch;
+ return fetchMock;
+}
+
+afterEach(() => {
+ cleanup();
+ vi.restoreAllMocks();
+ vi.useRealTimers();
+});
+
+describe("local runtime panel", () => {
+ it("shows the server's own explanation, not a client-side guess", () => {
+ render(<AuthWidget descriptor={LOCAL_CARD} onChanged={() => {}} />);
+
+ expect(
+ screen.getByText("The local speech engine is not installed yet."),
+ ).toBeTruthy();
+ });
+
+ it("offers the install while the provider is not ready", () => {
+ render(<AuthWidget descriptor={LOCAL_CARD} onChanged={() => {}} />);
+
+ expect(screen.getByRole("button", { name: /install on this machine/i })).toBeTruthy();
+ });
+
+ it("hides the install button once the server reports it ready", () => {
+ render(
+ <AuthWidget
+ descriptor={withRuntime({
+ ready: true,
+ engine_installed: true,
+ model_present: true,
+ detail: "Ready — large-v3 runs entirely on this machine.",
+ })}
+ onChanged={() => {}}
+ />,
+ );
+
+ expect(screen.queryByRole("button", { name: /install/i })).toBeNull();
+ expect(screen.getByText(/runs entirely on this machine/i)).toBeTruthy();
+ });
+
+ it("renders nothing for a cloud provider", () => {
+ render(<AuthWidget descriptor={withRuntime(null)} onChanged={() => {}} />);
+
+ expect(screen.queryByRole("button", { name: /install/i })).toBeNull();
+ expect(
+ screen.queryByText("The local speech engine is not installed yet."),
+ ).toBeNull();
+ });
+
+ it("starts the install and then reports progress from the server", async () => {
+ const calls: string[] = [];
+ installFetchMock((url) => {
+ calls.push(url);
+ if (url.endsWith("/local-install")) {
+ return { state: "running", ready: false, message: "Install started." };
+ }
+ return { state: "running", ready: false, message: "Downloading encoder…" };
+ });
+
+ render(<AuthWidget descriptor={LOCAL_CARD} onChanged={() => {}} />);
+ fireEvent.click(screen.getByRole("button", { name: /install on this machine/i }));
+
+ await waitFor(() => {
+ expect(calls.some((u) => u.endsWith("/local-install"))).toBe(true);
+ });
+ await waitFor(() => {
+ expect(screen.getByText("Install started.")).toBeTruthy();
+ });
+ // The button must not stay clickable while a download is in flight.
+ expect(
+ (screen.getByRole("button", { name: /installing/i }) as HTMLButtonElement)
+ .disabled,
+ ).toBe(true);
+ });
+
+ it("surfaces a failed install as retryable instead of pretending it worked", async () => {
+ installFetchMock(() => ({
+ state: "error",
+ ready: false,
+ message: "Could not download Whisper large-v3: connection reset.",
+ }));
+
+ render(<AuthWidget descriptor={LOCAL_CARD} onChanged={() => {}} />);
+ fireEvent.click(screen.getByRole("button", { name: /install on this machine/i }));
+
+ await waitFor(() => {
+ expect(screen.getByText(/connection reset/i)).toBeTruthy();
+ });
+ expect(
+ (screen.getByRole("button", { name: /try again/i }) as HTMLButtonElement)
+ .disabled,
+ ).toBe(false);
+ });
+});
diff --git a/pyproject.toml b/pyproject.toml
index d4f9fdeee0..7516453e1f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -422,6 +422,14 @@ local-voice = [
# PyAV 16+ raised its Apple-Silicon deployment floor to macOS 14. Version
# 15.1 retains wheels for the supported macOS 13 floor and Python 3.11-3.13.
"av==15.1.0; sys_platform == 'darwin' and platform_machine == 'arm64' and python_version < '3.14'",
+ # ONNX-Runtime speech stack (Apache-2.0, torch-free) powering the on-device
+ # Nemotron recogniser and the Piper voices. The >=1.13.3 floor is
+ # LOAD-BEARING, not hygiene: multilingual Nemotron needs the prompt_index
+ # encoder input added in that release, and an older wheel loads the same
+ # files and then transcribes every language as English. Kept in step with
+ # jarvis/speech/local_models.py::SHERPA_ONNX_PACKAGE, which the in-app
+ # installer asks pip for.
+ "sherpa-onnx>=1.13.3",
]
# Objective TTS evaluation suite (jarvis/speech/tts_eval): round-trip ASR WER via
# faster-whisper (CPU). onnxruntime + numpy are already in base; the DNSMOS MOS
diff --git a/tests/unit/speech/test_local_models.py b/tests/unit/speech/test_local_models.py
index d455b55590..032d2c321f 100644
--- a/tests/unit/speech/test_local_models.py
+++ b/tests/unit/speech/test_local_models.py
@@ -118,6 +118,32 @@ def test_catalog_entry_is_resolvable_and_cloud_ids_are_not() -> None:
assert local_models.local_status("groq-api") is None
+def test_pip_requirements_match_the_local_voice_extra() -> None:
+ """The in-app installer and the packaged extra must ask for the SAME thing.
+
+ They are declared in two files that never meet — the catalog (what the
+ install button runs) and pyproject's ``[local-voice]`` extra (what a normal
+ pip install brings). Drift here is invisible until someone installs one way
+ and gets a different engine version than the other way, which for
+ sherpa-onnx means a silently English-only recogniser.
+ """
+ import tomllib
+ from pathlib import Path
+
+ root = Path(__file__).resolve().parents[3]
+ data = tomllib.loads((root / "pyproject.toml").read_text(encoding="utf-8"))
+ extra = data["project"]["optional-dependencies"]["local-voice"]
+
+ for entry in local_models.LOCAL_PROVIDERS:
+ package, _, floor = entry.pip_package.partition(">=")
+ matching = [dep for dep in extra if dep.split(";")[0].strip().startswith(package)]
+ assert matching, f"{package} is missing from the [local-voice] extra"
+ assert any(floor in dep for dep in matching), (
+ f"{package} floor {floor} in the catalog does not match "
+ f"the [local-voice] extra: {matching}"
+ )
+
+
def test_status_reports_the_model_the_config_actually_names(
monkeypatch: pytest.MonkeyPatch,
) -> None: