Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nvaccess/nvda/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
The NVDA Controller Client API allows external applications to communicate with NVDA, enabling them to:- Speak text programmatically
- Display braille messages
- Cancel speech
- Check if NVDA is running
- Speak SSML (Speech Synthesis Markup Language)
The Controller Client API is primarily designed for applications that want to provide their own accessibility layer or need to communicate information directly to NVDA users.
Getting the API
- Download Pre-built
- Build from Source
Download the
*controllerClient.zip from:- Latest stable release
- GitHub Actions artifacts for development versions
What’s Included
DLL Files
Platform-specific
nvdaControllerClient.dll files for x86, x64, and ARM64Header File
nvdaController.h with C declarations for all functionsImport Libraries
.lib and .exp files for C/C++ linkingExamples
Sample code in Python, C, C#, and Rust
API Versions
Version 2.0 (NVDA 2024.1+)
Added support for:nvdaController_getProcessId- Get NVDA’s process IDnvdaController_speakSsml- Speak SSML with markup support
Version 1.0
Core functions available in all NVDA versions:- Test if NVDA is running
- Speak text
- Braille messages
- Cancel speech
Security Considerations
Applications should implement security checks:Core Functions
nvdaController_testIfRunning()
Test if NVDA is running and accessible.0 on success, non-zero Windows error code on failure
nvdaController_speakText(text)
Speak the provided text through NVDA.The text to speak (wide character string)
0 on success, non-zero error code on failure
nvdaController_brailleMessage(message)
Display a message on the user’s braille display.The message to display in braille
0 on success, non-zero error code on failure
nvdaController_cancelSpeech()
Cancel all currently queued speech.0 on success, non-zero error code on failure
nvdaController_getProcessId()
Get the process ID of the running NVDA instance.Pointer to receive the process ID
0 on success, 1717 if not supported, other non-zero on failure
Available in NVDA 2024.1 and later
nvdaController_speakSsml()
Speak SSML (Speech Synthesis Markup Language) with support for prosody, marks, and breaks.The SSML string to speak
Symbol verbosity level (-1 for user’s setting)
Speech priority (0 = normal)
Whether to speak asynchronously
0 on success, 1717 if not supported, other non-zero on failure
Available in NVDA 2024.1 and later
nvdaController_setOnSsmlMarkReachedCallback()
Set a callback function to be called when SSML marks are reached.Function with signature:
int callback(wchar_t* markName)0 on success, non-zero error code on failure
Complete Examples
Python Example
C Example
example_c.c
C# Example
Program.cs
Error Handling
All functions return 0 on success and a non-zero Windows error code on failure. Common error codes:| Error Code | Meaning |
|---|---|
| 0 | Success |
| 1717 | RPC_S_UNKNOWN_IF - Function not supported in this NVDA version |
| Other | Standard Windows error codes (use WinError or equivalent to decode) |
Best Practices
Test Availability
Always call
nvdaController_testIfRunning() before other operationsSecurity First
Check for secure desktops before speaking sensitive information
Graceful Degradation
Handle errors gracefully - user might not have NVDA installed
Version Detection
Check return codes to detect unsupported functions on older NVDA versions
Use Cases
Progress Notifications
Form Validation
Status Updates
License
The NVDA Controller Client API is licensed under the GNU Lesser General Public License (LGPL), version 2.1. This means:- ✅ You can use this library in any application (commercial or open source)
- ✅ You can distribute the DLL with your application
- ⚠️ If you modify the library, you must contribute changes back under LGPL 2.1
View Full License
Read the complete LGPL 2.1 license text
Additional Resources
Example Code
Complete working examples in multiple languages
Header File
nvdaController.h with full API documentation
Download Client
Download pre-built controller client DLLs
GitHub Issues
Report issues or request features
