Merge the MicroslopSam engine into the repository

This commit is contained in:
Fisto
2026-09-21 12:16:33 +02:00
parent 51d42b3a16
commit bbb580deea
30 changed files with 8959 additions and 82 deletions
+36 -2
View File
@@ -47,8 +47,32 @@ From `msttsl/mstts.inf` (`[TTSReg]`):
`.COD` codebook, plus shared `DICT_CI.*`, `phondef`, `AMPRULES`, `ENDINGS`.
Extraction: `unshield -O -d extracted x installer/flextalk/data1.cab`
(`-O` = old compression; the archive.org package has no `data2.cab`, so the
final file `WatsonUNInstall.dll` is incomplete).
(`-O` = old compression). The package is single-volume: the original 1997 upload log
(`WS_FTP.LOG`) lists `data1.cab` only, and `-O` extracts all 450 entries with exact
sizes. Without `-O`, unshield's new decompressor reports a phantom "volume 2" and fails
on `MSVCRT.DLL` / `WatsonUNInstall.dll`; with `-O` both are complete, valid PE files.
The `.ENV` files the engine probes (`ae1m11lc.ENV`) were never shipped; synthesis works
without them.
## Latency and output shape (measured 2026-09-16)
- Warm wrapper time: ~410-425 ms per short line (engine call 190-220 ms, ffmpeg measure
~110 ms, apply ~90 ms, profile write ~57 ms when it runs). First (cold) call ~730 ms.
- The Flextalk profile write is cached per voice in the Wine prefix
(`~/.wine-microslopsam/.microslopsam-profile<GUID>.reg`): unchanged profiles skip
`wine reg import`. Recreating the prefix invalidates the cache.
- Fades: the 8 ms fade-in/out is applied to the trimmed file whose 25-30 ms padding
silence is retained, so it shapes silence, not speech. Measured head: first sample
>30 at 22.6 ms, speech (>500) at 29.6 ms, natural ~15 ms attack; tail decays over
~18 ms. No click, no attenuation of the first word.
- Leading hum (default on): 80 ms of 75 Hz at -48 dBFS peak before the engine padding,
to prime Discord's pipeline. Verified 75.0 Hz / -48.0 dBFS, speech onset ~110 ms,
final -18.6 LUFS / -3.0 dBFS, apply pass +~10 ms. `VESKSLOP_TTS_HUM_MS=0` disables and
reproduces the previous output byte-for-byte. Tuning: `_HUM_HZ` (30-200), `_HUM_DB`
(-80..-6; raise toward -36 if a client still gates the start).
The hum bypasses the high-pass/trim chain, so `VESKSLOP_TTS_HIGHPASS` (up to 400 Hz)
cannot remove it (verified at 200 and 400 Hz).
## SAPI4 runtime engine discovery (`speech.dll`)
@@ -105,6 +129,16 @@ final file `WatsonUNInstall.dll` is incomplete).
- VOX mode is Flextalk-only. The wrapper enables it with `VESKSLOP_TTS_VOX=1`
(`VESKSLOP_TTS_VOX_CLEAN=1` drops the stutter wrapper) and it takes precedence
over `VESKSLOP_TTS_WORDS`.
- Half-Life presets (`VESKSLOP_TTS_PRESET=vox|hev`) target Keith Bell only. VOX values
come from NetTTS `nettts_flextalk_vox_profile.reg`: pitch 3, rate 17, prominences 22,
head size 52, volume 70 (factory: 27/33/17/46/100); `vox` also implies VOX prosody.
`hev` (pitch 15, rate 24) is an unverified starting point - HL1 credits the suit
sounds to Kelly Bailey with no published settings.
- Flextalk rate/pitch are applied as **vendor tags** (`\!R` = duration factor,
`\!%` = pitch multiplier), never `-s`/`-p`, because ITTSAttributes override the
registry profile. Neutral values emit no tag, so Veskslop's default sliders
(1.0 / 0) reproduce the preset byte-for-byte. Presets write the full 26-value NetTTS
profile plus `Default Speaker` into both HKCU and HKLM.
- Line-leading `/rate N` and `/pitch N` controls are consumed by the wrapper
(percent, 100 = normal; `<= 2.0` means multiplier). They override the env
speed/pitch and are not spoken; a controls-only line yields 100 ms of silence.