Flere stemmer: nvcc (10 norske talere), flere engelske, svensk og dansk

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Kent 2026-10-06 03:37:46 +02:00
parent 1c3e17afa0
commit ff43624969
3 changed files with 52 additions and 19 deletions

View file

@ -156,10 +156,13 @@ async function api(path, body) {
async function init() {
cfg = await (await fetch('/api/config')).json();
const groups = {};
for (const v of cfg.voices) {
const o = document.createElement('option'); o.value = v.id; o.textContent = v.name; voice.append(o);
if (!groups[v.group]) { groups[v.group] = document.createElement('optgroup'); groups[v.group].label = v.group; voice.append(groups[v.group]); }
const o = document.createElement('option'); o.value = v.id; o.textContent = v.name; groups[v.group].append(o);
}
voice.value = localStorage.getItem('voice') || cfg.default_voice;
if (!voice.value) voice.value = cfg.default_voice;
$('#max').textContent = cfg.max_chars; text.maxLength = cfg.max_chars;
if (cfg.pin_required) { $('#pinbox').style.display = 'block'; $('#pin').value = localStorage.getItem('pin') || ''; }
for (const q of QUICK) {