Skip to main content

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 API is implemented as a DLL (Dynamic Link Library) that can be called from any programming language that supports loading and calling functions from DLLs.
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 the *controllerClient.zip from:

What’s Included

DLL Files

Platform-specific nvdaControllerClient.dll files for x86, x64, and ARM64

Header File

nvdaController.h with C declarations for all functions

Import Libraries

.lib and .exp files for C/C++ linking

Examples

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 ID
  • nvdaController_speakSsml - Speak SSML with markup support
These functions return error code 1717 (RPC_S_UNKNOWN_IF) on NVDA versions older than 2024.1.

Version 1.0

Core functions available in all NVDA versions:
  • Test if NVDA is running
  • Speak text
  • Braille messages
  • Cancel speech

Security Considerations

NVDA runs on the lock screen and secure screens. Before providing information to users via the Controller Client API, check if Windows is locked or on a secure screen to prevent leaking secure data.
Applications should implement security checks:

Core Functions

nvdaController_testIfRunning()

Test if NVDA is running and accessible.
int
0 on success, non-zero Windows error code on failure

nvdaController_speakText(text)

Speak the provided text through NVDA.
wchar_t*
required
The text to speak (wide character string)
int
0 on success, non-zero error code on failure

nvdaController_brailleMessage(message)

Display a message on the user’s braille display.
wchar_t*
required
The message to display in braille
int
0 on success, non-zero error code on failure

nvdaController_cancelSpeech()

Cancel all currently queued speech.
int
0 on success, non-zero error code on failure

nvdaController_getProcessId()

Get the process ID of the running NVDA instance.
DWORD*
required
Pointer to receive the process ID
int
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.
wchar_t*
required
The SSML string to speak
int
Symbol verbosity level (-1 for user’s setting)
int
Speech priority (0 = normal)
bool
Whether to speak asynchronously
int
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 pointer
Function with signature: int callback(wchar_t* markName)
int
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:
Always check the return value of controller client functions and handle errors gracefully. NVDA might not be running, or the user might have disabled it temporarily.

Best Practices

Test Availability

Always call nvdaController_testIfRunning() before other operations

Security 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