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(realtime): browse current local speech models

rubenluetke10-beep29f65bf756eb
diff --git a/jarvis/realtime/local_server/install.py b/jarvis/realtime/local_server/install.py
index 3c985fd683..7ede4d2c04 100644
--- a/jarvis/realtime/local_server/install.py
+++ b/jarvis/realtime/local_server/install.py
@@ -34,6 +34,7 @@ from jarvis.realtime.local_server.brain_link import BrainResolution
from jarvis.realtime.local_server.patching import (
PATCH_TARGET_VERSION,
apply_create_response_patch,
+ apply_pocket_language_patch,
patch_state,
)
from jarvis.realtime.local_server.preflight import (
@@ -853,9 +854,10 @@ def _run_install_guarded(
_set("deps", 45, "installing the server package set")
_run(pip + ["-r", str(_PINS_FILE)], timeout=_PIP_TIMEOUT_S)
- _set("patch", 60, "applying the vendored create_response patch")
- outcome = apply_create_response_patch(_site_packages())
- _set("patch", 62, f"patch {outcome}")
+ _set("patch", 60, "applying the vendored realtime compatibility patches")
+ response_outcome = apply_create_response_patch(_site_packages())
+ pocket_outcome = apply_pocket_language_patch(_site_packages())
+ _set("patch", 62, f"protocol {response_outcome}; Pocket TTS {pocket_outcome}")
_set("smoke", 70, "first boot (downloads voice/hearing models once)")
launch_command = derive_launch_command(report.brain, memory_source=report.memory_source)
diff --git a/jarvis/realtime/local_server/model_catalog.py b/jarvis/realtime/local_server/model_catalog.py
index e02781f11a..925a630c67 100644
--- a/jarvis/realtime/local_server/model_catalog.py
+++ b/jarvis/realtime/local_server/model_catalog.py
@@ -1,10 +1,11 @@
"""User-selectable model profiles for the managed local realtime stack.
-Ollama owns the language-model catalog. This module owns the smaller speech
-catalog because TTS checkpoints are not Ollama models and pretending otherwise
-would make the picker lie. Only profiles exercised by the pinned managed
-runtime are selectable; upstream backends remain visible with an honest reason
-until their dependency set and end-to-end audio path pass the same smoke gate.
+Ollama owns the language-model catalog. This module owns the speech catalog:
+TTS checkpoints use backend-specific runtimes, so an arbitrary Hugging Face
+model cannot safely be treated like an Ollama tag. Runtime-compatible profiles
+are selectable and still have to pass the transactional voice smoke test.
+Current frontier projects that are not yet supported by the pinned runtime stay
+browsable with an honest compatibility verdict and their official source.
"""
from __future__ import annotations
@@ -25,14 +26,55 @@ class VoiceProfile:
recommended: bool = False
note: str = ""
speaker: str = ""
+ pocket_language: str = ""
+ release_date: str = ""
+ license: str = ""
+ source_url: str = ""
+ streaming: bool = False
+ frontier: bool = False
+ size_gb: float = 0.0
_QWEN_LANGUAGES = ("de", "en", "es", "fr", "it", "pt", "zh", "ja", "ko", "ru")
+_POCKET_SOURCE = "https://github.com/kyutai-labs/pocket-tts"
+_POCKET_RELEASE = "2026-05"
-# The two CustomVoice checkpoints use the same pinned qwen-tts runtime and
-# speaker contract. The remaining entries are capabilities of the pinned
-# speech-to-speech server, but their optional dependency/profile bake-off has
-# not passed Jarvis's managed audio gate yet.
+
+def _pocket_profile(
+ *,
+ profile_id: str,
+ label: str,
+ language: str,
+ language_code: str,
+ speaker: str,
+ size_gb: float,
+) -> VoiceProfile:
+ return VoiceProfile(
+ id=profile_id,
+ label=label,
+ backend="pocket",
+ model=f"kyutai/pocket-tts:{language}",
+ languages=(language_code,),
+ selectable=True,
+ note=(
+ "Current CPU-first streaming model. This profile is language-specific; "
+ "choose Qwen3-TTS when automatic language switching is required."
+ ),
+ speaker=speaker,
+ pocket_language=language,
+ release_date=_POCKET_RELEASE,
+ license="MIT",
+ source_url=_POCKET_SOURCE,
+ streaming=True,
+ frontier=True,
+ size_gb=size_gb,
+ )
+
+
+# Selectable means the pinned speech-to-speech server has a shipped adapter for
+# the profile. ``voice_catalog`` separately reports whether that adapter is
+# already installed in the managed venv. New frontier families remain visible
+# without pretending their checkpoints can be passed to a different backend.
VOICE_PROFILES: tuple[VoiceProfile, ...] = (
VoiceProfile(
id="qwen3-tts-1.7b",
@@ -44,6 +86,12 @@ VOICE_PROFILES: tuple[VoiceProfile, ...] = (
recommended=True,
note="Best multilingual quality in the tested managed profile.",
speaker="Aiden",
+ release_date="2026-01",
+ license="Apache-2.0",
+ source_url="https://github.com/QwenLM/Qwen3-TTS",
+ streaming=True,
+ frontier=True,
+ size_gb=3.4,
),
VoiceProfile(
id="qwen3-tts-0.6b",
@@ -54,36 +102,94 @@ VOICE_PROFILES: tuple[VoiceProfile, ...] = (
selectable=True,
note="Smaller multilingual voice model; first use downloads its weights.",
speaker="Aiden",
+ release_date="2026-01",
+ license="Apache-2.0",
+ source_url="https://github.com/QwenLM/Qwen3-TTS",
+ streaming=True,
+ frontier=True,
+ size_gb=1.4,
+ ),
+ _pocket_profile(
+ profile_id="pocket-tts-de-24l",
+ label="Pocket TTS 2.1 · German HQ",
+ language="german_24l",
+ language_code="de",
+ speaker="juergen",
+ size_gb=1.0,
+ ),
+ _pocket_profile(
+ profile_id="pocket-tts-en",
+ label="Pocket TTS 2.1 · English",
+ language="english",
+ language_code="en",
+ speaker="alba",
+ size_gb=0.5,
+ ),
+ _pocket_profile(
+ profile_id="pocket-tts-fr-24l",
+ label="Pocket TTS 2.1 · French HQ",
+ language="french_24l",
+ language_code="fr",
+ speaker="estelle",
+ size_gb=1.0,
+ ),
+ _pocket_profile(
+ profile_id="pocket-tts-es-24l",
+ label="Pocket TTS 2.1 · Spanish HQ",
+ language="spanish_24l",
+ language_code="es",
+ speaker="lola",
+ size_gb=1.0,
+ ),
+ _pocket_profile(
+ profile_id="pocket-tts-it",
+ label="Pocket TTS 2.1 · Italian HQ",
+ language="italian_24l",
+ language_code="it",
+ speaker="giovanni",
+ size_gb=1.0,
+ ),
+ _pocket_profile(
+ profile_id="pocket-tts-pt",
+ label="Pocket TTS 2.1 · Portuguese HQ",
+ language="portuguese_24l",
+ language_code="pt",
+ speaker="rafael",
+ size_gb=1.0,
),
VoiceProfile(
id="kokoro-82m",
label="Kokoro-82M",
backend="kokoro",
model="hexgrad/Kokoro-82M",
- languages=("en", "ja", "zh", "fr", "it", "pt"),
- selectable=False,
- note="Visible upstream option; its optional package has not passed the managed voice test.",
- ),
- VoiceProfile(
- id="pocket-tts",
- label="Pocket TTS",
- backend="pocket",
- model="kyutai/pocket-tts",
- languages=("en", "fr"),
+ languages=("en", "ja", "zh", "fr", "it", "pt", "es", "hi"),
selectable=False,
note=(
- "Visible upstream option; its optional package conflicts with the "
- "current audio-enhancement stack."
+ "The upstream adapter is available, but its optional package has "
+ "not passed the managed voice test."
),
+ release_date="2025-01",
+ license="Apache-2.0",
+ source_url="https://huggingface.co/hexgrad/Kokoro-82M",
+ streaming=True,
+ size_gb=0.4,
),
VoiceProfile(
id="chattts",
- label="ChatTTS",
+ label="ChatTTS 0.2.5",
backend="chatTTS",
model="2Noise/ChatTTS",
languages=("en", "zh"),
selectable=False,
- note="Visible upstream option; it is not yet validated by the managed realtime smoke test.",
+ note=(
+ "The model is non-commercial and the optional adapter has not "
+ "passed the managed voice test."
+ ),
+ release_date="2026-04",
+ license="CC-BY-NC-4.0",
+ source_url="https://github.com/2noise/ChatTTS",
+ streaming=True,
+ size_gb=2.0,
),
VoiceProfile(
id="mms-tts",
@@ -93,9 +199,121 @@ VOICE_PROFILES: tuple[VoiceProfile, ...] = (
languages=("single-language",),
selectable=False,
note=(
- "Visible upstream option; each language needs a separate model, so "
- "it cannot follow automatic language switching yet."
+ "The upstream adapter uses one checkpoint per language and cannot "
+ "follow automatic per-turn language switching yet."
),
+ release_date="2023-05",
+ license="CC-BY-NC-4.0",
+ source_url="https://huggingface.co/facebook/mms-tts",
+ size_gb=0.15,
+ ),
+ VoiceProfile(
+ id="chatterbox-multilingual-v3",
+ label="Chatterbox Multilingual V3",
+ backend="chatterbox",
+ model="ResembleAI/Chatterbox-Multilingual (v3)",
+ languages=(
+ "ar",
+ "da",
+ "de",
+ "el",
+ "en",
+ "es",
+ "fi",
+ "fr",
+ "he",
+ "hi",
+ "it",
+ "ja",
+ "ko",
+ "ms",
+ "nl",
+ "no",
+ "pl",
+ "pt",
+ "ru",
+ "sv",
+ "sw",
+ "tr",
+ "zh",
+ ),
+ selectable=False,
+ note="Frontier candidate; the pinned realtime server has no Chatterbox adapter yet.",
+ release_date="2026-06",
+ license="MIT",
+ source_url="https://github.com/resemble-ai/chatterbox",
+ frontier=True,
+ size_gb=3.2,
+ ),
+ VoiceProfile(
+ id="fun-cosyvoice3-0.5b",
+ label="Fun-CosyVoice 3.0 0.5B",
+ backend="cosyvoice",
+ model="FunAudioLLM/Fun-CosyVoice3-0.5B-2512",
+ languages=("zh", "en", "ja", "ko", "de", "es", "fr", "it", "ru"),
+ selectable=False,
+ note=(
+ "Frontier candidate; its bi-streaming runtime is not integrated "
+ "with the managed server."
+ ),
+ release_date="2025-12",
+ license="Apache-2.0",
+ source_url="https://github.com/FunAudioLLM/CosyVoice",
+ streaming=True,
+ frontier=True,
+ size_gb=2.0,
+ ),
+ VoiceProfile(
+ id="moss-tts-nano-100m",
+ label="MOSS-TTS-Nano 100M",
+ backend="moss",
+ model="OpenMOSS-Team/MOSS-TTS-Nano-100M",
+ languages=(
+ "zh",
+ "en",
+ "de",
+ "es",
+ "fr",
+ "ja",
+ "it",
+ "hu",
+ "ko",
+ "ru",
+ "fa",
+ "ar",
+ "pl",
+ "pt",
+ "cs",
+ ),
+ selectable=False,
+ note=(
+ "New CPU-friendly frontier candidate; the managed realtime "
+ "adapter is not available yet."
+ ),
+ release_date="2026-04",
+ license="Apache-2.0",
+ source_url="https://huggingface.co/OpenMOSS-Team/MOSS-TTS-Nano-100M",
+ streaming=True,
+ frontier=True,
+ size_gb=0.6,
+ ),
+ VoiceProfile(
+ id="vibevoice-realtime-0.5b",
+ label="VibeVoice Realtime 0.5B",
+ backend="vibevoice",
+ model="microsoft/VibeVoice-Realtime-0.5B",
+ languages=("en",),
+ selectable=False,
+ note=(
+ "Frontier candidate; multilingual output is experimental and the "
+ "managed adapter is not available yet."
+ ),
+ release_date="2026-07",
+ license="MIT",
+ source_url="https://huggingface.co/microsoft/VibeVoice-Realtime-0.5B",
+ streaming=True,
+ frontier=True,
+ size_gb=2.0,
),
)
@@ -109,6 +327,14 @@ _QWEN_SPEAKER_FLAG = re.compile(
r"(?<!\S)--qwen3_tts_speaker(?:\s+|=)(?:\"[^\"]*\"|'[^']*'|\S+)",
re.IGNORECASE,
)
+_POCKET_VOICE_FLAG = re.compile(
+ r"(?<!\S)--pocket_tts_voice(?:\s+|=)(?:\"[^\"]*\"|'[^']*'|\S+)",
+ re.IGNORECASE,
+)
+_POCKET_DEVICE_FLAG = re.compile(
+ r"(?<!\S)--pocket_tts_device(?:\s+|=)(?:\"[^\"]*\"|'[^']*'|\S+)",
+ re.IGNORECASE,
+)
def get_voice_profile(profile_id: str) -> VoiceProfile | None:
@@ -122,6 +348,13 @@ def current_voice_profile(command: str) -> str:
model = _flag_value(command, "--qwen3_tts_model_name")
if backend.lower() == "qwen3" and not model:
return "qwen3-tts-1.7b"
+ if backend.lower() == "pocket":
+ voice = _flag_value(command, "--pocket_tts_voice")
+ language, _speaker = _decode_pocket_voice(voice)
+ for profile in VOICE_PROFILES:
+ if profile.backend == "pocket" and profile.pocket_language == language:
+ return profile.id
+ return "pocket-tts-en"
for profile in VOICE_PROFILES:
if profile.backend.lower() != backend.lower():
continue
@@ -130,21 +363,33 @@ def current_voice_profile(command: str) -> str:
return ""
+def _profile_runtime_ready(profile: VoiceProfile) -> bool:
+ if not profile.selectable:
+ return False
+ from jarvis.realtime.local_server.install import _site_packages
+
+ site_packages = _site_packages()
+ if profile.backend == "qwen3":
+ return (site_packages / "speech_to_speech" / "TTS" / "qwen3_tts_handler.py").is_file()
+ if profile.backend == "pocket":
+ from jarvis.realtime.local_server.patching import pocket_language_patch_state
+
+ return (site_packages / "pocket_tts").is_dir() and pocket_language_patch_state(
+ site_packages
+ ) == "patched"
+ return False
+
+
def voice_catalog(command: str) -> dict[str, object]:
- """JSON-shaped speech model catalog with the persisted selection."""
+ """JSON-shaped speech model catalog with compatibility metadata."""
current = current_voice_profile(command)
models: list[dict[str, object]] = []
for profile in VOICE_PROFILES:
item = asdict(profile)
item["languages"] = list(profile.languages)
item["current"] = profile.id == current
- # Kokoro's built-in status differs by platform, but it stays
- # unselectable until its Jarvis smoke profile passes on every OS.
- item["platform"] = (
- "macOS / Linux / Windows"
- if profile.id != "kokoro-82m"
- else ("built in on macOS; optional package elsewhere")
- )
+ item["runtime_ready"] = _profile_runtime_ready(profile)
+ item["platform"] = "macOS / Linux / Windows"
models.append(item)
return {
"current": current,
@@ -165,20 +410,40 @@ def apply_voice_profile(command: str, profile_id: str) -> str:
if not profile.selectable:
raise ValueError(profile.note or f"voice model {profile_id} is not selectable")
rewritten = _replace_flag(command, _TTS_FLAG, f"--tts {profile.backend}")
- rewritten = _replace_flag(
- rewritten,
- _QWEN_MODEL_FLAG,
- f"--qwen3_tts_model_name {profile.model}",
- )
- if profile.speaker:
+ if profile.backend == "qwen3":
+ rewritten = _replace_flag(
+ rewritten,
+ _QWEN_MODEL_FLAG,
+ f"--qwen3_tts_model_name {profile.model}",
+ )
+ if profile.speaker:
+ rewritten = _replace_flag(
+ rewritten,
+ _QWEN_SPEAKER_FLAG,
+ f"--qwen3_tts_speaker {profile.speaker}",
+ )
+ elif profile.backend == "pocket":
+ encoded_voice = f"@{profile.pocket_language}:{profile.speaker}"
rewritten = _replace_flag(
rewritten,
- _QWEN_SPEAKER_FLAG,
- f"--qwen3_tts_speaker {profile.speaker}",
+ _POCKET_VOICE_FLAG,
+ f"--pocket_tts_voice {encoded_voice}",
+ )
+ rewritten = _replace_flag(
+ rewritten,
+ _POCKET_DEVICE_FLAG,
+ "--pocket_tts_device cpu",
)
return rewritten
+def _decode_pocket_voice(value: str) -> tuple[str, str]:
+ if value.startswith("@") and ":" in value:
+ language, speaker = value[1:].split(":", 1)
+ return language, speaker
+ return "english", value or "alba"
+
+
def _replace_flag(command: str, pattern: re.Pattern[str], rendered: str) -> str:
without_old = pattern.sub("", command or "").strip()
return f"{without_old} {rendered}".strip()
diff --git a/jarvis/realtime/local_server/patches/pocket_language_0.2.12.patch b/jarvis/realtime/local_server/patches/pocket_language_0.2.12.patch
new file mode 100644
index 0000000000..25bcbadef7
--- /dev/null
+++ b/jarvis/realtime/local_server/patches/pocket_language_0.2.12.patch
@@ -0,0 +1,17 @@
+--- a/speech_to_speech/TTS/pocket_tts_handler.py
++++ b/speech_to_speech/TTS/pocket_tts_handler.py
+@@ -53,8 +53,13 @@
+ self.should_listen = should_listen
+ self.cancel_scope = cancel_scope
+ self.speculative_turns = speculative_turns
+ self.device = device
++ language = None
++ if voice.startswith("@") and ":" in voice:
++ language, voice = voice[1:].split(":", 1)
+ self.voice = voice
+ self.sample_rate = sample_rate
+ self.blocksize = blocksize
+@@ -70,2 +75,2 @@
+ logger.info("Loading Pocket TTS model")
+- self.model = TTSModel.load_model()
++ self.model = TTSModel.load_model(language=language)
diff --git a/jarvis/realtime/local_server/patching.py b/jarvis/realtime/local_server/patching.py
index 9bb24fc378..2354569622 100644
--- a/jarvis/realtime/local_server/patching.py
+++ b/jarvis/realtime/local_server/patching.py
@@ -40,6 +40,18 @@ _PATCH_FILE = (
Path(__file__).parent / "patches" / f"service_create_response_{PATCH_TARGET_VERSION}.patch"
)
+# Pocket TTS 2.1 added current multilingual checkpoints, while the pinned
+# speech-to-speech handler still always loads its English default. Jarvis uses
+# an internal ``@language:voice`` token in the existing voice argument so the
+# patch remains local to one handler and introduces no new CLI enum layer.
+POCKET_HANDLER_RELPATH = Path("speech_to_speech") / "TTS" / "pocket_tts_handler.py"
+POCKET_HANDLER_PRISTINE_SHA256 = "72e5c24cb0d4540d98c60276cee2de8950cf106361948569fe558e683200e62d"
+# Filled from the byte-exact patch result below; pinned by tests.
+POCKET_HANDLER_PATCHED_SHA256 = "58ec72c68c14927473a18fccbea2e7b7e51166c55a53122ab953f866e595238e"
+_POCKET_PATCH_FILE = (
+ Path(__file__).parent / "patches" / f"pocket_language_{PATCH_TARGET_VERSION}.patch"
+)
+
class PatchDriftError(RuntimeError):
"""The target file matches neither the pristine nor the patched hash."""
@@ -137,3 +149,41 @@ def apply_create_response_patch(site_packages: Path) -> str:
target.write_bytes(patched.encode("utf-8"))
log.info("local-realtime: applied create_response patch to %s", target)
return "applied"
+
+
+def pocket_language_patch_state(site_packages: Path) -> str:
+ """Report whether the Pocket TTS multilingual compatibility patch is ready."""
+ target = site_packages / POCKET_HANDLER_RELPATH
+ try:
+ digest = _sha256(target.read_bytes())
+ except OSError:
+ return "missing"
+ if digest == POCKET_HANDLER_PRISTINE_SHA256:
+ return "pristine"
+ if digest == POCKET_HANDLER_PATCHED_SHA256:
+ return "patched"
+ return "drifted"
+
+
+def apply_pocket_language_patch(site_packages: Path) -> str:
+ """Enable Pocket TTS 2.1 language profiles in the pinned server handler."""
+ target = site_packages / POCKET_HANDLER_RELPATH
+ state = pocket_language_patch_state(site_packages)
+ if state == "patched":
+ return "already-applied"
+ if state != "pristine":
+ raise PatchDriftError(
+ f"{target} is {state}: expected the pristine speech-to-speech "
+ f"{PATCH_TARGET_VERSION} Pocket handler; refusing to modify an unknown file"
+ )
+ original = target.read_bytes().decode("utf-8")
+ diff_text = _POCKET_PATCH_FILE.read_bytes().decode("utf-8")
+ patched = _apply_unified_diff(original, diff_text)
+ if _sha256(patched.encode("utf-8")) != POCKET_HANDLER_PATCHED_SHA256:
+ raise PatchDriftError(
+ "Pocket language patch produced an unexpected result hash; the "
+ "vendored diff and its recorded hashes are out of sync"
+ )
+ target.write_bytes(patched.encode("utf-8"))
+ log.info("local-realtime: applied Pocket language patch to %s", target)
+ return "applied"
diff --git a/jarvis/realtime/local_server/pins/core-0.2.12.txt b/jarvis/realtime/local_server/pins/core-0.2.12.txt
index 643c151eeb..00ae4e842c 100644
--- a/jarvis/realtime/local_server/pins/core-0.2.12.txt
+++ b/jarvis/realtime/local_server/pins/core-0.2.12.txt
@@ -6,4 +6,5 @@ speech-to-speech==0.2.12
faster-qwen3-tts==0.3.2
nano_parakeet==0.2.1
qwen-tts==0.1.1
+pocket-tts==2.1.0
onnxruntime==1.28.0
diff --git a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx
index f0956b3bbc..93141eb73c 100644
--- a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx
@@ -998,6 +998,33 @@ describe("managed local realtime model setup", () => {
speaker: "Aiden",
current: true,
platform: "all",
+ runtime_ready: true,
+ frontier: true,
+ streaming: true,
+ source_url: "https://github.com/QwenLM/Qwen3-TTS",
+ release_date: "2026-01",
+ license: "Apache-2.0",
+ size_gb: 3.4,
+ },
+ {
+ id: "pocket-tts-de-24l",
+ label: "Pocket TTS 2.1 · German HQ",
+ backend: "pocket",
+ model: "kyutai/pocket-tts:german_24l",
+ languages: ["de"],
+ selectable: true,
+ recommended: false,
+ note: "current CPU-first streaming model",
+ speaker: "juergen",
+ current: false,
+ platform: "all",
+ runtime_ready: false,
+ frontier: true,
+ streaming: true,
+ source_url: "https://github.com/kyutai-labs/pocket-tts",
+ release_date: "2026-05",
+ license: "MIT",
+ size_gb: 1,
},
{
id: "chattts",
@@ -1012,6 +1039,26 @@ describe("managed local realtime model setup", () => {
current: false,
platform: "all",
},
+ {
+ id: "moss-tts-nano-100m",
+ label: "MOSS-TTS-Nano 100M",
+ backend: "moss",
+ model: "OpenMOSS-Team/MOSS-TTS-Nano-100M",
+ languages: ["de", "en", "es"],
+ selectable: false,
+ recommended: false,
+ note: "managed realtime adapter is not available yet",
+ speaker: "",
+ current: false,
+ platform: "all",
+ runtime_ready: false,
+ frontier: true,
+ streaming: true,
+ source_url: "https://huggingface.co/OpenMOSS-Team/MOSS-TTS-Nano-100M",
+ release_date: "2026-04",
+ license: "Apache-2.0",
+ size_gb: 0.6,
+ },
],
hearing: {
id: "parakeet-tdt",
@@ -1038,11 +1085,24 @@ describe("managed local realtime model setup", () => {
expect(screen.getByText("Speak")).toBeTruthy();
expect(screen.getByText("Parakeet TDT")).toBeTruthy();
expect(screen.getByText("Browse the full Ollama catalog")).toBeTruthy();
+ expect(screen.getByText("Browse open-source speech models")).toBeTruthy();
expect(screen.getByText("Advanced connection settings")).toBeTruthy();
const unavailable = screen.getByRole("option", {
name: /ChatTTS.*not voice-tested yet/,
}) as HTMLOptionElement;
expect(unavailable.disabled).toBe(true);
expect(calls.some((call) => call.url.endsWith("/model-catalog"))).toBe(true);
+
+ fireEvent.click(screen.getByText("Browse open-source speech models"));
+ const search = screen.getByRole("searchbox", {
+ name: "Search by model, backend, language, or license…",
+ });
+ fireEvent.change(search, { target: { value: "german" } });
+ expect(screen.getByText("Pocket TTS 2.1 · German HQ")).toBeTruthy();
+ expect(screen.queryByText("MOSS-TTS-Nano 100M")).toBeNull();
+
+ fireEvent.change(search, { target: { value: "moss" } });
+ expect(screen.getByText("MOSS-TTS-Nano 100M")).toBeTruthy();
+ expect(screen.getByText("Integration pending")).toBeTruthy();
});
});
diff --git a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx
index 43b5ef11fa..4725cd460a 100644
--- a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx
+++ b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx
@@ -1928,6 +1928,7 @@ function ManagedServerPanel({
const [catalog, setCatalog] = useState<ManagedModelCatalog | null>(null);
const [selectedBrain, setSelectedBrain] = useState("");
const [selectedVoice, setSelectedVoice] = useState("");
+ const [voiceQuery, setVoiceQuery] = useState("");
const [setupBusy, setSetupBusy] = useState(false);
const [setupNote, setSetupNote] = useState<string | null>(null);
const [libraryBusy, setLibraryBusy] = useState<string | null>(null);
@@ -2105,8 +2106,9 @@ function ManagedServerPanel({
const applySetup = async (
brainModel = selectedBrain,
downloadFirst = false,
+ voiceModel = selectedVoice,
) => {
- if (!brainModel || !selectedVoice) return;
+ if (!brainModel || !voiceModel) return;
setError(null);
setSetupNote(null);
setSetupBusy(true);
@@ -2117,7 +2119,7 @@ function ManagedServerPanel({
// then adopt — never adopt a model the server cannot serve yet.
await downloadBrain(brainModel);
}
- const result = await managedServerSetup(brainModel, selectedVoice);
+ const result = await managedServerSetup(brainModel, voiceModel);
const latency = result.smoke.first_audio_ms;
setSelectedBrain(brainModel);
setSetupNote(
@@ -2156,6 +2158,37 @@ function ManagedServerPanel({
await applySetup(model, !installedModel);
};
+ const applyVoiceChoice = async (choice: ManagedModelCatalog["models"][number]) => {
+ if (!choice.selectable || !selectedBrain) return;
+ setSelectedVoice(choice.id);
+ setError(null);
+ setSetupNote(null);
+ if (!installed) {
+ setSetupNote(t("apikeys_view.managed_catalog_selected"));
+ return;
+ }
+ if (choice.runtime_ready === false) {
+ setSetupBusy(true);
+ try {
+ // A runtime-compatible model whose optional package is absent uses the
+ // existing resumable managed installer. It stops the owned server,
+ // installs the pinned adapter dependency, applies compatibility
+ // patches, downloads this checkpoint, and only commits after smoke.
+ const first = await managedServerInstall(undefined, selectedBrain, choice.id);
+ setProgress(first);
+ if (!first.running && first.phase === "error" && first.error) {
+ setError(first.error);
+ }
+ } catch (err) {
+ setError(err instanceof Error ? err.message : String(err));
+ } finally {
+ setSetupBusy(false);
+ }
+ return;
+ }
+ await applySetup(selectedBrain, false, choice.id);
+ };
+
const stopServer = async () => {
setError(null);
setLifecycleBusy(true);
@@ -2182,6 +2215,21 @@ function ManagedServerPanel({
: { key: "apikeys_view.managed_server_stopped", tone: "muted" as const };
const failed = progress?.phase === "error";
+ const normalizedVoiceQuery = voiceQuery.trim().toLocaleLowerCase();
+ const voiceResults = (catalog?.models ?? []).filter((choice) => {
+ if (!normalizedVoiceQuery) return true;
+ return [
+ choice.label,
+ choice.backend,
+ choice.model,
+ choice.note,
+ choice.license ?? "",
+ ...(choice.languages ?? []),
+ ]
+ .join(" ")
+ .toLocaleLowerCase()
+ .includes(normalizedVoiceQuery);
+ });
return (
<div className="space-y-2 rounded-md border border-border/60 bg-muted/30 p-3">
<div className="flex items-start gap-2 text-xs">
@@ -2316,7 +2364,11 @@ function ManagedServerPanel({
>
{choice.label}
{choice.recommended ? ` · ${t("apikeys_view.managed_brain_recommended")}` : ""}
- {!choice.selectable ? ` · ${t("apikeys_view.managed_voice_unavailable")}` : ""}
+ {!choice.selectable
+ ? ` · ${t("apikeys_view.managed_voice_unavailable")}`
+ : choice.runtime_ready === false
+ ? ` · ${t("apikeys_view.managed_voice_install_required")}`
+ : ""}
</option>
))}
</select>
@@ -2353,6 +2405,131 @@ function ManagedServerPanel({
installedActionLabel={t("apikeys_view.managed_use_test")}
/>
</details>
+
+ <details
+ data-testid="managed-voice-catalog"
+ className="rounded-md border border-border/50 bg-background/30 p-2"
+ >
+ <summary className="cursor-pointer text-[11px] font-medium">
+ {t("apikeys_view.managed_voice_catalog_title")}
+ </summary>
+ <div className="mt-2 space-y-2">
+ <label className="relative block">
+ <Search
+ aria-hidden="true"
+ className="pointer-events-none absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"
+ />
+ <input
+ type="search"
+ value={voiceQuery}
+ onChange={(event) => setVoiceQuery(event.target.value)}
+ placeholder={t("apikeys_view.managed_voice_catalog_search")}
+ aria-label={t("apikeys_view.managed_voice_catalog_search")}
+ className="h-8 w-full rounded-md border border-border bg-background pl-8 pr-2 text-xs"
+ />
+ </label>
+
+ {voiceResults.length === 0 ? (
+ <p className="px-1 py-2 text-[11px] text-muted-foreground">
+ {t("apikeys_view.managed_voice_catalog_empty")}
+ </p>
+ ) : (
+ <div className="max-h-80 space-y-1.5 overflow-y-auto pr-1">
+ {voiceResults.map((choice) => (
+ <div
+ key={choice.id}
+ data-testid={`managed-voice-row-${choice.id}`}
+ className={cn(
+ "flex items-start justify-between gap-3 rounded-md border px-2.5 py-2",
+ choice.id === selectedVoice
+ ? "border-primary/45 bg-primary/[0.05]"
+ : "border-border/50 bg-background/50",
+ )}
+ >
+ <div className="min-w-0 space-y-1">
+ <div className="flex flex-wrap items-center gap-1.5">
+ <span className="text-xs font-medium">{choice.label}</span>
+ {choice.frontier && (
+ <span className="rounded-full bg-primary/15 px-1.5 py-px text-[9px] font-semibold uppercase tracking-wide text-primary">
+ {t("apikeys_view.managed_voice_frontier")}
+ </span>
+ )}
+ {choice.streaming && (
+ <span className="rounded-full border border-border px-1.5 py-px text-[9px] text-muted-foreground">
+ {t("apikeys_view.managed_voice_streaming")}
+ </span>
+ )}
+ <span
+ className={cn(
+ "rounded-full border px-1.5 py-px text-[9px]",
+ choice.selectable
+ ? "border-emerald-500/30 bg-emerald-500/10 text-emerald-500"
+ : "border-amber-500/30 bg-amber-500/10 text-amber-500",
+ )}
+ >
+ {t(
+ choice.selectable
+ ? "apikeys_view.managed_voice_compatible"
+ : "apikeys_view.managed_voice_integration_pending",
+ )}
+ </span>
+ </div>
+ <p className="break-all font-mono text-[10px] text-muted-foreground">
+ {choice.model}
+ </p>
+ <p className="text-[10px] leading-snug text-muted-foreground">
+ {choice.note}
+ </p>
+ <div className="flex flex-wrap items-center gap-1 text-[9px] text-muted-foreground">
+ {(choice.languages ?? []).slice(0, 12).map((language) => (
+ <span key={language} className="rounded bg-muted px-1 py-px uppercase">
+ {language}
+ </span>
+ ))}
+ {(choice.languages?.length ?? 0) > 12 && (
+ <span>+{(choice.languages?.length ?? 0) - 12}</span>
+ )}
+ {choice.release_date && <span>· {choice.release_date}</span>}
+ {choice.license && <span>· {choice.license}</span>}
+ {(choice.size_gb ?? 0) > 0 && <span>· ~{choice.size_gb} GB</span>}
+ {choice.source_url && (
+ <a
+ href={choice.source_url}
+ target="_blank"
+ rel="noreferrer"
+ className="font-medium text-primary hover:underline"
+ >
+ {t("apikeys_view.managed_voice_source")}
+ </a>
+ )}
+ </div>
+ </div>
+ {choice.selectable && (
+ <Button
+ size="sm"
+ variant={choice.id === selectedVoice ? "secondary" : "outline"}
+ disabled={setupBusy || !selectedBrain}
+ onClick={() => void applyVoiceChoice(choice)}
+ className="h-7 shrink-0 gap-1 px-2 text-[10px]"
+ >
+ {setupBusy && choice.id === selectedVoice ? (
+ <Loader2 className="h-3 w-3 animate-spin" />
+ ) : (
+ <Volume2 className="h-3 w-3" />
+ )}
+ {t(
+ choice.runtime_ready === false
+ ? "apikeys_view.managed_voice_install_test"
+ : "apikeys_view.managed_use_test",
+ )}
+ </Button>
+ )}
+ </div>
+ ))}
+ </div>
+ )}
+ </div>
+ </details>
</div>
)}
diff --git a/jarvis/ui/web/frontend/src/hooks/useProviders.ts b/jarvis/ui/web/frontend/src/hooks/useProviders.ts
index 1a15e44f1f..ec7e44c48d 100644
--- a/jarvis/ui/web/frontend/src/hooks/useProviders.ts
+++ b/jarvis/ui/web/frontend/src/hooks/useProviders.ts
@@ -954,6 +954,15 @@ export interface ManagedVoiceChoice {
speaker: string;
current: boolean;
platform: string;
+ /** The adapter + pinned dependency are present in the managed venv. */
+ runtime_ready?: boolean;
+ pocket_language?: string;
+ release_date?: string;
+ license?: string;
+ source_url?: string;
+ streaming?: boolean;
+ frontier?: boolean;
+ size_gb?: number;
}
export interface ManagedModelCatalog {
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 5b1427b782..04c9032d3d 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -1198,8 +1198,18 @@
"managed_thinking_title": "Denken",
"managed_speaking_title": "Sprechen",
"managed_voice_unavailable": "noch nicht sprachgetestet",
+ "managed_voice_install_required": "Laufzeit-Installation nötig",
"managed_apply_test": "Anwenden & Sprache testen",
"managed_full_catalog": "Vollständigen Ollama-Katalog durchsuchen",
+ "managed_voice_catalog_title": "Open-Source-Sprachmodelle durchsuchen",
+ "managed_voice_catalog_search": "Nach Modell, Backend, Sprache oder Lizenz suchen…",
+ "managed_voice_catalog_empty": "Kein passendes Sprachmodell gefunden.",
+ "managed_voice_frontier": "Frontier",
+ "managed_voice_streaming": "Streaming",
+ "managed_voice_compatible": "Realtime-kompatibel",
+ "managed_voice_integration_pending": "Integration ausstehend",
+ "managed_voice_install_test": "Installieren & testen",
+ "managed_voice_source": "Offizielle Quelle",
"managed_download_test": "Laden & testen",
"managed_use_test": "Verwenden & testen",
"managed_setup_complete": "Einrichtung abgeschlossen - der Sprachtest war erfolgreich.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index e4239c61cd..323f6b7306 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -1198,8 +1198,18 @@
"managed_thinking_title": "Think",
"managed_speaking_title": "Speak",
"managed_voice_unavailable": "not voice-tested yet",
+ "managed_voice_install_required": "runtime install required",
"managed_apply_test": "Apply & voice-test",
"managed_full_catalog": "Browse the full Ollama catalog",
+ "managed_voice_catalog_title": "Browse open-source speech models",
+ "managed_voice_catalog_search": "Search by model, backend, language, or license…",
+ "managed_voice_catalog_empty": "No matching speech model.",
+ "managed_voice_frontier": "Frontier",
+ "managed_voice_streaming": "Streaming",
+ "managed_voice_compatible": "Realtime compatible",
+ "managed_voice_integration_pending": "Integration pending",
+ "managed_voice_install_test": "Install & test",
+ "managed_voice_source": "Official source",
"managed_download_test": "Download & test",
"managed_use_test": "Use & test",
"managed_setup_complete": "Setup complete - the voice test passed.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index e23087e656..c55e6233b6 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -1198,8 +1198,18 @@
"managed_thinking_title": "Pensar",
"managed_speaking_title": "Hablar",
"managed_voice_unavailable": "aún sin prueba de voz",
+ "managed_voice_install_required": "requiere instalar el runtime",
"managed_apply_test": "Aplicar y probar la voz",
"managed_full_catalog": "Explorar todo el catálogo de Ollama",
+ "managed_voice_catalog_title": "Explorar modelos de voz de código abierto",
+ "managed_voice_catalog_search": "Buscar por modelo, backend, idioma o licencia…",
+ "managed_voice_catalog_empty": "No hay ningún modelo de voz coincidente.",
+ "managed_voice_frontier": "Frontier",
+ "managed_voice_streaming": "Streaming",
+ "managed_voice_compatible": "Compatible con Realtime",
+ "managed_voice_integration_pending": "Integración pendiente",
+ "managed_voice_install_test": "Instalar y probar",
+ "managed_voice_source": "Fuente oficial",
"managed_download_test": "Descargar y probar",
"managed_use_test": "Usar y probar",
"managed_setup_complete": "Configuración terminada: la prueba de voz fue correcta.",
diff --git a/tests/unit/realtime/local_server/test_model_catalog.py b/tests/unit/realtime/local_server/test_model_catalog.py
index 6beb042c55..9ec7bbc2fb 100644
--- a/tests/unit/realtime/local_server/test_model_catalog.py
+++ b/tests/unit/realtime/local_server/test_model_catalog.py
@@ -11,9 +11,13 @@ def test_catalog_separates_hearing_from_wake_word_and_speaking() -> None:
assert catalog["hearing"]["id"] == "parakeet-tdt"
assert "wake-word" in str(catalog["hearing"]["note"])
assert catalog["current"] == "qwen3-tts-1.7b"
- assert len(catalog["models"]) == 6
+ assert len(catalog["models"]) >= 12
selectable = [item["id"] for item in catalog["models"] if item["selectable"]]
- assert selectable == ["qwen3-tts-1.7b", "qwen3-tts-0.6b"]
+ assert selectable[:2] == ["qwen3-tts-1.7b", "qwen3-tts-0.6b"]
+ assert "pocket-tts-de-24l" in selectable
+ frontier = [item for item in catalog["models"] if item["frontier"]]
+ assert any(item["id"] == "moss-tts-nano-100m" for item in frontier)
+ assert all(item["source_url"].startswith("https://") for item in frontier)
def test_voice_profile_replaces_all_qwen_flags_without_duplicates() -> None:
@@ -27,6 +31,19 @@ def test_voice_profile_replaces_all_qwen_flags_without_duplicates() -> None:
assert "--qwen3_tts_speaker Aiden" in rewritten
+def test_pocket_german_profile_encodes_language_without_a_new_cli_enum() -> None:
+ command = "serve --tts qwen3 --pocket_tts_voice alba --pocket_tts_device cuda"
+
+ rewritten = model_catalog.apply_voice_profile(command, "pocket-tts-de-24l")
+
+ assert rewritten.count("--tts") == 1
+ assert "--tts pocket" in rewritten
+ assert rewritten.count("--pocket_tts_voice") == 1
+ assert "--pocket_tts_voice @german_24l:juergen" in rewritten
+ assert "--pocket_tts_device cpu" in rewritten
+ assert model_catalog.current_voice_profile(rewritten) == "pocket-tts-de-24l"
+
+
def test_unvalidated_upstream_voice_cannot_be_selected() -> None:
- with pytest.raises(ValueError, match="not yet validated"):
+ with pytest.raises(ValueError, match="has not passed the managed voice test"):
model_catalog.apply_voice_profile("serve", "chattts")
diff --git a/tests/unit/realtime/local_server/test_patching.py b/tests/unit/realtime/local_server/test_patching.py
index e00b7567aa..b9da3959b7 100644
--- a/tests/unit/realtime/local_server/test_patching.py
+++ b/tests/unit/realtime/local_server/test_patching.py
@@ -20,6 +20,13 @@ def _write_service(site: Path, data: bytes) -> Path:
return target
+def _write_pocket_handler(site: Path, data: bytes) -> Path:
+ target = site / patching.POCKET_HANDLER_RELPATH
+ target.parent.mkdir(parents=True, exist_ok=True)
+ target.write_bytes(data)
+ return target
+
+
class TestPatchState:
def test_missing_file_reports_missing(self, tmp_path: Path) -> None:
assert patching.patch_state(tmp_path) == "missing"
@@ -69,3 +76,30 @@ class TestVendoredArtifacts:
assert len(patching.PRISTINE_SHA256) == 64
assert len(patching.PATCHED_SHA256) == 64
assert patching.PRISTINE_SHA256 != patching.PATCHED_SHA256
+
+ def test_pocket_language_patch_ships_with_byte_exact_hashes(self) -> None:
+ raw = patching._POCKET_PATCH_FILE.read_bytes().decode("utf-8")
+ assert raw.startswith("--- a/speech_to_speech/TTS/pocket_tts_handler.py")
+ assert "TTSModel.load_model(language=language)" in raw
+ assert len(patching.POCKET_HANDLER_PRISTINE_SHA256) == 64
+ assert len(patching.POCKET_HANDLER_PATCHED_SHA256) == 64
+
+
+def test_pocket_patch_applies_to_the_pinned_wheel_handler(tmp_path: Path) -> None:
+ pristine = (
+ Path(__file__).parents[4]
+ / "data"
+ / "local_realtime"
+ / "venv"
+ / "Lib"
+ / "site-packages"
+ / patching.POCKET_HANDLER_RELPATH
+ )
+ if not pristine.is_file():
+ pytest.skip("the managed speech-to-speech wheel is not installed")
+ target = _write_pocket_handler(tmp_path, pristine.read_bytes())
+
+ assert patching.pocket_language_patch_state(tmp_path) == "pristine"
+ assert patching.apply_pocket_language_patch(tmp_path) == "applied"
+ assert patching.pocket_language_patch_state(tmp_path) == "patched"
+ assert b"TTSModel.load_model(language=language)" in target.read_bytes()