An mIRC library to wrap Tolk for speech output via screen reader APIs.
This project is licensed under the GNU Lesser General Public License (LGPL), V3.0. This is for maximum compatibility with Tolk, which is licensed LGPL V3.
Many thanks to Davy Kager for writing the Tolk library.
Copy mirctolk.dll, Tolk.dll, dolapi32.dll, nvdaControllerClient32.dll, and SAAPI32.dll to the directory where mIRC.exe resides. For your convenience, prebuilt binaries can be found in the bin directory of this repository.
The DLL provides the following functions.
- output - Speak and braille a string.
- output_interrupt - Cancel speech, then speak and braille a string.
- speak - Speak a string.
- speak_interrupt - Cancel speech, then speak a string.
- braille - Braille a string.
- silence - Cancel speech.
- detect_screenreader - Return the name of the currently running screen reader or NULL.
- try_sapi - If '1' is passed to this function, SAPI will be added to the end of the list of possible speech outputs.
- prefer_sapi - If '1' is passed to this function and try_sapi is enabled, Tolk will try speaking text using SAPI before any other outputs.
Speak and braille some text:
/dll tolkbridge.dll output Hello world!
Print the name of the currently running screen reader:
//echo $dll(tolkbridge, detect_screenreader, $null)
In order to build mirctolk.dll from source, do the following.
- Either build Tolk from source, or download the most recent binary release.
- Copy the following files from the Tolk distribution to the src directory of this repository.
- Tolk.dll from bin\x86
- Tolk.lib from bin\x86 (Needed if compiling with MSVC)
- dolapi32.dll from lib\x86
- nvdaControllerClient32.dll from lib\x86
- SAAPI32.dll from lib\x86
- Tolk.h from src
- Either run compile-gcc.bat or compile-msvc.bat, depending on the compiler being used. Note that the batch scripts expect the compiler to be in the path.