SanamLuang


An NVDA add-on to help correct common Thai text reading errors


Author: Chai Chaimee

Repository: https://github.com/chaichaimee/SanamLuang

Description

SanamLuang is an add-on for the NVDA screen reader designed to address frequent errors in reading Thai text. These errors often occur due to:

Such mistakes frequently cause synthesizers to pronounce Thai text incorrectly.

Hotkeys

NVDA+Shift+F4 → Open the SanamLuang settings window
NVDA+Shift+F4 (when text is selected or the entire document is highlighted) → Automatically correct all spelling/vowel/tone mark errors in the selected text
Double-press NVDA+Shift+F4 quickly → Toggle SanamLuang's error reading mode on/off

How it works

Once installed, SanamLuang starts working immediately. It reads out misplaced or incorrect vowel signs and tone marks according to its built-in initial dictionary.

Users can add their own misspelled/incorrectly positioned words through the settings window (opened with NVDA+Shift+F4), functioning similarly to NVDA's built-in speech dictionary.

To completely disable SanamLuang's reading of errors, quickly double-press NVDA+Shift+F4. You will hear "SanamLuang off" and the reading will return to default NVDA behavior.

For OCR-processed documents

When working with scanned documents (OCR results), users can easily fix common vowel/tone mark positioning errors such as:

ํา   ํ่า   ํ้า   เเ   etc.

Simply select all text (Ctrl+A), then press NVDA+Shift+F4. SanamLuang will automatically scan and correct all specified vowel/tone mark positioning errors throughout the document (only for entries defined in its dictionary — which you can expand yourself).

This saves users from having to manually correct each occurrence one by one.

Additional benefits

Besides correcting documents, SanamLuang also helps normalize spelling and pronunciation for Thai text commonly found on social media, where users intentionally alter words to avoid content filtering or blocking, for example:

This greatly improves the reading accuracy of speech synthesizers when encountering the increasingly complex and distorted forms of written Thai found across various online platforms and communication channels.