Add the Half-Life VOX/HEV TTS presets
This commit is contained in:
+14
-1
@@ -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());
|
||||
|
||||
@@ -556,6 +556,15 @@
|
||||
<input id="tts-word-gap" type="range" min="0" max="500" step="10" value="120" />
|
||||
<span id="tts-word-gap-value" class="vk-mono vk-dim">120ms</span>
|
||||
</div>
|
||||
<div class="vk-profile-row">
|
||||
<span class="vk-micro-label">preset</span>
|
||||
<select id="tts-preset" class="input">
|
||||
<option value="">factory</option>
|
||||
<option value="vox">VOX (Black Mesa)</option>
|
||||
<option value="hev">HEV suit</option>
|
||||
</select>
|
||||
<span class="vk-mono vk-dim">Keith Bell</span>
|
||||
</div>
|
||||
<div class="vk-profile-row">
|
||||
<label class="vk-tts-check">
|
||||
<input id="tts-vox" type="checkbox" /> VOX prosody
|
||||
|
||||
Reference in New Issue
Block a user