How NVDA and JAWS Use Text-to-Speech Engines
This article explores how screen readers such as NonVisual Desktop Access (NVDA) and Job Access With Speech (JAWS) bridge the gap between operating systems and blind users by leveraging Text-to-Speech (TTS) engines. It breaks down the process of intercepting system events through accessibility Application Programming Interfaces (APIs), translating visual interface elements into readable text, communicating with speech synthesizers, and outputting low-latency audio to ensure real-time computer navigation.
The Accessibility Tree and System Interception
To verbalize what is on the screen, a screen reader must first understand the user interface. Operating systems like Windows do not expose their interface to screen readers merely as pixels; instead, they maintain a hierarchical structure of accessible elements known as the Accessibility Tree.
Screen readers hook into the operating system using specialized Accessibility APIs, including Microsoft Active Accessibility (MSAA), UI Automation (UIA), and IAccessible2. When an operating system event occurs—such as moving focus to a desktop icon, opening a dialog box, or typing a character—the OS fires an event notification. Both NVDA and JAWS monitor these hooks continuously to identify the focused element, its role (e.g., button, checkbox, link), its state (e.g., checked, disabled, focused), and its accessible name or value.
Text and Attribute Normalization
Once the screen reader retrieves the raw data from the accessibility API, it filters and formats the information into a logical sequence. Screen readers apply internal translation rules based on user settings:
- Role and State Presentation: The screen reader determines how and when to append the element's role (e.g., reading "Submit, button" versus "Button, Submit").
- Phonetic and Pronunciation Dictionaries: User-defined dictionaries replace specific strings, abbreviations, or jargon with phonetic representations before the text reaches the speech synthesizer.
- Symbol and Punctuation Processing: The user's punctuation level settings dictate whether characters such as commas, hyphens, or brackets are spoken aloud or inferred through vocal pauses.
Communicating with Text-to-Speech Engines
After assembling the normalized text stream, the screen reader sends this data directly to a Text-to-Speech (TTS) engine. The screen reader communicates with the synthesizer using standard or proprietary driver interfaces:
- System APIs: Both NVDA and JAWS can utilize native platform synthesizers via Microsoft Speech API (SAPI 5) or the modern Windows OneCore voices.
- Proprietary and Third-Party Drivers: Professional users often prefer high-performance, responsive synthesizers like Eloquence, Vocalizer, or open-source solutions like eSpeak NG. JAWS and NVDA use dedicated software drivers to communicate directly with these engines, bypassing generic OS audio overhead.
Along with the plain text, the screen reader delivers control parameters to the synthesizer. These parameters include pitch, speech rate, volume, and inflections. In some implementations, screen readers embed Speech Synthesis Markup Language (SSML) or synthesizer-specific control codes to adjust pitch dynamically—for instance, raising pitch to indicate an uppercase letter.
Audio Pipeline and Low-Latency Playback
For blind users navigating via keyboard shortcuts, responsiveness is critical. A delay of even 100 milliseconds between a keystroke and speech feedback can make an operating system feel sluggish and difficult to control.
To achieve minimal latency:
- Wave Stream Buffering: Modern TTS engines synthesize audio into small, real-time audio buffers rather than rendering entire sentences at once.
- Audio Interruption Handling: When a user presses an arrow key while the screen reader is speaking, the screen reader instantly sends an interrupt signal to the TTS engine. The synthesizer halts generation immediately, purges the current audio buffer from the sound device, and begins processing the new context.
Through this continuous cycle of event interception, text normalization, synthesizer control, and audio management, NVDA and JAWS convert complex graphical interfaces into immediate acoustic feedback, granting blind users full control over the underlying operating system.