Add the VOX prosody preference and panel controls
This commit is contained in:
+13
-1
@@ -2027,6 +2027,10 @@ function fillProfileControls() {
|
||||
$("#tts-echo-value").textContent = Number($("#tts-echo").value) > 0 ? $("#tts-echo").value : "off";
|
||||
|
||||
$("#tts-words").checked = state.speech.words === true;
|
||||
$("#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`;
|
||||
@@ -2058,7 +2062,9 @@ function effectOptions() {
|
||||
highpass: Number($("#tts-highpass").value),
|
||||
echo: Number($("#tts-echo").value),
|
||||
words: $("#tts-words").checked,
|
||||
wordGapMs: Number($("#tts-word-gap").value)
|
||||
wordGapMs: Number($("#tts-word-gap").value),
|
||||
vox: $("#tts-vox").checked,
|
||||
voxClean: $("#tts-vox-clean").checked
|
||||
};
|
||||
}
|
||||
function syncVoiceControls(voices, selected) {
|
||||
@@ -2734,6 +2740,12 @@ function init() {
|
||||
$(`#${id}`).addEventListener("change", () => void saveSpeech());
|
||||
}
|
||||
$("#tts-words").addEventListener("change", () => void saveSpeech());
|
||||
$("#tts-vox").addEventListener("change", () => {
|
||||
$("#tts-vox-clean").disabled = !$("#tts-vox").checked;
|
||||
$("#tts-words").disabled = $("#tts-vox").checked;
|
||||
void saveSpeech();
|
||||
});
|
||||
$("#tts-vox-clean").addEventListener("change", () => void saveSpeech());
|
||||
$("#profile-open").addEventListener("click", () => {
|
||||
const panel = document.querySelector(".vk-profile-panel");
|
||||
if (panel) {
|
||||
|
||||
@@ -556,6 +556,19 @@
|
||||
<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">
|
||||
<label class="vk-tts-check">
|
||||
<input id="tts-vox" type="checkbox" /> VOX prosody
|
||||
<span
|
||||
class="vk-info"
|
||||
title="NetTTS-style Black Mesa delivery for the Flextalk voices: sentence breaks, lead-ins, weighted pauses, and vendor tags. Needs python3. Overrides word mode."
|
||||
>i</span
|
||||
>
|
||||
</label>
|
||||
<label class="vk-tts-check">
|
||||
<input id="tts-vox-clean" type="checkbox" /> clean (no stutter)
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
<section class="vk-profile-section">
|
||||
<div class="vk-section-head">
|
||||
|
||||
Reference in New Issue
Block a user