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
+5 -1
View File
@@ -38,6 +38,8 @@ export interface TtsOptions {
vox?: boolean;
/** VOX without the staccato wrapper. */
voxClean?: boolean;
/** Half-Life profile preset for Keith Bell: vox or hev. */
preset?: "vox" | "hev";
}
export interface TtsEngine {
@@ -354,6 +356,7 @@ export class Tts {
.replace("{word_gap_ms}", options.wordGapMs !== undefined ? String(options.wordGapMs) : "")
.replace("{vox}", options.vox ? "1" : "")
.replace("{vox_clean}", options.voxClean ? "1" : "")
.replace("{preset}", options.preset ?? "")
)
: ["espeak-ng", ...(options.voice ? ["-v", options.voice] : []), "-w", out, "-f", textFile];
@@ -379,7 +382,8 @@ export class Tts {
? { VESKSLOP_TTS_WORD_GAP_MS: String(options.wordGapMs) }
: {}),
...(options.vox ? { VESKSLOP_TTS_VOX: "1" } : {}),
...(options.voxClean ? { VESKSLOP_TTS_VOX_CLEAN: "1" } : {})
...(options.voxClean ? { VESKSLOP_TTS_VOX_CLEAN: "1" } : {}),
...(options.preset ? { VESKSLOP_TTS_PRESET: options.preset } : {})
},
stdio: ["ignore", "ignore", "pipe"]
});