Part of OperationAzura's Darklands Accessibility project. Requires the DOSBox Staging accessibility fork.
DarkText is a screen-reader companion for the DOS game Darklands. It reads the game's story pane and highlighted menu choices using OCR, then speaks them with local Piper voices. It captures the native emulated framebuffer from the companion DOSBox Staging fork, so it does not depend on window focus or desktop screen capture.
- OCR of Darklands narrative text and menu choices
- Fast highlighted-option tracking
- Multi-frame reconstruction for text obscured by the game cursor
- Low-latency Piper speech with a persistent, content-addressed audio cache
- One-shot diagnostics and a continuous reader daemon
- Python 3.11 or newer
piperandaplayavailable onPATH- One or more Piper
.onnxvoice models - The Darklands accessibility fork of DOSBox Staging, listening on localhost
On Debian or Ubuntu, alsa-utils provides aplay. Piper and voice installation
varies by distribution.
python3 -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -e .Configure non-default locations with environment variables:
| Variable | Default |
|---|---|
DOSBOX_API_URL |
http://127.0.0.1:8086 |
DARKTEXT_DATA_DIR |
~/darklands-accessibility (backward compatible) |
DARKTEXT_PIPER_BIN |
piper on PATH, then the existing local installation |
DARKTEXT_VOICE_DIR |
~/.local/share/piper-tts/voices |
With the modified DOSBox running Darklands:
darktext once
darktext once --speak
darktext speak-test
darktext daemonThe daemon announces new dialog and follows the currently highlighted option.
Generated cache files and diagnostics are stored beneath DARKTEXT_DATA_DIR.
python -m unittest discover -s tests -vAudio playback tests require a working sound device, Piper, and voice models;
enable them explicitly with DARKTEXT_RUN_AUDIO_TESTS=1.
DarkText requires GET /api/v1/video/frame from the sibling DOSBox fork. The
server must remain bound to localhost because its broader API exposes emulator
memory and input controls.
MIT. DarkText's runtime dependencies retain their own licenses.