Using DECtalk with textweaver
DECtalk is the classic formant synthesizer, known for voices such as Perfect Paul, Beautiful Betty, and Huge Harry. textweaver can speak with a DECtalk you have installed and highlights each word as DECtalk says it. Because DECtalk is proprietary, textweaver neither includes nor downloads it; you supply your own licensed copy.
The DECtalk support has so far been tested against a stand-in library that imitates DECtalk, not against a licensed DECtalk. If you try it with your copy, the troubleshooting guide explains how to send a report.
What you need
- A licensed DECtalk for your system: DECtalk Software for Windows (from DEC, Force Computers, Fonix, or Access Solutions), or a DECtalk SDK or runtime for Linux. On Windows its library is usually
DECtalk.dllordectalk.dll, with the dictionarydtalk_us.dicin the same folder. On Linux it is usuallylibtts.so. - An engine host to run it in. A 64-bit DECtalk runs in a copy of
twor the app started in its hidden--engine-hostmode. A 32-bit DECtalk, the usual kind on Windows, runs intextweaver-host-x86.exe, which is part of the release package; if you build textweaver yourself,cargo xtask hostsbuilds and installs it.
Letting textweaver find DECtalk
With no configuration, textweaver searches the usual install folders. On Windows these are:
DECtalk,Fonix\DECtalk, andFonix DECtalkinsideProgram FilesandProgram Files (x86);dectalk.dllinWindows\System32andWindows\SysWOW64.
On Linux they are /usr/lib, /usr/local/lib, and /opt/dectalk/lib, where textweaver looks for libtts.so or libdectalk.so.
If your DECtalk is installed elsewhere, name its library with an environment variable.
On Windows, in a command prompt:
setx TEXTWEAVER_DECTALK_LIBRARY "C:\Path\To\DECtalk.dll"
Then open a new command prompt, because setx affects only sessions started afterward.
On Linux, for the current shell (add the line to your shell's startup file to keep it):
export TEXTWEAVER_DECTALK_LIBRARY=/path/to/libtts.so
Alternatively, name it in your settings file, where it persists:
[speech.dectalk]
library = "C:\\Path\\To\\DECtalk.dll"
The environment variable takes precedence over the setting, and the setting over the usual folders.
To check what textweaver found, run the following; the DECtalk line states whether the engine is available:
tw backends
The 32-bit host, textweaver-host-x86.exe, must sit beside tw and textweaver, as the release package arranges it. To use a host stored elsewhere, name it with the TEXTWEAVER_DECTALK_HOST environment variable.
Choosing DECtalk and a voice
DECtalk is not selected automatically when Eloquence or a Windows SAPI voice is available, so you must choose it. To hear a sentence:
tw speak --backend dectalk "Hello from DECtalk."
To read a document with DECtalk:
tw --backend dectalk book.md
To make DECtalk your permanent engine, set it in settings.toml:
[speech]
backend = "dectalk"
The voices are the nine DECtalk speakers:
dectalk:paul, Perfect Paul (the default)dectalk:harry, Huge Harrydectalk:frank, Frail Frankdectalk:dennis, Doctor Dennisdectalk:betty, Beautiful Bettydectalk:ursula, Uppity Ursuladectalk:wendy, Whispering Wendydectalk:rita, Rough Ritadectalk:kit, Kit the Kid
Pick one with --voice dectalk:betty, or by its short name, such as --voice Betty. tw voices --backend dectalk lists them.
The rate is measured in words per minute, DECtalk's native unit, from 75 to 600. Pitch raises or lowers the speaker's own voice, and volume behaves as with any other voice. Audio export with tw export-audio --backend dectalk produces subtitles timed to each word.
If DECtalk does not start
- "no DECtalk found": textweaver did not find a library. Name it as described above.
- "does not look like a DECtalk library": the file you named is not a DECtalk library. Check the path.
- "DECtalk did not start": the library loaded but refused to start. Confirm that it is licensed on this computer and that its dictionary,
dtalk_us.dic, is in the same folder as the library. - "textweaver-host-x86.exe not found": your DECtalk is a 32-bit library, which requires the 32-bit host. Keep
textweaver-host-x86.exefrom the release package besidetextweaver.exe, or build it withcargo xtask hosts.
About the free DECtalk source
A DECtalk source tree is published on GitHub. Its own license states that the code belongs to Fonix and may be used only under a written license from them, so textweaver does not include it, build it, or test against it. If you point textweaver at a DECtalk library, that choice, and the license it requires, are yours.
See also
- Speech engines and voices: every engine textweaver can use, and how it chooses.
- Audio export: DECtalk gives exact word timing in subtitles.
- Troubleshooting: when no speech is heard.
- ADR-0021: DECtalk through a host process: the design, the licensing rules, and what is not yet verified.
- ADR-0012: The engine host: the protocol between textweaver and the host.
- Documentation index