NetTTS keeps vintage-friendly speech synthesis fun instead of fiddly. It wraps FlexTalk and other SAPI 4.0 voices in a warm GUI that feels equally at home on a Pentium III, modern Windows 10 x64, or a Wine 8+ sandbox running on your favorite Linux box.
- Retro hardware ready – Ship one lightweight executable that behaves on classic Windows installs without a DLL scavenger hunt.
- Pure cross-compiled build – Build everything from Linux with MinGW-w64; no need to chase abandoned Microsoft downloads.
- Bundled speech headers – A known-good
speech.his vendored underthird_party/include/so the toolchain never breaks. - Wine-tested workflow – Mirrors the maintainer's Devuan + Wine environment, making it painless to automate or integrate.
- Download the zipped executable from the Releases page and unpack it somewhere handy.
- Install the Microsoft SAPI 4.0 runtime (
third_party/Dependencies/spchapi.exelives in the repo for safekeeping) if your machine doesn't already have it. - Add the FlexTalk voice by extracting
third_party/Dependencies/flextalk.zipand running the installer. FlexTalk traces its lineage through AT&T, Bell Laboratories, and the successors who have shepherded it since, and the credit belongs with them. - Launch
nettts_gui.exeon Windows or via Wine — for examplewrun ./build/nettts_gui.exein the maintainer's setup.
Want to coax a little melody out of it? The NetTTS sing-along gist has a ready-made script to rick roll.
Need a ready-to-roll Wine XP sandbox with SAPI 4.0, FlexTalk, and NetTTS preinstalled? Run the helper script:
./scripts/winetricks/setup_nettts_prefix.shOr grab the freshest winetricks installer script straight from GitHub and point it at ./nettts alongside your download:
curl -fsSLo setup_nettts_prefix.sh https://raw.githubusercontent.com/h4rm0n1c/NetTTS/main/scripts/winetricks/setup_nettts_prefix.sh \
&& bash setup_nettts_prefix.sh --root-dir "$(pwd)/nettts"By default everything lands under ~/nettts/: the Wine prefix lives in ~/nettts/wineprefix/, helper scripts go into ~/nettts/bin/, configuration in ~/nettts/etc/, and ~/nettts/wineprefix/drive_c/nettts/nettts.log (Windows path C:\nettts\nettts.log) is used for daemon logging via the application's own --log flag. Override the base location with --root-dir <path> (or point at an existing prefix with --wineprefix). The script leans on winetricks to apply winxp, vcrun6, mfc42, and riched20, downloads the SAPI runtime, FlexTalk voice archive, and the v1.0 NetTTS release zip (override with --sapi-url, --flextalk-url, or --nettts-url if you need a different build) into C:\nettts, and attempts to drop a Start Menu shortcut under C\Users\Public\Start Menu\Programs (skipping with a warning if Windows Script Host is unavailable) while seeding utility launchers. FlexTalk's 1997 InstallShield 5 wizard still runs interactively: the helper launches setup.exe, waits for you to finish the GUI install, and then moves on to the remaining setup steps.
~/nettts/bin/nettts-daemon.sh– start/stop the headless TCP server and push test utterances (speak).~/nettts/bin/nettts-gui.sh– launch the GUI build inside the managed prefix.~/nettts/bin/flextalk-controlpanel.sh– pop open the FlexTalk control panel (C\windows\system32\flextalk.cpl).
See docs/winetricks.md for prerequisites (Wine 8+, winetricks, curl, unzip, and optional netcat), detailed options, and daemon tips.
sudo apt-get update
sudo apt-get install -y make mingw-w64 g++-mingw-w64-i686
make -f Makefile.mingw -j"$(nproc)"
# → build/nettts_gui.exeThe resulting binary lands in ./build/ and can be launched on Windows or via Wine ($HOME/bin/wrun ./build/nettts_gui.exe).
By default the build pulls in the bundled header at third_party/include/speech.h. If you have a different SDK you want to test against, point INC_DIR wherever you need:
make -f Makefile.mingw INC_DIR="C:/Program Files/Microsoft Speech SDK/Include" -j"$(nproc)"- Clean builds:
make -f Makefile.mingw clean - Artifacts: Everything lands in
./build/ - Optional extras: If the
Dependencies/folder is present, it may carry installers for the SAPI 4 SDK, runtime, or FlexTalk voice. They're handy for setting up Windows, but thanks to the in-repo header the build stays fully reproducible.
Run nettts_gui.exe --runserver (or press Start server in the GUI) to expose two TCP listeners while the server is running:
- The existing command socket on
--port(default5555). - A lightweight status socket on
--status-port(defaults to--port+1, so5556).
The status socket accepts long-lived clients and pushes a single line per high-level event:
START\nis sent when speech begins (onWM_APP_TTS_TEXT_START).STOP\nis sent when playback drains (onWM_APP_TTS_AUDIO_DONE).
The status socket has no banner; connecting while the TCP server is stopped yields a refusal, and connecting while idle will sit quiet until the first START/STOP event fires.
It's designed for background-music ducking or capture automation. For example, the OBS meme daemon can subscribe on 127.0.0.1:5556, mute/attenuate BGM on START, and restore it on STOP. A minimal consumer looks like:
nc 127.0.0.1 5556 | while read -r line; do
case "$line" in
START) echo "duck bgm" ;; # replace with your OBS control shim
STOP) echo "restore" ;;
esac
doneThanks to valve software as well for making some fucking incredible games.
This application is a love letter to the Win32 application style of the 90s and 2000s that defined the early tech experiences of so many IT nerds like me.
Developed with the assistance and insight of ChatGPT and then ChatGPT Codex once it grew beyond a single main.cpp.
