Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: list every Transcribe ASR model in Voice settings (#12898)
Etherle7cc9d5e4317
diff --git a/studio/backend/core/inference/audio_cpp_models.py b/studio/backend/core/inference/audio_cpp_models.pyindex 020cfbfee8b..7aff439edb7 100644--- a/studio/backend/core/inference/audio_cpp_models.py+++ b/studio/backend/core/inference/audio_cpp_models.py@@ -1089,13 +1089,12 @@ def family_policy(if family == "fireredtts3" and re.search(r"(^|[-_ /])base([-_ ./]|$)", " ".join(names).lower()):return replace(policy, server_task = "clon")if family == "dots_tts" and re.search(r"(^|[-_ /])edit([-_ ./]|$)", " ".join(names).lower()):- # DotTTS-MF and SOAR only speak.+ # DotTTS-MF and SOAR support speech only.return replace(policy, edit = _DOTS_EDIT)return policy-# Legacy dictation keys and the sub-folder ids of earlier builds, mapped to the folder row and-# the variant they named. Saved settings keep working through these.+# maps saved Settings keys and earlier subfolder ids to current rows and variants for compatibility._LEGACY_KEYS: dict[str, tuple[str, Optional[str]]] = {"audiocpp-kokoro-82m": ("Kokoro-82M-GGUF", None),"audiocpp-kitten-tts-mini": ("KittenTTS-GGUF", None),@@ -1117,6 +1116,7 @@ _LEGACY_KEYS: dict[str, tuple[str, Optional[str]]] = {"audiocpp-canary-180m-flash": ("Canary-180M-Flash-GGUF", None),"audiocpp-moonshine-tiny": ("Moonshine-Streaming-GGUF", "tiny/Q8_0"),"audiocpp-moonshine-small": ("Moonshine-Streaming-GGUF", "small/Q8_0"),+ "audiocpp-moonshine-medium": ("Moonshine-Streaming-GGUF", "medium/Q8_0"),"audiocpp-nemotron-3.5-asr-0.6b": ("Nemotron-3.5-ASR-Streaming-0.6B-GGUF", None),}_LEGACY_SUBFOLDER_VARIANTS = {@@ -1127,8 +1127,6 @@ _LEGACY_SUBFOLDER_VARIANTS = {@dataclass(frozen = True)class AudioCppRef:- """Where a Studio id points: a repo, a folder in it (umbrella rows), or a local GGUF."""-id: strrepo_id: Optional[str]folder: str = ""diff --git a/studio/backend/tests/test_audio_cpp_umbrella_catalog.py b/studio/backend/tests/test_audio_cpp_umbrella_catalog.pyindex bc596d3f53f..dd5ab2ef6bb 100644--- a/studio/backend/tests/test_audio_cpp_umbrella_catalog.py+++ b/studio/backend/tests/test_audio_cpp_umbrella_catalog.py@@ -159,3 +159,29 @@ def test_the_pickers_offer_every_runnable_folder_on_its_pages():seeded, unoffered = _catalog()assert seeded == {folder: pages for folder, (_, pages) in UMBRELLA.items() if pages}assert unoffered == {folder for folder, (_, pages) in UMBRELLA.items() if not pages}+++ "folder", sorted(f for f, (_, pages) in UMBRELLA.items() if "transcribe" in pages)+)+def test_dictation_routes_every_transcribe_folder_to_audiocpp(folder):+ """every Transcribe folder in Settings > Voice must route dictation to the audio runtime."""+ from core.inference.stt_audiocpp_sidecar import resolve_audio_cpp_stt_model_id+ from routes.inference import _stt_engine_for_model++ row = f"{acm.AUDIO_CPP_REPO}/{folder}"+ assert _stt_engine_for_model(row) == "audiocpp"+ assert resolve_audio_cpp_stt_model_id(row) == row+++def test_the_settings_dictation_keys_are_the_backend_asr_keys():+ keys = dict(+ re.findall(r'dictation\(\s*"([^"]+)",\s*"([^"]+)"', CATALOG.read_text(encoding = "utf-8"))+ )+ asr = {+ key: folder+ for key, (folder, _) in acm._LEGACY_KEYS.items()+ if "transcribe" in UMBRELLA[folder][1]+ }+ assert keys == asr+ assert acm.parse_identifier("audiocpp-moonshine-medium").variant_hint == "medium/Q8_0"diff --git a/studio/frontend/src/features/audio/audio-cpp-catalog.ts b/studio/frontend/src/features/audio/audio-cpp-catalog.tsindex 833c3a65e90..fb028f789d9 100644--- a/studio/frontend/src/features/audio/audio-cpp-catalog.ts+++ b/studio/frontend/src/features/audio/audio-cpp-catalog.ts@@ -56,6 +56,39 @@ const MB = 1024 * 1024;const folder = (name: string) => `${AUDIO_CPP_REPO}/${name}`;const ENGLISH = ["en"] as const;+const COHERE_TRANSCRIBE_LANGUAGES = [+ "en",+ "fr",+ "de",+ "es",+ "it",+ "pt",+ "nl",+ "pl",+ "el",+ "ar",+ "ja",+ "zh",+ "vi",+ "ko",+] as const;+const FUN_ASR_LANGUAGES = ["zh", "en", "ja"] as const;+const GIGAAM_LANGUAGES = ["ru", "en", "kk", "ky", "uz"] as const;+const VOXTRAL_LANGUAGES = [+ "en",+ "fr",+ "es",+ "de",+ "ru",+ "zh",+ "ja",+ "it",+ "pt",+ "nl",+ "ar",+ "hi",+ "ko",+] as const;export const AUDIO_CPP_MODELS: readonly AudioCppModel[] = [{ id: folder("Kokoro-82M-GGUF"), task: "tts", needsEspeak: true },@@ -145,17 +178,29 @@ export const AUDIO_CPP_MODELS: readonly AudioCppModel[] = [{ id: folder("Nemotron-3.5-ASR-Streaming-0.6B-GGUF"), task: "asr", languages: ENGLISH },// Diarizes; Transcribe offers it for the Speakers switch.{ id: folder("MOSS-Transcribe-Diarize-GGUF"), task: "asr" },- { id: folder("Citrinet-ASR-GGUF"), task: "asr" },- { id: folder("Cohere-Transcribe-GGUF"), task: "asr" },- { id: folder("Fun-ASR-Nano-2512-GGUF"), task: "asr" },- { id: folder("GigaAM-ASR-GGUF"), task: "asr" },+ { id: folder("Citrinet-ASR-GGUF"), task: "asr", languages: ENGLISH },+ {+ id: folder("Cohere-Transcribe-GGUF"),+ task: "asr",+ languages: COHERE_TRANSCRIBE_LANGUAGES,+ },+ {+ id: folder("Fun-ASR-Nano-2512-GGUF"),+ task: "asr",+ languages: FUN_ASR_LANGUAGES,+ },+ { id: folder("GigaAM-ASR-GGUF"), task: "asr", languages: GIGAAM_LANGUAGES },{ id: folder("Granite-Speech-5.0-470M-TurboCTC-GGUF"), task: "asr", languages: ENGLISH },- { id: folder("Higgs-Audio-v3-STT-GGUF"), task: "asr" },+ { id: folder("Higgs-Audio-v3-STT-GGUF"), task: "asr", languages: ENGLISH },{ id: folder("Hviske-v5.3-GGUF"), task: "asr", languages: ["da"] },{ id: folder("Kroko-ASR-GGUF"), task: "asr", languages: ENGLISH },{ id: folder("Niagara-ASR-GGUF"), task: "asr", languages: ENGLISH },{ id: folder("VibeVoice-ASR-GGUF"), task: "asr" },- { id: folder("Voxtral-Mini-4B-Realtime-2602-GGUF"), task: "asr" },+ {+ id: folder("Voxtral-Mini-4B-Realtime-2602-GGUF"),+ task: "asr",+ languages: VOXTRAL_LANGUAGES,+ },];/** Shared-repo folders the pickers leave out, and why; the nightly catalog check fails on an unclassified folder. */@@ -209,7 +254,7 @@ export function isConvertOnlyFamilyId(id: string | null | undefined): boolean {return CONVERT_ONLY_FAMILY_HINT.test(id ?? "");}-/** Legacy Settings > Voice keys; the backend still maps each to its folder id (and variant). */+/** Settings > Voice keys; the backend maps each to its folder id (and variant). */export interface AudioCppDictationModel {key: string;id: string;@@ -237,6 +282,7 @@ export const AUDIO_CPP_DICTATION_MODELS = [dictation("audiocpp-canary-180m-flash", "Canary-180M-Flash-GGUF", 237.9),dictation("audiocpp-moonshine-tiny", "Moonshine-Streaming-GGUF", 57.6, "tiny"),dictation("audiocpp-moonshine-small", "Moonshine-Streaming-GGUF", 286.7, "small"),+ dictation("audiocpp-moonshine-medium", "Moonshine-Streaming-GGUF", 301.0, "medium"),dictation("audiocpp-nemotron-3.5-asr-0.6b","Nemotron-3.5-ASR-Streaming-0.6B-GGUF",diff --git a/studio/frontend/src/features/settings/stores/stt-model-catalog.ts b/studio/frontend/src/features/settings/stores/stt-model-catalog.tsindex 2c21f3c7d2e..4c2061aa6f6 100644--- a/studio/frontend/src/features/settings/stores/stt-model-catalog.ts+++ b/studio/frontend/src/features/settings/stores/stt-model-catalog.ts@@ -7,11 +7,14 @@import {AUDIO_CPP_DICTATION_MODELS,+ AUDIO_CPP_MODELS,AUDIO_CPP_STT_KEYS,type AudioCppSttKey,audioCppDisplayName,audioCppModelFor,audioCppSizeLabel,+ audioCppWorkflowsFor,+ isAudioCppFolderId,} from "../../audio/audio-cpp-catalog.ts";/** Curated dictation models, mirrored by the backend sidecars. Listed in the@@ -45,17 +48,37 @@ export const MTMD_STT_MODELS: ReadonlySet<SttModel> = new Set([export const AUDIO_CPP_STT_MODELS: ReadonlySet<SttModel> = new Set(AUDIO_CPP_STT_KEYS,);-/** Curated models that transcribe only these primary languages; every other- * curated model is multilingual. Moonshine and Nemotron are English-only, and- * Canary covers en/de/es/fr. */+const KEYED_FOLDERS = new Set(+ AUDIO_CPP_DICTATION_MODELS.map((model) => model.id.toLowerCase()),+);+/** The Transcribe page's audio.cpp ASR folders no key above names; dictation+ * lists them by folder id, in catalog order (the largest come last). */+export const AUDIO_CPP_STT_FOLDER_IDS: readonly string[] =+ AUDIO_CPP_MODELS.filter(+ (model) =>+ audioCppWorkflowsFor(model).includes("transcribe") &&+ !KEYED_FOLDERS.has(model.id.toLowerCase()),+ ).map((model) => model.id);+/** What the Voice picker lists: the curated models, then every other ASR model+ * Transcribe offers. */+export const STT_PICKER_MODELS: readonly SttModel[] = [+ ...STT_MODELS,+ ...AUDIO_CPP_STT_FOLDER_IDS,+];+/** Models that transcribe only these primary languages; every other model is+ * multilingual. Moonshine and Nemotron are English-only, Canary covers+ * en/de/es/fr, and Hviske is Danish. */export const STT_MODEL_LANGUAGES: ReadonlyMap<SttModel, readonly string[]> =new Map(- AUDIO_CPP_DICTATION_MODELS.flatMap((model) => {- const languages = audioCppModelFor(model.id)?.languages;- return languages ? [[model.key, languages] as const] : [];+ [+ ...AUDIO_CPP_DICTATION_MODELS.map((model) => [model.key, model.id]),+ ...AUDIO_CPP_STT_FOLDER_IDS.map((id) => [id, id]),+ ].flatMap(([model, id]) => {+ const languages = audioCppModelFor(id)?.languages;+ return languages ? [[model, languages] as const] : [];}),);-/** Curated models that only transcribe English. */+/** Models that only transcribe English. */export const ENGLISH_ONLY_STT_MODELS: ReadonlySet<SttModel> = new Set([...STT_MODEL_LANGUAGES].filter(([, languages]) => languages.length === 1 && languages[0] === "en")@@ -137,7 +160,10 @@ export const STT_MODEL_SIZES: Record<DefaultSttModel, string> = {};export function sttModelName(model: SttModel): string {- return STT_MODEL_NAMES[model as DefaultSttModel] ?? model;+ return (+ STT_MODEL_NAMES[model as DefaultSttModel] ??+ (isAudioCppFolderId(model) ? audioCppDisplayName(model) : model)+ );}export function sttModelSize(model: SttModel): string {diff --git a/studio/frontend/src/features/settings/stores/voice-settings-store.ts b/studio/frontend/src/features/settings/stores/voice-settings-store.tsindex a376b244eae..4a3921ce499 100644--- a/studio/frontend/src/features/settings/stores/voice-settings-store.ts+++ b/studio/frontend/src/features/settings/stores/voice-settings-store.ts@@ -2,6 +2,7 @@// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0import { isTauri } from "@/lib/api-base";+import { isAudioCppFolderId } from "../../audio/audio-cpp-catalog";import { create } from "zustand";import { createJSONStorage, persist } from "zustand/middleware";import {@@ -27,11 +28,9 @@ export interface RecentDictation {chatId?: string;}-// Dictation history is kept in full; the list view paginates. QUOTA_TRIM_KEEP is-// the emergency floor if localStorage runs out of room (see persist wrapper).+// pagination keeps full history; quota failures trim it to QUOTA_TRIM_KEEP.const QUOTA_TRIM_KEEP = 200;-// Cap stored transcript length so a few long dictations cannot bloat the-// persisted blob and trip a synchronous localStorage quota error on save.+// transcript caps prevent synchronous localStorage quota failures.const MAX_RECENT_DICTATION_LENGTH = 2000;const MAX_DICTIONARY_ENTRIES = 100;const MAX_DICTIONARY_ENTRY_LENGTH = 120;@@ -43,7 +42,8 @@ export function isSttModelId(value: string): boolean {const normalized = value.trim();return ((STT_MODELS as readonly string[]).includes(normalized) ||- HF_REPO_ID.test(normalized)+ HF_REPO_ID.test(normalized) ||+ isAudioCppFolderId(normalized));}diff --git a/studio/frontend/src/features/settings/tabs/voice-tab.tsx b/studio/frontend/src/features/settings/tabs/voice-tab.tsxindex acc2354672e..0a1a617baa7 100644--- a/studio/frontend/src/features/settings/tabs/voice-tab.tsx+++ b/studio/frontend/src/features/settings/tabs/voice-tab.tsx@@ -19,6 +19,10 @@ import {import { Slider } from "@/components/ui/slider";import { Spinner } from "@/components/ui/spinner";import { Switch } from "@/components/ui/switch";+import {+ audioCppSizeLabel,+ isAudioCppFolderId,+} from "@/features/audio/audio-cpp-catalog";import { useAudioVoicesStore } from "@/features/audio/stores/audio-voices-store";import {type SttDownloadStatus,@@ -41,6 +45,7 @@ import {} from "@/features/chat";import {hfApiToken,+ listGgufVariants,useHfTokenStore,useHubModelSearch,} from "@/features/hub";@@ -70,10 +75,11 @@ import {} from "../lib/stt-download-mirror";import { useSettingsDialogStore } from "../stores/settings-dialog-store";import {+ AUDIO_CPP_STT_FOLDER_IDS,AUDIO_CPP_STT_MODELS,MTMD_STT_MODELS,RECOMMENDED_STT_MODELS,- STT_MODELS,+ STT_PICKER_MODELS,type SttModel,getSttModelRepo,isCuratedSttModel,@@ -103,6 +109,7 @@ const DICTATION_LANGUAGES: { value: string; label: string }[] = [{ value: "pt-BR", label: "Português (Brasil)" },{ value: "ru-RU", label: "Русский" },{ value: "sv-SE", label: "Svenska" },+ { value: "da-DK", label: "Dansk" },{ value: "hi-IN", label: "हिन्दी" },{ value: "ar-SA", label: "العربية" },{ value: "he-IL", label: "עברית" },@@ -118,30 +125,64 @@ const TTS_PREVIEW_TEXT =* A package of the shared GGUF repo is already named after its folder, so its* row shows the name alone. */function sttModelSource(model: SttModel): string {- if (AUDIO_CPP_STT_MODELS.has(model)) return sttModelName(model);+ if (AUDIO_CPP_STT_MODELS.has(model) || isAudioCppFolderId(model)) {+ return sttModelName(model);+ }return isCuratedSttModel(model) && !MTMD_STT_MODELS.has(model)? `unslothai/whisper-${model}-GGUF`: getSttModelRepo(model);}/**- * Model picker for local transcription. Lists the curated whisper.cpp- * checkpoints and searches Hugging Face for other Whisper repos (safetensors via- * Transformers). The trigger is a plain button so the selection never renders- * inside a text input.+ * Model picker for local transcription. Lists the curated models and every+ * other ASR model the Transcribe page offers, and searches Hugging Face for+ * other Whisper repos (safetensors via Transformers). The trigger is a plain+ * button so the selection never renders inside a text input.*/function SttModelPicker({value,language,+ downloadedModels,onChange,}: {value: SttModel;language: string;+ downloadedModels: ReadonlySet<string>;onChange: (model: SttModel) => void;}) {const t = useT();const hfToken = useHfTokenStore((state) => state.token);const [open, setOpen] = useState(false);+ // Folder rows have no curated size: read the default quant's from the same+ // cached listing the Transcribe picker uses. A row stays blank until it lands.+ const [folderSizes, setFolderSizes] = useState<ReadonlyMap<string, string>>(+ () => new Map(),+ );+ useEffect(() => {+ if (!open) return;+ let cancelled = false;+ for (const id of AUDIO_CPP_STT_FOLDER_IDS) {+ if (!isSttModelLanguageCompatible(id, language)) continue;+ listGgufVariants(id, hfApiToken(hfToken))+ .then((listing) => {+ const variant =+ listing.variants.find(+ (row) => row.quant === listing.default_variant,+ ) ?? listing.variants[0];+ if (cancelled || !variant) return;+ const size = audioCppSizeLabel(+ variant.download_size_bytes ?? variant.size_bytes,+ );+ setFolderSizes((sizes) =>+ sizes.get(id) === size ? sizes : new Map(sizes).set(id, size),+ );+ })+ .catch(() => {});+ }+ return () => {+ cancelled = true;+ };+ }, [open, language, hfToken]);const [query, setQuery] = useState("");const [validating, setValidating] = useState(false);const resultsRef = useWheelScrollRef<HTMLDivElement>();@@ -158,7 +199,7 @@ function SttModelPicker({const items = useMemo(() => {if (!debouncedQuery) {- const defaults: string[] = STT_MODELS.filter((model) =>+ const defaults: string[] = STT_PICKER_MODELS.filter((model) =>isSttModelLanguageCompatible(model, language),);if (!defaults.includes(value)) {@@ -166,7 +207,14 @@ function SttModelPicker({}return defaults;}- const ids: string[] = [];+ // Listed models match by name; the Hub search below only finds Whisper repos.+ const needle = debouncedQuery.toLowerCase();+ const ids: string[] = STT_PICKER_MODELS.filter(+ (model) =>+ (sttModelName(model).toLowerCase().includes(needle) ||+ model.toLowerCase().includes(needle)) &&+ isSttModelLanguageCompatible(model, language),+ );for (const result of results) {const tags = result.tags?.map((tag) => tag.toLowerCase()) ?? [];const isWhisper =@@ -261,7 +309,8 @@ function SttModelPicker({data-testid="stt-model-results"className="max-h-64 overflow-y-auto p-1">- {(isLoading && debouncedQuery) || validating ? (+ {(isLoading && debouncedQuery && items.length === 0) ||+ validating ? (<div className="flex items-center gap-2 px-3 py-3 text-xs text-muted-foreground"><Spinner className="size-3.5" />{validating@@ -278,6 +327,7 @@ function SttModelPicker({// shape, two-line rows use a squarer radius. Not rounded-sm: the// theme's --radius makes that 13.6px, too round at this height.const twoLines = sttModelSource(model) !== sttModelName(model);+ const size = sttModelSize(model) || folderSizes.get(model);return (<buttonkey={model}@@ -290,7 +340,17 @@ function SttModelPicker({><span className="min-w-0 flex-1 truncate"><span className="flex items-center gap-1.5 truncate text-xs">- <span className="truncate">{sttModelName(model)}</span>+ {/* Same green dot the Hub marks an on-device row with. */}+ {downloadedModels.has(model) ? (+ <span+ role="img"+ aria-label={t("picker.onDevice")}+ className="size-[calc(5px*var(--ui-space-scale,1))] shrink-0 rounded-full bg-status-success"+ />+ ) : null}+ <span className="truncate" title={sttModelName(model)}>+ {sttModelName(model)}+ </span>{RECOMMENDED_STT_MODELS.has(model) ? (<span className="shrink-0 rounded-full bg-emerald-500/12 px-1.5 py-px text-ui-9 font-medium text-emerald-600 dark:bg-emerald-400/15 dark:text-emerald-400">{t("settings.voice.dictation.sttRecommended")}@@ -303,9 +363,9 @@ function SttModelPicker({</span>) : null}</span>- {sttModelSize(model) ? (+ {size ? (<span className="shrink-0 text-ui-10 tabular-nums text-muted-foreground">- {sttModelSize(model)}+ {size}</span>) : null}</button>@@ -561,6 +621,10 @@ export function VoiceTab() {const [sttDownload, setSttDownload] = useState<SttDownloadStatus | null>(null,);+ // Every engine's downloaded models, for the picker's on-device dots.+ const [downloadedSttModels, setDownloadedSttModels] = useState<+ ReadonlySet<string>+ >(() => new Set());// Was a bare two-sample delta over ~800ms with no window or stability gate,// so one throttled timer or bursty poll set the displayed speed outright.// Model whose download this tab watched; completion auto-loads it.@@ -602,6 +666,16 @@ export function VoiceTab() {try {const status = await fetchSttStatus(statusNonce, sttModel);if (cancelled) return;+ setDownloadedSttModels(+ new Set(+ [+ status.transformers,+ status.gguf,+ status.mtmd,+ status.audiocpp,+ ].flatMap((engine) => engine?.downloaded_models ?? []),+ ),+ );// A curated model prefers the GGUF (whisper.cpp) engine, but without whisper-server the// backend serves it through Transformers instead of failing. Fall back to the Transformers// status here too, or the model shows as unavailable and download is blocked even though it@@ -1154,6 +1228,7 @@ export function VoiceTab() {<SttModelPickervalue={sttModel}language={dictationLanguage}+ downloadedModels={downloadedSttModels}onChange={(next) => {if (next !== sttModel) {void unloadSttModel().catch(() => {});diff --git a/studio/frontend/tests/audio-cpp-catalog.test.ts b/studio/frontend/tests/audio-cpp-catalog.test.tsindex ac552ef858d..525eb4f3407 100644--- a/studio/frontend/tests/audio-cpp-catalog.test.ts+++ b/studio/frontend/tests/audio-cpp-catalog.test.ts@@ -62,12 +62,15 @@ import {import { hasGgufRepoSuffix } from "../src/features/hub/lib/model-identifiers.ts";import { shortModelLabel } from "../src/features/loaded-models/loaded-models-sources.ts";import {+ AUDIO_CPP_STT_FOLDER_IDS,AUDIO_CPP_STT_MODELS,DEFAULT_STT_MODEL,MTMD_STT_MODELS,+ RECOMMENDED_STT_MODELS,STT_MODEL_LANGUAGES,STT_MODEL_REPOS,STT_MODELS,+ STT_PICKER_MODELS,sttModelName,sttModelSize,} from "../src/features/settings/stores/stt-model-catalog.ts";@@ -82,9 +85,12 @@ import { readAudioWorkspaceSource } from "./helpers/audio-workspace.ts";registerBundlerResolver();installLocalStorageFake();-const { ENGLISH_ONLY_STT_MODELS, isSttModelLanguageCompatible } = await import(- "../src/features/settings/stores/voice-settings-store.ts"-);+const {+ ENGLISH_ONLY_STT_MODELS,+ isSttModelId,+ isSttModelLanguageCompatible,+ normalizeSttModel,+} = await import("../src/features/settings/stores/voice-settings-store.ts");const {audioCapabilityLine,audioModelRequiresRemoteCode,@@ -141,13 +147,24 @@ test("folders of the shared repo the pickers leave out are never seeded and sayassert.match(folder, /-GGUF$/);assert.ok(reason.trim(), folder);}- // Single-language transcription models say so; the rest are multilingual.+ // Transcription models with limited language coverage declare it.for (const [folder, languages] of [+ ["Citrinet-ASR-GGUF", ["en"]],+ [+ "Cohere-Transcribe-GGUF",+ ["en", "fr", "de", "es", "it", "pt", "nl", "pl", "el", "ar", "ja", "zh", "vi", "ko"],+ ],+ ["Fun-ASR-Nano-2512-GGUF", ["zh", "en", "ja"]],["Granite-Speech-5.0-470M-TurboCTC-GGUF", ["en"]],+ ["Higgs-Audio-v3-STT-GGUF", ["en"]],["Kroko-ASR-GGUF", ["en"]],["Niagara-ASR-GGUF", ["en"]],["Hviske-v5.3-GGUF", ["da"]],- ["GigaAM-ASR-GGUF", undefined],+ ["GigaAM-ASR-GGUF", ["ru", "en", "kk", "ky", "uz"]],+ [+ "Voxtral-Mini-4B-Realtime-2602-GGUF",+ ["en", "fr", "es", "de", "ru", "zh", "ja", "it", "pt", "nl", "ar", "hi", "ko"],+ ],] as const) {assert.deepEqual(audioCppModelFor(`${AUDIO_CPP_REPO}/${folder}`)?.languages, languages, folder);}@@ -401,7 +418,92 @@ test("dictation settings list the saved keys by their Hub name", () => {assert.equal(sttModelName("audiocpp-qwen3-asr-0.6b"), "Qwen3-ASR-0.6B-GGUF");assert.equal(sttModelName("audiocpp-moonshine-tiny"), "Moonshine-Streaming-GGUF (tiny)");const voiceTab = readSrc("features/settings/tabs/voice-tab.tsx");- assert.match(voiceTab, /if \(AUDIO_CPP_STT_MODELS\.has\(model\)\) return sttModelName\(model\);/);+ assert.match(+ voiceTab,+ /if \(AUDIO_CPP_STT_MODELS\.has\(model\) \|\| isAudioCppFolderId\(model\)\) \{\s*return sttModelName\(model\);/,+ );+});++// Transcribe models Settings > Voice may leave out, each with the reason it cannot dictate.+const STT_PICKER_EXCLUDED: Readonly<Record<string, string>> = {};++test("Settings > Voice lists every ASR model the Transcribe page offers", () => {+ const transcribe = new Set(+ AUDIO_CATALOG.filter((group) => group.task === "stt").map((group) =>+ group.canonicalId.toLowerCase(),+ ),+ );+ const settings = new Set(+ STT_PICKER_MODELS.map((model) => {+ const keyed = audioCppDictationModelFor(model);+ if (keyed) return keyed.id.toLowerCase();+ if (isAudioCppFolderId(model)) return model.toLowerCase();+ const engine = MTMD_STT_MODELS.has(model) ? "mtmd" : "transformers";+ return sttRepoIdForSidecarKey(model, engine).toLowerCase();+ }),+ );+ for (const [id, reason] of Object.entries(STT_PICKER_EXCLUDED)) {+ assert.ok(reason.trim(), id);+ assert.ok(+ transcribe.delete(id.toLowerCase()),+ `${id} is not on Transcribe`,+ );+ }+ assert.deepEqual([...settings].sort(), [...transcribe].sort());+ // Every Moonshine size Transcribe offers has its own key.+ assert.deepEqual(+ AUDIO_CPP_DICTATION_MODELS.filter((model) =>+ model.id.endsWith("/Moonshine-Streaming-GGUF"),+ ).map((model) => model.variant),+ ["tiny", "small", "medium"],+ );+});++test("Transcribe's other ASR folders are listed by id, after the keyed models", () => {+ assert.equal(AUDIO_CPP_STT_FOLDER_IDS.length, 12);+ const keyedFolders = new Set(+ AUDIO_CPP_DICTATION_MODELS.map((model) => model.id),+ );+ for (const id of AUDIO_CPP_STT_FOLDER_IDS) {+ assert.ok(isAudioCppFolderId(id), id);+ assert.equal(audioCppModelFor(id)?.task, "asr", id);+ assert.ok(!keyedFolders.has(id), `${id} is listed twice`);+ assert.equal(sttEngineForRepoId(id), "audiocpp", id);+ // A saved folder id survives the store's id gate and a reload.+ assert.ok(isSttModelId(id), id);+ assert.equal(normalizeSttModel(id), id);+ assert.equal(sttModelName(id), audioCppDisplayName(id));+ assert.doesNotMatch(sttModelName(id), BRAND);+ // Their size comes from the variant listing, not a hand-kept table.+ assert.equal(sttModelSize(id), "");+ }+ assert.deepEqual(STT_PICKER_MODELS, [+ ...STT_MODELS,+ ...AUDIO_CPP_STT_FOLDER_IDS,+ ]);+ assert.ok(+ [...RECOMMENDED_STT_MODELS].every(+ (model, index) => STT_PICKER_MODELS[index] === model,+ ),+ );+ // The two largest sort last.+ assert.deepEqual(AUDIO_CPP_STT_FOLDER_IDS.slice(-2), [+ `${AUDIO_CPP_REPO}/VibeVoice-ASR-GGUF`,+ `${AUDIO_CPP_REPO}/Voxtral-Mini-4B-Realtime-2602-GGUF`,+ ]);+ const voiceTab = readSrc("features/settings/tabs/voice-tab.tsx");+ assert.match(+ voiceTab,+ /STT_PICKER_MODELS\.filter\(\(model\) =>\s*isSttModelLanguageCompatible\(model, language\)/,+ );+ // Searching finds them by name too, not only Hub Whisper repos.+ assert.match(+ voiceTab,+ /STT_PICKER_MODELS\.filter\(\s*\(model\) =>\s*\(sttModelName\(model\)\.toLowerCase\(\)\.includes\(needle\)/,+ );+ assert.match(voiceTab, /listGgufVariants\(id, hfApiToken\(hfToken\)\)/);+ assert.match(voiceTab, /downloadedModels\.has\(model\)/);+ assert.match(voiceTab, /\{ value: "da-DK", label: "Dansk" \}/);});test("an Audio-page ASR pick sends its quant; other engines and saved keys send none", () => {@@ -436,7 +538,13 @@ test("English-only and partial-language ASR models are gated by language", () =>for (const key of ["audiocpp-moonshine-tiny","audiocpp-moonshine-small",+ "audiocpp-moonshine-medium","audiocpp-nemotron-3.5-asr-0.6b",+ `${AUDIO_CPP_REPO}/Citrinet-ASR-GGUF`,+ `${AUDIO_CPP_REPO}/Granite-Speech-5.0-470M-TurboCTC-GGUF`,+ `${AUDIO_CPP_REPO}/Higgs-Audio-v3-STT-GGUF`,+ `${AUDIO_CPP_REPO}/Kroko-ASR-GGUF`,+ `${AUDIO_CPP_REPO}/Niagara-ASR-GGUF`,]) {assert.ok(ENGLISH_ONLY_STT_MODELS.has(key), key);assert.equal(isSttModelLanguageCompatible(key, "en-US"), true);@@ -450,11 +558,30 @@ test("English-only and partial-language ASR models are gated by language", () =>assert.equal(isSttModelLanguageCompatible(canary, language), true, language);}assert.equal(isSttModelLanguageCompatible(canary, "ja-JP"), false);+ const hviske = `${AUDIO_CPP_REPO}/Hviske-v5.3-GGUF`;+ assert.equal(isSttModelLanguageCompatible(hviske, "da-DK"), true);+ assert.equal(isSttModelLanguageCompatible(hviske, "auto"), true);+ assert.equal(isSttModelLanguageCompatible(hviske, "en-US"), false);+ for (const [folder, languages, unsupported] of [+ ["Cohere-Transcribe-GGUF", ["ko-KR", "ar-SA", "pt-BR"], "ru-RU"],+ ["Fun-ASR-Nano-2512-GGUF", ["en-US", "zh-CN", "ja-JP"], "ko-KR"],+ ["GigaAM-ASR-GGUF", ["en-US", "ru-RU"], "ja-JP"],+ ["Voxtral-Mini-4B-Realtime-2602-GGUF", ["ko-KR", "hi-IN", "ru-RU"], "sv-SE"],+ ] as const) {+ const id = `${AUDIO_CPP_REPO}/${folder}`;+ for (const language of languages) {+ assert.equal(isSttModelLanguageCompatible(id, language), true, `${folder}: ${language}`);+ }+ assert.equal(isSttModelLanguageCompatible(id, unsupported), false, folder);+ assert.equal(isSttModelLanguageCompatible(id, "auto"), true, folder);+ }for (const key of ["audiocpp-parakeet-tdt-0.6b-v3","audiocpp-qwen3-asr-0.6b","qwen3-asr-0.6b","small",+ `${AUDIO_CPP_REPO}/MOSS-Transcribe-Diarize-GGUF`,+ `${AUDIO_CPP_REPO}/VibeVoice-ASR-GGUF`,]) {assert.equal(STT_MODEL_LANGUAGES.has(key), false, key);assert.equal(isSttModelLanguageCompatible(key, "ja-JP"), true, key);diff --git a/studio/frontend/tests/voice-settings-stt-migration.test.ts b/studio/frontend/tests/voice-settings-stt-migration.test.tsindex 8c53db07e17..e965bcab9b6 100644--- a/studio/frontend/tests/voice-settings-stt-migration.test.ts+++ b/studio/frontend/tests/voice-settings-stt-migration.test.ts@@ -7,7 +7,7 @@ import test from "node:test";import {DEFAULT_STT_MODEL,RECOMMENDED_STT_MODELS,- STT_MODELS,+ STT_PICKER_MODELS,migrateVoiceSettings,} from "../src/features/settings/stores/stt-model-catalog.ts";@@ -28,10 +28,10 @@ test("the default dictation model is a recommended one", () => {});test("recommended models are listed before the rest", () => {- const firstOther = STT_MODELS.findIndex(+ const firstOther = STT_PICKER_MODELS.findIndex((model) => !RECOMMENDED_STT_MODELS.has(model),);- const lastRecommended = STT_MODELS.reduce(+ const lastRecommended = STT_PICKER_MODELS.reduce((last, model, index) => (RECOMMENDED_STT_MODELS.has(model) ? index : last),-1,);