Add the VOX prosody preference and panel controls

This commit is contained in:
Fisto
2026-09-21 11:08:22 +02:00
parent ca3fa5be1e
commit 293d131d2b
9 changed files with 101 additions and 17 deletions
+9 -1
View File
@@ -34,6 +34,10 @@ export interface TtsOptions {
words?: boolean;
/** Silence between words in milliseconds, 0 to 500. */
wordGapMs?: number;
/** NetTTS-style VOX prosody (Flextalk voices only). */
vox?: boolean;
/** VOX without the staccato wrapper. */
voxClean?: boolean;
}
export interface TtsEngine {
@@ -348,6 +352,8 @@ export class Tts {
.replace("{echo}", options.echo !== undefined ? String(options.echo) : "")
.replace("{words}", options.words ? "1" : "")
.replace("{word_gap_ms}", options.wordGapMs !== undefined ? String(options.wordGapMs) : "")
.replace("{vox}", options.vox ? "1" : "")
.replace("{vox_clean}", options.voxClean ? "1" : "")
)
: ["espeak-ng", ...(options.voice ? ["-v", options.voice] : []), "-w", out, "-f", textFile];
@@ -371,7 +377,9 @@ export class Tts {
...(options.words ? { VESKSLOP_TTS_WORDS: "1" } : {}),
...(options.wordGapMs !== undefined
? { VESKSLOP_TTS_WORD_GAP_MS: String(options.wordGapMs) }
: {})
: {}),
...(options.vox ? { VESKSLOP_TTS_VOX: "1" } : {}),
...(options.voxClean ? { VESKSLOP_TTS_VOX_CLEAN: "1" } : {})
},
stdio: ["ignore", "ignore", "pipe"]
});