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 <noreply@anthropic.com>
This commit is contained in:
@@ -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'); }
|
||||
|
||||
Reference in New Issue
Block a user