This add-on adds the speech synthesizer from Creative Labs' Dr. Sbaitso (1990) to NVDA.
Rather than reimplementing the synthesizer, this add-on runs the original 16-bit DOS speech engine — First Byte's SmoothTalker 3.5 — inside the Unicorn CPU emulator.
The bundled engine image is a snapshot of DOS conventional memory taken
with the SBTALKER TSR already resident. It is mapped verbatim at
linear address 0, so every far pointer inside it remains valid. NVDA's text is
written into the engine's own text buffer and the speech entry point is called
exactly as SBAITSO2.EXE called it in 1990.
The engine drives what it believes is a Sound Blaster. The add-on emulates just enough of the DSP and the 8237 DMA controller to capture the audio the card would have played: the DSP time constant gives the sample rate, and each programmed DMA block is read straight out of emulated memory. That audio is converted to 16-bit, resampled to 22050 Hz and handed to NVDA's audio output.
The emulator is built once and kept resident for the life of NVDA. The engine is a TSR — the original software called it repeatedly without reloading — so reusing it is exactly what it was designed for, and it avoids re-mapping a megabyte and rewriting the 640 KB image on every utterance.
Audio is also streamed: each DMA block is handed to NVDA's output as soon as the engine produces it, so playback begins long before a long sentence has finished rendering. Audio starts in roughly 12–35 ms regardless of how much text was sent; overall synthesis runs about 15 times faster than real time on a worker thread.
The engine keeps its settings in a five-word block that the original
Dr. Sbaitso filled with 0, 0, 5, 5, 5. Sweeping each word and
measuring the resulting audio identified three of them:
The field names below are First Byte's own: READ.EXE and
SET-ECHO.EXE both embed the structure's field list
(gender, tone, volume, pitch, speed, startpos, action), and
Dr. Sbaitso's PARAM command documents the ranges as
"tvps are 4 digits representing: Tone/Volume/Pitch/Speed".
| Field | Exposed as | Range | Effect |
|---|---|---|---|
| gender | — | — | no effect; this is the male-voice build of SmoothTalker 3.5 |
| tone | Tone | 0/1 | on cuts the low end — thinner and brighter |
| volume | Volume | 0–9 | quiet to loud; does not clip |
| pitch | Pitch | 0–9 | about 41 Hz to 154 Hz |
| speed | Rate | 0–9 | 1.91 s to 0.81 s for a fixed phrase |
There is no intonation setting, because the engine has no such control. It does produce intonation of its own accord — pitch moves over roughly 48–110 Hz within an utterance from SmoothTalker's prosody rules — but unlike eSpeak there is no knob for how much.
NVDA's sliders are declared over the engine's own 0–9 range rather than the usual 0–100, with 5 as the default (Tone is a slider too, with just the two positions 0 and 1). Nothing is rescaled, so every setting the engine has is individually reachable and the numbers you see are the engine's actual values. The settings ring steps by one unit at a time instead of NVDA's usual 5; page up and page down in the Voice settings dialog move by 3.
Settings appear, both in the dialog and in the settings ring, in the order Rate, Pitch, Tone, Volume.
Upgrading from 0.4.x: the settings range changed, so any previously saved rate, pitch and volume values will be reset to the default of 5.
Each utterance carries a generation number, and cancelling bumps it, permanently invalidating anything queued or already being rendered. Audio is handed to the sound output in small slices with a staleness check between each, so interrupting NVDA — pressing a command twice quickly, or arrowing rapidly through a list — stops the old speech immediately instead of letting a trailing fragment through.
SmoothTalker is © 1983-1990 First Byte. The two patents it was originally covered by (U.S. 4,692,941 and 4,617,645) have long expired, but the engine code and voice data remain under copyright. The bundled engine image is derived from an original Creative Labs distribution and is included here for personal use; it should be removed before redistributing this add-on publicly.
Unicorn is licensed under the GPLv2.