Add the Half-Life VOX/HEV TTS presets

This commit is contained in:
Fisto
2026-09-21 11:20:24 +02:00
parent 293d131d2b
commit ac23ee712a
9 changed files with 85 additions and 10 deletions
+14 -1
View File
@@ -2027,6 +2027,7 @@ function fillProfileControls() {
$("#tts-echo-value").textContent = Number($("#tts-echo").value) > 0 ? $("#tts-echo").value : "off";
$("#tts-words").checked = state.speech.words === true;
$("#tts-preset").value = state.speech.preset ?? "";
$("#tts-vox").checked = state.speech.vox === true;
$("#tts-vox-clean").checked = state.speech.voxClean === true;
$("#tts-vox-clean").disabled = state.speech.vox !== true;
@@ -2064,7 +2065,8 @@ function effectOptions() {
words: $("#tts-words").checked,
wordGapMs: Number($("#tts-word-gap").value),
vox: $("#tts-vox").checked,
voxClean: $("#tts-vox-clean").checked
voxClean: $("#tts-vox-clean").checked,
preset: $("#tts-preset").value || null
};
}
function syncVoiceControls(voices, selected) {
@@ -2743,6 +2745,17 @@ function init() {
$("#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.
if ($("#tts-preset").value === "vox") {
$("#tts-vox").checked = true;
$("#tts-vox-clean").disabled = false;
$("#tts-words").disabled = true;
}
void saveSpeech();
});
$("#tts-vox-clean").addEventListener("change", () => void saveSpeech());