The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
feat(n1): Liquid LFM3 (Text, VL, Omni, Audio) via Ollama and MLX, speech in/out over Ollama
purplea4b78ddbbaff
diff --git a/dev-server/remote-stubs.ts b/dev-server/remote-stubs.tsindex 261ca170..92f02cac 100644--- a/dev-server/remote-stubs.ts+++ b/dev-server/remote-stubs.ts@@ -91,11 +91,13 @@ export function registerRemoteStubs(routes: RouteMount): void {// and the chat engine that read it.// Remove refusals (A14) as well: its runs are Python processes the Rust// side starts, reads and stops.+ // Dictation through an external transcription endpoint (N1) is a Rust+ // multipart request as well.for (const path of ['/local-api/local-api-usage', '/local-api/set-download-limit', '/local-api/character-photos', '/local-api/pick-gguf-file','/local-api/list-custom-nodes', '/local-api/remove-custom-node', '/local-api/custom-node-log','/local-api/verify-model-files', '/local-api/verify-model-files-status', '/local-api/verify-model-files-cancel',- '/local-api/trash-model-file', '/local-api/set-engine-idle-unload',+ '/local-api/trash-model-file', '/local-api/set-engine-idle-unload', '/local-api/transcribe-external','/local-api/set-gpu-roles', '/local-api/describe-gpu-roles','/local-api/abliterate-plan', '/local-api/abliterate-start', '/local-api/abliterate-status','/local-api/abliterate-cancel', '/local-api/abliterate-dismiss', '/local-api/abliterate-runs',diff --git a/src-tauri/src/commands/engine.rs b/src-tauri/src/commands/engine.rsindex 6a2dd664..90bf2f3d 100644--- a/src-tauri/src/commands/engine.rs+++ b/src-tauri/src/commands/engine.rs@@ -2923,6 +2923,28 @@ fn stderr_blames_the_model_file(stderr: &str) -> bool {MARKERS.iter().any(|m| lower.contains(m))}+/// The architecture name llama.cpp says it does not know, when it names one.+///+/// N1, 30.10.2026: LiquidAI/LFM3-1.7B-GGUF carries `lfm3`, which the pinned+/// b9949 does not know, and the engine said `unknown model architecture:+/// 'lfm3'`. The app answered "may be damaged, cut short ... download it+/// again", and a second download of a perfectly good file changes nothing. An+/// EMPTY name stays with the damaged-file answer: that is what a truncated+/// GGUF prints (`KAPUTTE_GGUF_STDERR`, measured 03.09.2026).+fn stderr_names_an_unknown_architecture(stderr: &str) -> Option<String> {+ const MARKER: &str = "unknown model architecture";+ for line in stderr.lines() {+ let lower = line.to_ascii_lowercase();+ let Some(at) = lower.find(MARKER) else { continue };+ let rest = line[at + MARKER.len()..].trim_start_matches([':', ' ']);+ let Some(name) = rest.strip_prefix('\'').and_then(|r| r.split('\'').next()) else { continue };+ if !name.is_empty() && name.chars().all(|c| c.is_ascii_alphanumeric() || "-_.".contains(c)) {+ return Some(name.to_string());+ }+ }+ None+}+/// Der Anfang einer GGUF: die Marke und die Formatversion.const GGUF_MAGIC: &[u8; 4] = b"GGUF";@@ -3122,6 +3144,8 @@ fn illegal_instruction_repair_sentence(module_count: Option<usize>, is_macos: bofn died_failure_hint(stderr: &str, backend_dir_too_long: bool, on_linux: bool) -> String {if let Some(lib) = stderr_names_a_missing_system_library(stderr) {missing_library_hint(&lib, on_linux)+ } else if let Some(arch) = stderr_names_an_unknown_architecture(stderr) {+ format!(" The model file is a {arch} model, and this LU Engine does not know that architecture yet. Downloading it again will not help. Run it through Ollama, or pick another model.")} else if backend_dir_too_long {format!(" {}", long_install_path_hint())} else if stderr_blames_the_model(stderr) {@@ -10077,7 +10101,9 @@ mod tests {stderr: "llama_model_load: error loading model: unknown model architecture 'wanx'".into(),exit_code: None, signal: None };let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);- assert!(msg.contains("could not read the model file"), "{msg}");+ // A NAMED architecture is the engine's age, not the file (N1, LFM3).+ assert!(msg.contains("a wanx model"), "{msg}");+ assert!(msg.contains("does not know that architecture"), "{msg}");assert!(!msg.contains("GPU Layers"), "{msg}");}diff --git a/src-tauri/src/commands/mobile_guard.rs b/src-tauri/src/commands/mobile_guard.rsindex 054826e5..39c253d1 100644--- a/src-tauri/src/commands/mobile_guard.rs+++ b/src-tauri/src/commands/mobile_guard.rs@@ -108,6 +108,7 @@ pub const BLOCKED: &[&str] = &["transcribe","synthesize","synthesize_external",+ "transcribe_external","log_reveal",// The desktop update lane: stops the engines and starts LU again. A phone// is updated by its store.diff --git a/src-tauri/src/commands/tts.rs b/src-tauri/src/commands/tts.rsindex a5b4ef31..58df75d3 100644--- a/src-tauri/src/commands/tts.rs+++ b/src-tauri/src/commands/tts.rs@@ -312,6 +312,104 @@ fn synthesize_blocking(Ok(serde_json::json!({ "audio_base64": b64, "mime": "audio/wav" }))}+/// The OpenAI-compatible `/v1/audio/speech` request body.+///+/// Kokoro-FastAPI and OpenAI take any model name and need a voice, so with+/// neither set this stays what it always was: `tts-1` and OpenAI's `alloy`.+/// Ollama (0.40.8+) serves speech the same way, but it answers 400 to a model+/// it has not pulled (`tts-1`) and to a voice the model does not have+/// (`alloy`). Its docs say to omit the voice for the model's own default one.+/// So a model named here is sent as named, and with a named model and no+/// voice the field is left out (N1, LFM3 Audio, 30.10.2026).+fn external_tts_body(text: &str, model: Option<&str>, voice: Option<&str>) -> serde_json::Value {+ let model = model.map(str::trim).filter(|m| !m.is_empty());+ let voice = voice.map(str::trim).filter(|v| !v.is_empty());+ let mut body = serde_json::json!({+ "model": model.unwrap_or("tts-1"),+ "input": text,+ "response_format": "wav",+ });+ match (voice, model) {+ (Some(v), _) => body["voice"] = v.into(),+ (None, None) => body["voice"] = "alloy".into(),+ (None, Some(_)) => {}+ }+ body+}++/// The endpoint must be a well-formed http(s) URL. Localhost/LAN is allowed on+/// purpose (see the SSRF note on `synthesize_external`).+fn external_voice_url(url: &str, what: &str) -> Result<url::Url, String> {+ let parsed = url::Url::parse(url.trim()).map_err(|e| format!("invalid {what} endpoint URL: {e}"))?;+ match parsed.scheme() {+ "http" | "https" => Ok(parsed),+ other => Err(format!("{what} endpoint must be http or https, got '{other}'")),+ }+}++/// The text out of an OpenAI-compatible transcription answer+/// (`{"text": "..."}`, `response_format` json, the default).+fn transcript_of(answer: &serde_json::Value) -> Option<String> {+ answer.get("text").and_then(|t| t.as_str()).map(|t| t.trim().to_string())+}++/// Speech to text through a user-configured OpenAI-compatible+/// `/v1/audio/transcriptions` endpoint, the counterpart of+/// `synthesize_external` for the microphone. Ollama (0.40.13+) serves it for+/// models that take audio, such as `lfm3-audio` and `lfm3-omni` (N1). The+/// take is the WAV `createAudioRecorder` writes; Ollama accepts WAV only.+///+/// SSRF: the same reasoning as `synthesize_external`, the URL comes from the+/// voice settings, never from model output.+#[tauri::command]+pub async fn transcribe_external(+ audio_base64: String,+ content_type: String,+ url: String,+ model: String,+) -> Result<serde_json::Value, String> {+ let parsed = external_voice_url(&url, "transcription")?;+ let model = model.trim().to_string();+ if model.is_empty() {+ return Err("No speech-to-text model is set. Enter one in Settings, Voice.".to_string());+ }+ let audio = base64::engine::general_purpose::STANDARD+ .decode(&audio_base64)+ .map_err(|e| format!("base64 decode: {e}"))?;+ if audio.is_empty() {+ return Err("Empty audio data".to_string());+ }+ let mime = if content_type.trim().is_empty() { "audio/wav".to_string() } else { content_type };+ let part = reqwest::multipart::Part::bytes(audio)+ .file_name("take.wav")+ .mime_str(&mime)+ .map_err(|e| e.to_string())?;+ let form = reqwest::multipart::Form::new()+ .part("file", part)+ .text("model", model.clone())+ .text("response_format", "json");++ let client = reqwest::Client::builder()+ .user_agent(crate::app_identity::outgoing_agent!("2.0"))+ .timeout(std::time::Duration::from_secs(300))+ .build()+ .map_err(|e| e.to_string())?;+ let resp = client+ .post(parsed.as_str())+ .multipart(form)+ .send()+ .await+ .map_err(|e| format!("speech-to-text request failed: {}", os_error::english(&e)))?;+ if !resp.status().is_success() {+ let code = resp.status().as_u16();+ let detail: String = resp.text().await.unwrap_or_default().chars().take(200).collect();+ return Err(format!("speech-to-text HTTP {code} from {model}: {detail}"));+ }+ let answer: serde_json::Value = resp.json().await.map_err(|e| format!("speech-to-text answer was not JSON: {e}"))?;+ let transcript = transcript_of(&answer).ok_or_else(|| "speech-to-text answer carried no text".to_string())?;+ Ok(serde_json::json!({ "transcript": transcript }))+}+/// Synthesize `text` via a user-configured external HTTP TTS engine and return/// it base64-encoded for the frontend to play (GitHub #58). The endpoint is an/// OpenAI-compatible `/v1/audio/speech` URL — e.g. Kokoro-FastAPI on@@ -328,26 +426,14 @@ pub async fn synthesize_external(text: String,url: String,voice: Option<String>,+ model: Option<String>,) -> Result<serde_json::Value, String> {let text = text.trim().to_string();if text.is_empty() {return Err("empty text".to_string());}- // Light validation only — must be a well-formed http(s) URL. Localhost/LAN- // is allowed on purpose (see the SSRF note above).- let parsed = url::Url::parse(url.trim()).map_err(|e| format!("invalid TTS endpoint URL: {}", e))?;- match parsed.scheme() {- "http" | "https" => {}- other => return Err(format!("TTS endpoint must be http or https, got '{}'", other)),- }-- // OpenAI-compatible engines require a voice. Default to OpenAI's "alloy";- // Kokoro users set their own (e.g. "af_bella") in Settings.- let voice = voice- .map(|v| v.trim().to_string())- .filter(|v| !v.is_empty())- .unwrap_or_else(|| "alloy".to_string());+ let parsed = external_voice_url(&url, "TTS")?;let client = reqwest::Client::builder().user_agent(crate::app_identity::outgoing_agent!("2.0"))@@ -355,13 +441,7 @@ pub async fn synthesize_external(.build().map_err(|e| e.to_string())?;- // OpenAI-compatible TTS request body. Kokoro-FastAPI + OpenAI both accept it.- let body = serde_json::json!({- "model": "tts-1",- "input": text,- "voice": voice,- "response_format": "wav",- });+ let body = external_tts_body(&text, model.as_deref(), voice.as_deref());let resp = client.post(parsed.as_str())@@ -476,3 +556,43 @@ mod voice_completeness_tests {}}}++#[cfg(test)]+mod external_voice_tests {+ use super::*;++ #[test]+ fn without_model_and_voice_the_body_stays_what_kokoro_and_openai_got() {+ let b = external_tts_body("Hi", None, None);+ assert_eq!(b["model"], "tts-1");+ assert_eq!(b["voice"], "alloy");+ assert_eq!(b["response_format"], "wav");+ }++ #[test]+ fn a_named_model_is_sent_and_without_a_voice_ollama_picks_its_own() {+ // Ollama answers 400 to `tts-1` (not pulled) and to `alloy` (not a voice of lfm3-audio).+ let b = external_tts_body("Hi", Some(" lfm3-audio:2b "), Some(" "));+ assert_eq!(b["model"], "lfm3-audio:2b");+ assert!(b.get("voice").is_none(), "{b}");+ }++ #[test]+ fn a_named_voice_always_travels() {+ let b = external_tts_body("Hi", Some("lfm3-audio:2b"), Some("Freya"));+ assert_eq!(b["voice"], "Freya");+ assert_eq!(external_tts_body("Hi", None, Some("af_bella"))["voice"], "af_bella");+ }++ #[test]+ fn the_transcript_is_the_text_field() {+ assert_eq!(transcript_of(&serde_json::json!({"text": " Hello there. "})).as_deref(), Some("Hello there."));+ assert_eq!(transcript_of(&serde_json::json!({"error": "x"})), None);+ }++ #[test]+ fn only_http_endpoints_are_taken() {+ assert!(external_voice_url("http://localhost:11434/v1/audio/transcriptions", "transcription").is_ok());+ assert!(external_voice_url("file:///etc/passwd", "transcription").unwrap_err().contains("http or https"));+ }+}diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rsindex 72a408d0..28299247 100644--- a/src-tauri/src/lib.rs+++ b/src-tauri/src/lib.rs@@ -809,6 +809,7 @@ pub fn run() {commands::tts::tts_status,commands::tts::synthesize,commands::tts::synthesize_external,+ commands::tts::transcribe_external,commands::tts::download_voice,commands::tts::installed_piper_voices,// Agent tools (legacy)diff --git a/src/api/__tests__/lfm3-nur-was-laeuft.test.ts b/src/api/__tests__/lfm3-nur-was-laeuft.test.tsnew file mode 100644index 00000000..4b5c5794--- /dev/null+++ b/src/api/__tests__/lfm3-nur-was-laeuft.test.ts@@ -0,0 +1,90 @@+/**+ * LFM3 im Katalog, und warum (noch) nicht als GGUF.+ *+ * ── DER AUFTRAG UND DER BEFUND ─────────────────────────────────────────────+ *+ * Davids Wort vom 31.10.2026 (Paket N1): Liquid LFM3 kommt in 3.0.9 "auf allen+ * Kanaelen". Gemessen am 30.10.2026 am Mac:+ *+ * LiquidAI/LFM3-1.7B-GGUF general.architecture = lfm3+ * llama.cpp b9949 (Pin) kennt lfm2, lfm2moe, KEIN lfm3+ * llama.cpp b11960 LLM_ARCH_LFM3 "lfm3" (laut Modellkarte die erste)+ * lu-llama-server 049326a "unknown model architecture: 'lfm3'"+ * Ollama 0.40.13 laedt lfm3, lfm3-vl, lfm3-omni, lfm3-audio+ *+ * Ein GGUF-Eintrag landet bei der LU Engine oder in LM Studio. Die LU Engine+ * kann ihn am Pin b9949 nicht oeffnen; LM Studio erst ab llama.cpp-Runtime+ * 2.65.1. Deshalb steht LFM3 nur als Ollama-Tag da, die MLX-Builds davon nur+ * auf dem Mac.+ *+ * ── WANN DIESE DATEI FAELLT ────────────────────────────────────────────────+ *+ * Wird der Pin in scripts/build-llama.sh auf b11960 oder spaeter gehoben,+ * gibt die zweite Sperre unten den GGUF-Eintrag von selbst frei. Davor gehoert+ * `LIVE_ARCH=1 npx vitest run src/api/__tests__/katalog-architektur.live.test.ts`+ * gelaufen.+ */+import { describe, it, expect } from 'vitest'+import { readFileSync } from 'node:fs'+import { resolve, dirname } from 'node:path'+import { fileURLToPath } from 'node:url'+import { getUncensoredTextModels, getMainstreamTextModels } from '../discover'+import { parsePinnedLlamaTag } from '../gguf-arch'+import { forThisPlatform } from '../../lib/mlx-only-builds'++const alle = () => [...getUncensoredTextModels(), ...getMainstreamTextModels()]+const lfm3 = () => alle().filter((m) => /^LFM3\b/.test(m.name))+const wurzel = resolve(dirname(fileURLToPath(import.meta.url)), '../../..')++/** Erste llama.cpp-Version mit LLM_ARCH_LFM3 (Modellkarte LiquidAI/LFM3-1.7B-GGUF). */+const LFM3_AB_BUILD = 11960++describe('LFM3 steht im Katalog', () => {+ it('alle vier Varianten als offizielle Ollama-Tags: Text, VL, Omni, Audio', () => {+ const tags = lfm3().map((m) => m.ollamaModel)+ for (const t of ['lfm3:1.7b', 'lfm3-vl:2b', 'lfm3-omni:2b', 'lfm3-audio:2b']) expect(tags).toContain(t)+ })++ it('Omni und Audio sagen, wo LU den Ton nutzt', () => {+ for (const t of ['lfm3-omni:2b', 'lfm3-audio:2b']) {+ const m = lfm3().find((x) => x.ollamaModel === t)!+ expect(m.tags).toContain('Audio')+ expect(m.description).toContain('Settings, Voice')+ }+ expect(lfm3().find((m) => m.ollamaModel === 'lfm3-omni:2b')!.tags).toContain('Vision')+ })++ it('jeder Eintrag sagt, welches Ollama er braucht und was die Lizenz begrenzt', () => {+ for (const m of lfm3()) expect(m.description, m.name).toContain('Ollama 0.40.13')+ const haupt = lfm3().filter((m) => !m.tags.includes('MLX'))+ expect(haupt.length).toBe(4)+ for (const m of haupt) expect(m.description, m.name).toMatch(/10 M USD/)+ })++ it('das VL-Modell traegt Vision, das Textmodell nicht', () => {+ expect(lfm3().find((m) => m.ollamaModel === 'lfm3-vl:2b')!.tags).toContain('Vision')+ expect(lfm3().find((m) => m.ollamaModel === 'lfm3:1.7b')!.tags).not.toContain('Vision')+ })++ it('die MLX-Builds sieht nur der Mac', () => {+ const mlx = lfm3().filter((m) => m.ollamaModel?.includes('nvfp4'))+ expect(mlx.length).toBe(4)+ for (const m of mlx) expect(m.tags).toContain('MLX')+ expect(forThisPlatform(lfm3(), true).length).toBe(8)+ expect(forThisPlatform(lfm3(), false).map((m) => m.ollamaModel).sort()).toEqual(['lfm3-audio:2b', 'lfm3-omni:2b', 'lfm3-vl:2b', 'lfm3:1.7b'])+ })+})++describe('LFM3 steht NICHT als GGUF im Katalog, solange die Engine es nicht oeffnet', () => {+ it('kein Eintrag zeigt auf ein LFM3-GGUF, waehrend der Pin vor b11960 liegt', () => {+ const tag = parsePinnedLlamaTag(readFileSync(resolve(wurzel, 'scripts/build-llama.sh'), 'utf8'))+ expect(tag).toMatch(/^b\d+$/)+ const build = Number(tag!.slice(1))+ const gguf = alle().filter((m) => /LFM3/i.test(`${m.downloadUrl ?? ''} ${m.filename ?? ''}`))+ if (build >= LFM3_AB_BUILD) return+ expect(+ gguf.map((m) => `${m.name} → ${m.downloadUrl}`),+ `LFM3-GGUFs tragen general.architecture=lfm3; llama.cpp ${tag} kennt das nicht (ab b${LFM3_AB_BUILD}).`,+ ).toEqual([])+ })+})diff --git a/src/api/backend.ts b/src/api/backend.tsindex 062536af..c1ea7cb1 100644--- a/src/api/backend.ts+++ b/src/api/backend.ts@@ -642,6 +642,7 @@ export async function backendCall<T = unknown>(computer_surface: { path: "/local-api/computer-surface", method: "POST" },computer_surface_corner: { path: "/local-api/computer-surface-corner", method: "POST" },transcribe: { path: "/local-api/transcribe", method: "POST" },+ transcribe_external: { path: "/local-api/transcribe-external", method: "POST" },execute_code: { path: "/local-api/execute-code", method: "POST" },// file_read / file_write: ABSICHTLICH NICHT HIER. Die beiden Dev-Endpunkte// sind entfernt (siehe vite.config.ts), weil sie keinen Aufrufer mehrdiff --git a/src/api/discover.ts b/src/api/discover.tsindex e6f6cd8a..9df42b5f 100644--- a/src/api/discover.ts+++ b/src/api/discover.ts@@ -1414,6 +1414,30 @@ export function getMainstreamTextModels(): DiscoverModel[] {// Gemma 4 12B QAT: Google's own quantization-aware file, one quant only{ name: 'Gemma 4 12B QAT', description: 'Gemma 4 12B QAT · Google\'s own Q4 file from quantization-aware training, which is meant to hold quality at this size. Vision and tool calling. The 0.2 GB vision projector comes with it.', pulls: '780K+', tags: ['12B', 'Vision', 'QAT Q4_0', '7 GB'], updated: 'New', agent: true, released: '2026-06', downloadUrl: HF('google/gemma-4-12B-it-qat-q4_0-gguf', 'gemma-4-12b-it-qat-q4_0.gguf'), filename: 'gemma-4-12b-it-qat-q4_0.gguf', sizeGB: 6.98, ...IMAGE_PART['google/gemma-4-12B-it-qat-q4_0-gguf/mmproj-gemma-4-12b-it-qat-q4_0.gguf'] },// Small models for 8 GB machines (all below the 7B chat minimum)+ // LFM3 (Liquid AI, 28.10.2026): Text, VL, Omni and Audio, only as Ollama+ // tags for now. The GGUF+ // header says `general.architecture = lfm3`, which llama.cpp knows from+ // b11960 on; the built-in engine is pinned to b9949 (scripts/build-llama.sh),+ // so a GGUF entry here would download and then not open+ // (src/api/__tests__/lfm3-nur-was-laeuft.test.ts holds that line). Ollama+ // runs it from 0.40.13 on all platforms (0.40.12 was Apple only; the+ // manifest config says `"requires":"0.40.13"`). The lfm3:1.7b model layer+ // is byte for byte LiquidAI/LFM3-1.7B-GGUF Q4_K_M (sha256 3793e1e6…).+ // Sizes are the manifest layer sums, read 30.10.2026. LFM Open License+ // v1.0, like LFM 2.5: commercial use is licensed below 10 M USD revenue.+ { name: 'LFM3 1.7B', group: 'LFM3 1.7B', description: 'Liquid AI LFM3 1.7B · very small, fast model for quick answers, summaries, extraction and simple tool calls, 256K context. Weaker at long reasoning than 7B+ models. Needs Ollama 0.40.13 or newer. LFM Open License: commercial use only below 10 M USD annual revenue.', pulls: 'New', tags: ['1.7B', 'Q4_K_M', '1.0 GB', 'Tools'], updated: 'New', agent: true, released: '2026-10', ollamaModel: 'lfm3:1.7b', sizeGB: 1.02 },+ { name: 'LFM3 1.7B NVFP4', group: 'LFM3 1.7B', description: 'Liquid AI LFM3 1.7B · NVFP4, an MLX build in Ollama for Apple Silicon Macs. Needs Ollama 0.40.13 or newer.', pulls: 'New', tags: ['1.7B', 'NVFP4', 'MLX', '1.6 GB', 'Tools'], updated: 'New', agent: true, released: '2026-10', ollamaModel: 'lfm3:1.7b-nvfp4', sizeGB: 1.57 },+ { name: 'LFM3 VL 2B', group: 'LFM3 VL 2B', description: 'Liquid AI LFM3 VL 2B · LFM3 with image input: describe photos, read screenshots and documents. Small, so expect short and simple answers. Projector included. Needs Ollama 0.40.13 or newer. LFM Open License: commercial use only below 10 M USD annual revenue.', pulls: 'New', tags: ['2B', 'Vision', 'Q4_K_M', '1.4 GB'], updated: 'New', released: '2026-10', ollamaModel: 'lfm3-vl:2b', sizeGB: 1.38 },+ { name: 'LFM3 VL 2B NVFP4', group: 'LFM3 VL 2B', description: 'Liquid AI LFM3 VL 2B · NVFP4, an MLX build in Ollama for Apple Silicon Macs. Needs Ollama 0.40.13 or newer.', pulls: 'New', tags: ['2B', 'Vision', 'NVFP4', 'MLX', '1.6 GB'], updated: 'New', released: '2026-10', ollamaModel: 'lfm3-vl:2b-nvfp4', sizeGB: 1.63 },+ // Omni and Audio take sound as well. Ollama hears through its+ // /v1/audio/transcriptions route and speaks through /v1/audio/speech, not+ // through chat, so in LU the sound side runs in Settings, Voice+ // ("Use LFM3 Audio in Ollama"). The Omni manifest names the capabilities+ // vision, audio, speech and tools; Audio names audio, speech and tools.+ { name: 'LFM3 Omni 2B', group: 'LFM3 Omni 2B', description: 'Liquid AI LFM3 Omni 2B · text, images and sound in one small model. Chats with image input, and can also transcribe the microphone and read answers aloud (set it in Settings, Voice). Needs Ollama 0.40.13 or newer. LFM Open License: commercial use only below 10 M USD annual revenue.', pulls: 'New', tags: ['2B', 'Vision', 'Audio', 'Q4_K_M', '1.9 GB'], updated: 'New', released: '2026-10', ollamaModel: 'lfm3-omni:2b', sizeGB: 1.91 },+ { name: 'LFM3 Omni 2B NVFP4', group: 'LFM3 Omni 2B', description: 'Liquid AI LFM3 Omni 2B · NVFP4, an MLX build in Ollama for Apple Silicon Macs. Needs Ollama 0.40.13 or newer.', pulls: 'New', tags: ['2B', 'Vision', 'Audio', 'NVFP4', 'MLX', '2.2 GB'], updated: 'New', released: '2026-10', ollamaModel: 'lfm3-omni:2b-nvfp4', sizeGB: 2.23 },+ { name: 'LFM3 Audio 2B', group: 'LFM3 Audio 2B', description: 'Liquid AI LFM3 Audio 2B · speech recognition, translation and text-to-speech in 18 languages. In LU it is the voice and the ear: Settings, Voice, "Use LFM3 Audio in Ollama" for dictation and read-aloud. Needs Ollama 0.40.13 or newer. LFM Open License: commercial use only below 10 M USD annual revenue.', pulls: 'New', tags: ['2B', 'Audio', 'Q4_K_M', '1.6 GB'], updated: 'New', released: '2026-10', ollamaModel: 'lfm3-audio:2b', sizeGB: 1.56 },+ { name: 'LFM3 Audio 2B NVFP4', group: 'LFM3 Audio 2B', description: 'Liquid AI LFM3 Audio 2B · NVFP4, an MLX build in Ollama for Apple Silicon Macs. Needs Ollama 0.40.13 or newer.', pulls: 'New', tags: ['2B', 'Audio', 'NVFP4', 'MLX', '1.9 GB'], updated: 'New', released: '2026-10', ollamaModel: 'lfm3-audio:2b-nvfp4', sizeGB: 1.92 },{ name: 'LFM 2.5 2.6B', group: 'LFM 2.5 2.6B', description: 'Liquid AI LFM 2.5 2.6B · small on-device model with native tool calling, fits 8 GB machines. Liquid AI license, check the terms for commercial use.', pulls: '1.0M', tags: ['2.6B', 'Q4_K_M', '1.7 GB', 'Tools'], updated: 'New', agent: true, lightweight: true, released: '2026-08', downloadUrl: HF('LiquidAI/LFM2.5-2.6B-GGUF', 'LFM2.5-2.6B-Q4_K_M.gguf'), filename: 'LFM2.5-2.6B-Q4_K_M.gguf', sizeGB: 1.67 },{ name: 'LFM 2.5 2.6B Q8_0', group: 'LFM 2.5 2.6B', description: 'Liquid AI LFM 2.5 2.6B · largest quant, closest to the original weights.', pulls: '1.0M', tags: ['2.6B', 'Q8_0', '2.9 GB', 'Tools'], updated: 'New', agent: true, lightweight: true, released: '2026-08', downloadUrl: HF('LiquidAI/LFM2.5-2.6B-GGUF', 'LFM2.5-2.6B-Q8_0.gguf'), filename: 'LFM2.5-2.6B-Q8_0.gguf', sizeGB: 2.87 },{ name: 'FrogNano 4B', group: 'FrogNano 4B', description: 'Microsoft FrogNano 4B · Microsoft\'s small model from September 2026, successor to Phi-4 Mini. Vision. The 0.7 GB vision projector comes with it. MIT.', pulls: '21K+', tags: ['4B', 'Vision', 'Q4_K_M', '2.8 GB'], updated: 'New', lightweight: true, released: '2026-09', downloadUrl: HF('bartowski/FrogNano-4B-2609-GGUF', 'FrogNano-4B-2609-Q4_K_M.gguf'), filename: 'FrogNano-4B-2609-Q4_K_M.gguf', sizeGB: 2.8, ...IMAGE_PART['bartowski/FrogNano-4B-2609-GGUF/mmproj-FrogNano-4B-2609-f16.gguf'] },diff --git a/src/api/voice.ts b/src/api/voice.tsindex 0afc29b6..372c9dc0 100644--- a/src/api/voice.ts+++ b/src/api/voice.ts@@ -309,6 +309,34 @@ export async function transcribeAudio(audioBlob: Blob): Promise<string> {return data.transcript || "";}+/**+ * Dictation through an OpenAI-compatible /v1/audio/transcriptions endpoint+ * (N1): Ollama 0.40.13+ serves it for models that take audio, such as+ * lfm3-audio and lfm3-omni. The take is the WAV createAudioRecorder writes,+ * which is the one format Ollama accepts.+ */+export async function transcribeExternal(audioBlob: Blob, url: string, model: string): Promise<string> {+ const bytes = new Uint8Array(await audioBlob.arrayBuffer());+ let binary = "";+ for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);+ const data: unknown = await backendCall("transcribe_external", {+ audioBase64: btoa(binary),+ contentType: audioBlob.type || "audio/wav",+ url,+ model,+ });+ return asString(prop(data, "transcript")) ?? "";+}++/** The Ollama addresses for speech in and speech out, from its base URL. */+export function ollamaSpeechUrls(base: string): { stt: string; tts: string } {+ const b = base.replace(/\/+$/, "");+ return { stt: `${b}/v1/audio/transcriptions`, tts: `${b}/v1/audio/speech` };+}++/** The Ollama model LU fills in for speech in and out: Liquid AI LFM3 Audio (N1). */+export const OLLAMA_SPEECH_MODEL = "lfm3-audio:2b";+// --- LU Cloud voice (appMode 'cloud') ---/** Cloud STT: POST the recorded clip to /api/voice/transcribe (Whisper@@ -500,8 +528,8 @@ export async function synthesizeNeural(text: string, voice?: string): Promise<st* http://localhost:8880/v1/audio/speech); `voice` is that engine's voice name.* Returns a playable blob URL (the Rust side honors the returned audio type).*/-export async function synthesizeExternal(text: string, url: string, voice?: string): Promise<string> {- const data = await backendCall<{ audio_base64?: string; mime?: string }>("synthesize_external", { text, url, voice });+export async function synthesizeExternal(text: string, url: string, voice?: string, model?: string): Promise<string> {+ const data = await backendCall<{ audio_base64?: string; mime?: string }>("synthesize_external", { text, url, voice, model: model?.trim() || undefined });if (!data?.audio_base64) throw new Error("external TTS returned no audio");return base64ToBlobUrl(data.audio_base64, data.mime || "audio/wav");}diff --git a/src/components/settings/SpeechSettings.tsx b/src/components/settings/SpeechSettings.tsxindex acc490b2..5c082504 100644--- a/src/components/settings/SpeechSettings.tsx+++ b/src/components/settings/SpeechSettings.tsx@@ -2,10 +2,10 @@ import { useCallback, useEffect, useReducer, useState } from 'react'import { Check, Download, Loader2, Mic, Volume2, X } from 'lucide-react'import { withInstallerOutput } from '../../lib/error-text'import { HINWEIS_TEXT } from '../../lib/hinweis'-import { backendCall } from '../../api/backend'+import { backendCall, getOllamaBase } from '../../api/backend'import { useSettingsStore } from '../../stores/settingsStore'import { useVoiceStore } from '../../stores/voiceStore'-import { checkWhisperAvailable, checkTtsAvailable, downloadPiperVoice, listInstalledPiperVoices } from '../../api/voice'+import { checkWhisperAvailable, checkTtsAvailable, downloadPiperVoice, listInstalledPiperVoices, ollamaSpeechUrls, OLLAMA_SPEECH_MODEL } from '../../api/voice'import { InlineToggle } from './InlineToggle'import { MicrophoneSetting } from './MicrophoneSetting'import { initialProbe, makeProbeReducer, needsInstall, showsHint } from './probe-install'@@ -304,6 +304,25 @@ export function SpeechSettings() {</p>)}+ {/* N1: dictation through an OpenAI-compatible transcription endpoint,+ e.g. Ollama serving Liquid AI LFM3 Audio, instead of faster-whisper. */}+ <EngineSwitch+ label="Dictation"+ value={voiceSettings.sttMode}+ options={[['whisper', 'faster-whisper'], ['external', 'External HTTP']]}+ onPick={(m) => voiceSettings.updateVoiceSettings({ sttMode: m })}+ />+ {voiceSettings.sttMode === 'external' && (+ <div className="space-y-1.5">+ <SettingInput value={voiceSettings.externalSttUrl} onChange={(v) => voiceSettings.updateVoiceSettings({ externalSttUrl: v })} placeholder="http://localhost:11434/v1/audio/transcriptions" />+ <SettingInput value={voiceSettings.externalSttModel} onChange={(v) => voiceSettings.updateVoiceSettings({ externalSttModel: v })} placeholder="model (e.g. lfm3-audio:2b)" />+ <OllamaSpeechPreset onUse={() => voiceSettings.updateVoiceSettings({ externalSttUrl: ollamaSpeechUrls(getOllamaBase()).stt, externalSttModel: OLLAMA_SPEECH_MODEL })} />+ <p className="text-[0.55rem] text-gray-500 leading-snug">+ Any OpenAI-compatible speech-to-text endpoint. With Ollama 0.40.13 or newer, LFM3 Audio (lfm3-audio:2b, 1.7 GB) transcribes the microphone; get it in Models first. Stays on your machine when the endpoint is local.+ </p>+ </div>+ )}+<MicrophoneSetting coversVoice />{/* Text-to-Speech, Piper neural (read responses aloud) */}@@ -421,8 +440,10 @@ export function SpeechSettings() {spellCheck={false}className="w-full px-2 py-1 rounded bg-transparent border border-white/8 text-[0.65rem] text-gray-300 placeholder-gray-600 focus:outline-none focus:border-white/20"/>+ <SettingInput value={voiceSettings.externalTtsModel} onChange={(v) => voiceSettings.updateVoiceSettings({ externalTtsModel: v })} placeholder="model (empty sends tts-1)" />+ <OllamaSpeechPreset onUse={() => voiceSettings.updateVoiceSettings({ externalTtsUrl: ollamaSpeechUrls(getOllamaBase()).tts, externalTtsModel: OLLAMA_SPEECH_MODEL, externalTtsVoice: '' })} /><p className="text-[0.55rem] text-gray-500 leading-snug">- Any OpenAI-compatible TTS endpoint (e.g. Kokoro-FastAPI). Used for read-aloud instead of Piper. Stays on your machine when the endpoint is local.+ Any OpenAI-compatible TTS endpoint (e.g. Kokoro-FastAPI, or Ollama 0.40.13+ with LFM3 Audio). Used for read-aloud instead of Piper. With a model and no voice, the engine speaks in the model's own voice. Stays on your machine when the endpoint is local.</p>{/* B11: the external voice fell back to the system voice in silence. */}{voiceSettings.ttsFallbackReason && (@@ -432,3 +453,53 @@ export function SpeechSettings() {)}</>)}++function SettingInput({ value, onChange, placeholder }: { value: string; onChange: (v: string) => void; placeholder: string }) {+ return (+ <input+ value={value}+ onChange={(e) => onChange(e.target.value)}+ placeholder={placeholder}+ spellCheck={false}+ className="w-full px-2 py-1 rounded bg-transparent border border-white/8 text-[0.65rem] text-gray-300 placeholder-gray-600 focus:outline-none focus:border-white/20"+ />+ )+}++/** Fills in the local Ollama address and LFM3 Audio (N1). Fills only, it pulls nothing. */+function OllamaSpeechPreset({ onUse }: { onUse: () => void }) {+ return (+ <button+ type="button"+ onClick={onUse}+ className="px-2 py-0.5 rounded border border-white/8 text-[0.6rem] text-gray-400 hover:text-gray-200 transition-colors"+ >+ Use LFM3 Audio in Ollama+ </button>+ )+}++function EngineSwitch<T extends string>({ label, value, options, onPick }: { label: string; value: T; options: [T, string][]; onPick: (v: T) => void }) {+ return (+ <div className="flex items-center justify-between gap-2 pt-1">+ <span className="text-[0.7rem] text-gray-500">{label}</span>+ <div className="flex items-center gap-1 text-[0.6rem]">+ {options.map(([m, text]) => (+ <button+ key={m}+ onClick={() => onPick(m)}+ aria-pressed={value === m}+ className={+ 'px-2 py-0.5 rounded border transition-colors ' ++ (value === m+ ? 'bg-lu-accent-soft text-gray-900 dark:text-white border-lu-accent-edge dark:border-lu-accent'+ : 'text-gray-500 border-white/8 hover:text-gray-300')+ }+ >+ {text}+ </button>+ ))}+ </div>+ </div>+ )+}diff --git a/src/hooks/__tests__/lfm3-audio-spricht-und-hoert.dom.test.tsx b/src/hooks/__tests__/lfm3-audio-spricht-und-hoert.dom.test.tsxnew file mode 100644index 00000000..7ae468c6--- /dev/null+++ b/src/hooks/__tests__/lfm3-audio-spricht-und-hoert.dom.test.tsx@@ -0,0 +1,123 @@+// @vitest-environment jsdom+/**+ * N1, 30.10.2026: Liquid AI LFM3 Audio als Stimme und als Ohr von LU.+ *+ * Ollama 0.40.13 bietet fuer lfm3-audio (und lfm3-omni) zwei+ * OpenAI-kompatible Wege: /v1/audio/speech (Vorlesen) und+ * /v1/audio/transcriptions (Diktat). Vorher schickte LU beim externen+ * Vorlesen immer `model: "tts-1"` und `voice: "alloy"`, beides beantwortet+ * Ollama mit 400. Ein externes Diktat gab es gar nicht, das Mikrofon kannte+ * nur faster-whisper.+ *+ * Run: npx vitest run src/hooks/__tests__/lfm3-audio-spricht-und-hoert.dom.test.tsx+ */+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { createElement } from 'react'+import { act, cleanup, fireEvent, render, renderHook, screen } from '@testing-library/react'+import { standOn } from '../../test-support/devices'++const backend = vi.hoisted(() => ({ backendCall: vi.fn(), tauri: { on: true } }))+vi.mock('../../api/backend', async (orig) => ({ ...((await orig()) as object), backendCall: backend.backendCall, isTauri: () => backend.tauri.on }))+vi.mock('@tauri-apps/api/event', () => ({ listen: vi.fn(async () => () => {}) }))+vi.mock('../../lib/logger', () => ({ log: { error: vi.fn(), warn: vi.fn(), info: vi.fn(), debug: vi.fn() } }))+vi.mock('../../stores/cloudAuthStore', async (orig) => ({ ...((await orig()) as object), deriveCloudAvailable: () => false }))++import { useVoice, transcribeTake, externalStt, stopSpeechPlayback } from '../useVoice'+import { useVoiceStore } from '../../stores/voiceStore'+import { ollamaSpeechUrls, OLLAMA_SPEECH_MODEL } from '../../api/voice'+import { SpeechSettings } from '../../components/settings/SpeechSettings'+import { setOllamaBase } from '../../api/backend'++const wav = () => new Blob([new Uint8Array([82, 73, 70, 70, 1, 2, 3, 4])], { type: 'audio/wav' })++beforeEach(() => {+ standOn('mac')+ backend.tauri.on = true+ backend.backendCall.mockReset()+ useVoiceStore.getState().resetVoiceDefaults()+ useVoiceStore.setState({ sttAvailable: false, sttError: null, transcript: '' })+})+afterEach(() => {+ cleanup()+ stopSpeechPlayback()+})++describe('Diktat ueber Ollama (LFM3 Audio)', () => {+ it('geht an transcribe_external mit Adresse und Modell, nicht an faster-whisper', async () => {+ backend.backendCall.mockResolvedValue({ transcript: 'Hello from LFM3.' })+ useVoiceStore.getState().updateVoiceSettings({+ sttMode: 'external', externalSttUrl: 'http://localhost:11434/v1/audio/transcriptions', externalSttModel: 'lfm3-audio:2b',+ })+ const text = await transcribeTake(wav(), false)+ expect(text).toBe('Hello from LFM3.')+ expect(backend.backendCall).toHaveBeenCalledTimes(1)+ const [cmd, args] = backend.backendCall.mock.calls[0]+ expect(cmd).toBe('transcribe_external')+ expect(args).toMatchObject({ url: 'http://localhost:11434/v1/audio/transcriptions', model: 'lfm3-audio:2b', contentType: 'audio/wav' })+ expect(typeof (args as { audioBase64: string }).audioBase64).toBe('string')+ })++ it('halb ausgefuellt bleibt es bei faster-whisper', () => {+ expect(externalStt({ sttMode: 'external', externalSttUrl: 'http://x/v1/audio/transcriptions', externalSttModel: ' ' })).toBeNull()+ expect(externalStt({ sttMode: 'whisper', externalSttUrl: 'http://x', externalSttModel: 'm' })).toBeNull()+ })++ it('der Mikrofonknopf gilt als bereit, ohne dass faster-whisper installiert ist', () => {+ useVoiceStore.getState().updateVoiceSettings({ sttMode: 'external', externalSttUrl: 'http://localhost:11434/v1/audio/transcriptions', externalSttModel: 'lfm3-audio:2b' })+ const { result } = renderHook(() => useVoice())+ expect(result.current.sttSupported).toBe(true)+ })++ it('ein Fehler von Ollama landet als Satz im Diktat, nicht als Stille', async () => {+ backend.backendCall.mockRejectedValue('speech-to-text HTTP 404 from lfm3-audio:2b: model not found')+ useVoiceStore.getState().updateVoiceSettings({ sttMode: 'external', externalSttUrl: 'http://localhost:11434/v1/audio/transcriptions', externalSttModel: 'lfm3-audio:2b' })+ expect(await transcribeTake(wav(), false)).toBe('')+ expect(useVoiceStore.getState().sttError).toContain('model not found')+ })+})++describe('Vorlesen ueber Ollama (LFM3 Audio)', () => {+ it('schickt das eingetragene Modell mit', async () => {+ backend.backendCall.mockResolvedValue({ audio_base64: 'UklGRg==', mime: 'audio/wav' })+ useVoiceStore.setState({ ttsEnabled: true })+ useVoiceStore.getState().updateVoiceSettings({ ttsMode: 'external', externalTtsUrl: 'http://localhost:11434/v1/audio/speech', externalTtsModel: 'lfm3-audio:2b', externalTtsVoice: '' })+ const { result } = renderHook(() => useVoice())+ await act(async () => { await result.current.speakText('Hello there.').catch(() => {}) })+ const call = backend.backendCall.mock.calls.find(([c]) => c === 'synthesize_external')+ expect(call?.[1]).toMatchObject({ url: 'http://localhost:11434/v1/audio/speech', model: 'lfm3-audio:2b' })+ })++ it('die Einstellungen bleiben ueber einen Neustart', () => {+ useVoiceStore.getState().updateVoiceSettings({ sttMode: 'external', externalSttUrl: 'u', externalSttModel: 'm', externalTtsModel: 't' })+ const saved = JSON.parse(localStorage.getItem('locally-uncensored-voice') ?? '{}').state+ expect(saved).toMatchObject({ sttMode: 'external', externalSttUrl: 'u', externalSttModel: 'm', externalTtsModel: 't' })+ })+})++describe('Einstellungen: ein Klick traegt LFM3 Audio in Ollama ein', () => {+ it('die Adressen folgen dem eingestellten Ollama', () => {+ expect(ollamaSpeechUrls('http://192.168.1.5:11434/')).toEqual({+ stt: 'http://192.168.1.5:11434/v1/audio/transcriptions',+ tts: 'http://192.168.1.5:11434/v1/audio/speech',+ })+ expect(OLLAMA_SPEECH_MODEL).toBe('lfm3-audio:2b')+ })++ it('Diktat und Vorlesen bekommen Adresse und Modell, die Stimme wird geleert', async () => {+ backend.tauri.on = false+ backend.backendCall.mockImplementation(async (cmd: string) => (cmd === 'installed_piper_voices' ? [] : { available: false }))+ setOllamaBase('http://localhost:11434')+ useVoiceStore.getState().updateVoiceSettings({ sttMode: 'external', ttsMode: 'external', externalTtsVoice: 'alloy' })+ render(createElement(SpeechSettings))+ const knoepfe = screen.getAllByRole('button', { name: 'Use LFM3 Audio in Ollama' })+ expect(knoepfe).toHaveLength(2)+ for (const k of knoepfe) await act(async () => { fireEvent.click(k) })+ expect(useVoiceStore.getState()).toMatchObject({+ externalSttUrl: 'http://localhost:11434/v1/audio/transcriptions',+ externalSttModel: 'lfm3-audio:2b',+ externalTtsUrl: 'http://localhost:11434/v1/audio/speech',+ externalTtsModel: 'lfm3-audio:2b',+ externalTtsVoice: '',+ })+ })+})diff --git a/src/hooks/useVoice.ts b/src/hooks/useVoice.tsindex bdda0c1e..749c959d 100644--- a/src/hooks/useVoice.ts+++ b/src/hooks/useVoice.ts@@ -19,6 +19,7 @@ import {createAudioRecorder,transcribeAudio,transcribeAudioCloud,+ transcribeExternal,getLastTtsStatus,LocalSttError,type AudioRecorder,@@ -115,6 +116,17 @@ export function sttErrorMessage(err: unknown): string {* nothing to transcribe with, so it says so instead of calling a local* Whisper that does not exist there.*/+/**+ * The external speech-to-text endpoint, when it is chosen and complete (N1).+ * Half filled in is not chosen: dictation stays on faster-whisper then, as it+ * was before the switch existed.+ */+export function externalStt(s: { sttMode: string; externalSttUrl: string; externalSttModel: string }): { url: string; model: string } | null {+ const url = s.externalSttUrl.trim();+ const model = s.externalSttModel.trim();+ return s.sttMode === "external" && url && model ? { url, model } : null;+}+export async function transcribeTake(blob: Blob, cloudVoice: boolean): Promise<string> {const store = useVoiceStore.getState();if (!cloudVoice && !hasLocalVoice()) {@@ -139,7 +151,10 @@ export async function transcribeTake(blob: Blob, cloudVoice: boolean): Promise<sreturn "";}}- const transcript = cloudVoice ? await transcribeAudioCloud(blob) : await transcribeAudio(blob);+ const ext = externalStt(store);+ const transcript = cloudVoice+ ? await transcribeAudioCloud(blob)+ : ext ? await transcribeExternal(blob, ext.url, ext.model) : await transcribeAudio(blob);discardFailedTake();store.setTranscript(transcript);// A silent take is not an error, but it must not be silence in the UI@@ -638,7 +653,7 @@ export function useVoice() {// Reactive: the source of truth is the store flag set by the startup probe// (App.tsx) and the in-app install (Settings). Reading a module-level boolean// here was the bug — it never re-rendered when Whisper came up.- const sttSupported = cloudVoice || store.sttAvailable;+ const sttSupported = cloudVoice || store.sttAvailable || externalStt(store) !== null;const ttsSupported = systemVoiceUsable();// Reactive neural-TTS availability (Piper), same model as sttAvailable.@@ -868,7 +883,7 @@ export function useVoice() {// External HTTP TTS engine takes precedence when selected + configured.if (externalReady) {try {- const url = await synthesizeExternal(text, store.externalTtsUrl.trim(), store.externalTtsVoice || undefined);+ const url = await synthesizeExternal(text, store.externalTtsUrl.trim(), store.externalTtsVoice || undefined, store.externalTtsModel || undefined);if (stopped()) return;await playNeuralAudio(url);store.setTtsFallbackReason(null);diff --git a/src/lib/__tests__/chat-model-minimum.test.ts b/src/lib/__tests__/chat-model-minimum.test.tsindex b68b937e..5817e608 100644--- a/src/lib/__tests__/chat-model-minimum.test.ts+++ b/src/lib/__tests__/chat-model-minimum.test.ts@@ -37,7 +37,9 @@ describe('chat catalog minimum', () => {// quants of nine current small models for 8 GB machines.// 31 -> 32 the same day: Gemma 4 E4B HauhauCS Q8_K_P (4.5B), reachable// once the download took the named file instead of resolving by quant.- expect(small.length).toBe(32)+ // 32 -> 40 on 2026-10-30 (N1): LFM3 1.7B, VL 2B, Omni 2B and Audio 2B,+ // each as Ollama tag and as MLX NVFP4 build.+ expect(small.length).toBe(40)const picks = chatRecommendationGroups(models.map(model => [model]))expect(picks.flat().some(isBelowChatMinimum)).toBe(false)expect(picks.length).toBe(models.length - small.length)diff --git a/src/stores/voiceStore.ts b/src/stores/voiceStore.tsindex 521f37ce..8d45927c 100644--- a/src/stores/voiceStore.ts+++ b/src/stores/voiceStore.ts@@ -59,6 +59,17 @@ interface VoiceState {externalTtsUrl: string;/** Voice name passed to the external engine (e.g. "af_bella" / "alloy"). */externalTtsVoice: string;+ /** Model name for the external TTS engine; empty sends OpenAI's "tts-1".+ * Ollama needs its own name here, e.g. "lfm3-audio:2b" (N1). */+ externalTtsModel: string;+ /** Speech-to-text engine for dictation: the local faster-whisper, or an+ * OpenAI-compatible /v1/audio/transcriptions endpoint such as Ollama+ * serving LFM3 Audio (N1). */+ sttMode: "whisper" | "external";+ /** External STT endpoint, e.g. http://localhost:11434/v1/audio/transcriptions. */+ externalSttUrl: string;+ /** Model the external STT endpoint transcribes with, e.g. "lfm3-audio:2b". */+ externalSttModel: string;/** MiniMax voice for the cloud TTS endpoint (appMode 'cloud'). */cloudTtsVoice: string;/** The microphone for dictation and Voice, empty for the system default. */@@ -104,6 +115,10 @@ interface VoiceState {ttsMode: "piper" | "external";externalTtsUrl: string;externalTtsVoice: string;+ externalTtsModel: string;+ sttMode: "whisper" | "external";+ externalSttUrl: string;+ externalSttModel: string;cloudTtsVoice: string;micId: string;micLabel: string;@@ -153,6 +168,10 @@ export const useVoiceStore = create<VoiceState>()(ttsMode: "piper",externalTtsUrl: "",externalTtsVoice: "",+ externalTtsModel: "",+ sttMode: "whisper",+ externalSttUrl: "",+ externalSttModel: "",cloudTtsVoice: "Wise_Woman",micId: "",micLabel: "",@@ -201,6 +220,10 @@ export const useVoiceStore = create<VoiceState>()(ttsMode: "piper",externalTtsUrl: "",externalTtsVoice: "",+ externalTtsModel: "",+ sttMode: "whisper",+ externalSttUrl: "",+ externalSttModel: "",cloudTtsVoice: "Wise_Woman",micId: "",micLabel: "",@@ -228,6 +251,10 @@ export const useVoiceStore = create<VoiceState>()(externalTtsUrl: state.externalTtsUrl,cloudTtsVoice: state.cloudTtsVoice,externalTtsVoice: state.externalTtsVoice,+ externalTtsModel: state.externalTtsModel,+ sttMode: state.sttMode,+ externalSttUrl: state.externalSttUrl,+ externalSttModel: state.externalSttModel,micId: state.micId,micLabel: state.micLabel,loopStartMuted: state.loopStartMuted,