From 5f384af6cf2178756a2a217a1983974e94c923f0 Mon Sep 17 00:00:00 2001 From: "thomas.kopp" Date: Thu, 2 Apr 2026 01:18:26 +0200 Subject: [PATCH] feat: add diarization section to settings page Adds a "Diarisierung" section with an enabled/disabled toggle, HuggingFace token input, and a help link to pyannote/speaker-diarization-3.1. loadConfig() and the save handler now persist diarization settings. Co-Authored-By: Claude Sonnet 4.6 --- frontend/settings.html | 19 +++++++++++++++++++ frontend/settings.js | 7 +++++++ 2 files changed, 26 insertions(+) diff --git a/frontend/settings.html b/frontend/settings.html index 2e2582d..82ab5cc 100644 --- a/frontend/settings.html +++ b/frontend/settings.html @@ -94,6 +94,25 @@ + +
+

Diarisierung

+
+ +
+
+ + +
+

+ Token benötigt Lesezugriff auf + pyannote/speaker-diarization-3.1. +

+
diff --git a/frontend/settings.js b/frontend/settings.js index 23349b7..034a4d9 100644 --- a/frontend/settings.js +++ b/frontend/settings.js @@ -58,6 +58,9 @@ async function loadConfig() { const ollamaUrl = (cfg.ollama && cfg.ollama.base_url) || 'http://localhost:11434'; document.getElementById('ollama-url').value = ollamaUrl; await loadOllamaModels(ollamaUrl, cfg.ollama && cfg.ollama.model); + const diarCfg = cfg.diarization || {}; + document.getElementById('diar-enabled').checked = !!diarCfg.enabled; + document.getElementById('diar-hf-token').value = diarCfg.hf_token || ''; } document.getElementById('refresh-devices-btn').addEventListener('click', loadDevices); @@ -98,6 +101,10 @@ document.getElementById('save-btn').addEventListener('click', async function() { base_url: document.getElementById('ollama-url').value, model: document.getElementById('ollama-model').value, }, + diarization: { + enabled: document.getElementById('diar-enabled').checked, + hf_token: document.getElementById('diar-hf-token').value.trim(), + }, }; const r = await apiFetch('/config', { method: 'PUT', body: JSON.stringify(body) }); if (r.ok) { showToast('Gespeichert'); } else { showToast('Fehler beim Speichern'); }