From 63def53f28a3d521da7646ec62ce9f3c99630809 Mon Sep 17 00:00:00 2001 From: Fisto Date: Tue, 22 Sep 2026 19:48:23 +0200 Subject: [PATCH] Name the profile default in the reset wording --- CURRENT.md | 8 +++++--- poc/public/app.js | 14 ++++++++++++-- poc/public/index.html | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CURRENT.md b/CURRENT.md index 2916924..b519fc6 100644 --- a/CURRENT.md +++ b/CURRENT.md @@ -41,11 +41,13 @@ mobile draft at 390px. cap, one attempt) run after every walk in both modes. Live run `...-20260916090722`: `previewed: 2`; thumbs served over `/api/media///thumb` (200). - [x] C82 Double-click resets in the voice settings. Every slider in the TTS panel resets on - double-click: the voice-character profile sliders (to the engine default from the voice list), - expression (default, and the override is truly cleared so the label reads `default`), speed + double-click: the voice-character profile sliders (to the voice's **profile default**), + expression (the profile default, and the override is truly cleared so the label reads + `default`), speed (1), pitch (0), volume (100), highpass (40), echo (off), and word gap (120 ms). Hints say so: "within 2 snaps to default · double-click a slider to reset it" in Voice character and - "VOX / HEV · double-click resets" in Radio kit, plus a title on the profile sliders. Also + "VOX / HEV · double-click resets" in Radio kit. The profile and expression sliders show the + target in the tooltip, for example `Double-click to reset to the profile default (3)`. Also fixed: the speech status and preferences now load at startup (`refreshAudio()`), so the panel and settings show real values before the first open — the profile defaults were empty until then, which would have made the profile reset do nothing. Verified in a browser; the UI smoke diff --git a/poc/public/app.js b/poc/public/app.js index 8bc0a81..28aeede 100644 --- a/poc/public/app.js +++ b/poc/public/app.js @@ -2145,7 +2145,7 @@ function buildProfileSliders() { const slider = el("input", { type: "range", min: String(min), max: String(max), step: "1" }); slider.id = `tts-profile-${key}`; slider.dataset.key = key; - slider.title = "Double-click to reset to the engine default"; + slider.title = "Double-click to reset to the profile default"; const value = el("span", { class: "vk-mono vk-dim", text: "default" }); root.append( @@ -2200,14 +2200,20 @@ function fillProfileControls() { const slider = $(`#tts-profile-${key}`); if (!slider) continue; + const engineDefault = state.profileDefaults?.[key]; + if (typeof stored[key] === "number") { slider.value = stored[key]; slider.dataset.dirty = "1"; } else { - const engineDefault = state.profileDefaults?.[key]; if (typeof engineDefault === "number") slider.value = engineDefault; slider.dataset.dirty = ""; } + + slider.title = + typeof engineDefault === "number" + ? `Double-click to reset to the profile default (${engineDefault})` + : "Double-click to reset to the profile default"; const value = slider.parentElement?.querySelector(".vk-mono"); if (value) value.textContent = slider.dataset.dirty === "1" ? slider.value : "default"; } @@ -2287,6 +2293,10 @@ function syncVoiceControls(voices, selected) { const expressive = !!voice?.supportsExpression; state.profileDefaults = voice?.profileDefaults ?? {}; state.expressionDefault = typeof voice?.expressionDefault === "number" ? voice.expressionDefault : null; + $("#tts-expression").title = + typeof state.expressionDefault === "number" + ? `Double-click to reset to the profile default (${state.expressionDefault})` + : "Double-click to reset to the profile default"; if (expressive) fillProfileControls(); { diff --git a/poc/public/index.html b/poc/public/index.html index e0c26bd..f67e5bc 100644 --- a/poc/public/index.html +++ b/poc/public/index.html @@ -568,7 +568,7 @@
Voice character - within 2 snaps to default · double-click a slider to reset it + within 2 of the profile default snaps to default · double-click a slider to reset it