Let word mode combine with the VOX preset
This commit is contained in:
+2
-6
@@ -2031,7 +2031,6 @@ function fillProfileControls() {
|
||||
$("#tts-vox").checked = state.speech.vox === true;
|
||||
$("#tts-vox-clean").checked = state.speech.voxClean === true;
|
||||
$("#tts-vox-clean").disabled = state.speech.vox !== true;
|
||||
$("#tts-words").disabled = state.speech.vox === true;
|
||||
const gap = Number(state.speech.wordGapMs);
|
||||
$("#tts-word-gap").value = Number.isFinite(gap) && state.speech.wordGapMs !== null ? gap : 120;
|
||||
$("#tts-word-gap-value").textContent = `${$("#tts-word-gap").value}ms`;
|
||||
@@ -2744,17 +2743,14 @@ function init() {
|
||||
$("#tts-words").addEventListener("change", () => void saveSpeech());
|
||||
$("#tts-vox").addEventListener("change", () => {
|
||||
$("#tts-vox-clean").disabled = !$("#tts-vox").checked;
|
||||
$("#tts-words").disabled = $("#tts-vox").checked;
|
||||
// The vox preset implies VOX; turning VOX off means "factory/custom" again.
|
||||
if (!$("#tts-vox").checked && $("#tts-preset").value === "vox") $("#tts-preset").value = "";
|
||||
void saveSpeech();
|
||||
});
|
||||
$("#tts-preset").addEventListener("change", () => {
|
||||
// Picking the VOX preset turns on VOX prosody so the panel matches the engine.
|
||||
// Picking the VOX preset turns on VOX prosody as a default. Word mode still wins
|
||||
// for word-by-word delivery, and turning VOX off keeps the preset.
|
||||
if ($("#tts-preset").value === "vox") {
|
||||
$("#tts-vox").checked = true;
|
||||
$("#tts-vox-clean").disabled = false;
|
||||
$("#tts-words").disabled = true;
|
||||
}
|
||||
void saveSpeech();
|
||||
});
|
||||
|
||||
+3
-1
@@ -381,7 +381,9 @@ export class Tts {
|
||||
...(options.wordGapMs !== undefined
|
||||
? { VESKSLOP_TTS_WORD_GAP_MS: String(options.wordGapMs) }
|
||||
: {}),
|
||||
...(options.vox ? { VESKSLOP_TTS_VOX: "1" } : {}),
|
||||
// Always defined, so an explicit "off" is not overridden by the wrapper's
|
||||
// preset implication (which only fires when the variable is unset).
|
||||
VESKSLOP_TTS_VOX: options.vox ? "1" : "0",
|
||||
...(options.voxClean ? { VESKSLOP_TTS_VOX_CLEAN: "1" } : {}),
|
||||
...(options.preset ? { VESKSLOP_TTS_PRESET: options.preset } : {})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user