Add the Half-Life VOX/HEV TTS presets
This commit is contained in:
+5
-1
@@ -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"]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user