Thai Reading Add-on

AnkiWeb addon 1603467171

Adds tone-coloured Thai readings (RTGS, IPA, or Paiboon) to vocabulary cards by auto-injecting CSS and JavaScript into card templates, with configurable fields and a toggle shortcut.
AI-generated summary; may contain mistakes.

card-creationformattingshortcutscard-templatesdictionary

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (👍 0 · 👎 0)
Updated
2026-06-19
Anki versions
25.09.2~
License
GPL-3.0 (from the GitHub repository)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JavaScript, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-06-19 (135 days before the snapshot).
  • Test files: 12.
  • GitHub Actions workflows: 1.
  • Commits in the last year: 22.
  • Issues: 1 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
25.09.2+2026-06-19
History across monthly snapshots

Loading…

Similar addons

Japanese Note Auto-Generator

Auto-generates Japanese vocabulary notecards from a word list via the Jisho.org API, including definitions, readings, JLPT level, kanji explanations, furigana and example sentences, placed in a custom deck.

card-creationdictionary

2 votes 0% approval 👍 0 · 👎 2 Anki 2.1.16~ Updated 2021-05-23
Anki Dictionary Add-on

Provides an in-Anki dictionary window for searching installed Yomichan/Migaku dictionaries, generating LLM definitions, fetching images and audio, and exporting results to note fields or cards.

card-creationaiexportappearancedictionary

4 votes 15% approval 👍 2 · 👎 2 ⭐ 13 Anki 25.09.2~ Updated 2026-04-11
Vocabulary En-Ar Flashcards Generator

Generates complete Anki flashcards from a single word, filling fields with dictionary definitions, pronunciation, synonyms, examples, English-Arabic translation, and images without AI.

card-creationdictionary

1 votes 21% approval 👍 1 · 👎 0 Anki 2.1.1~ Updated 2026-03-30

Description


Adds tone-coloured phonetic readings to your Thai vocabulary cards. Generates RTGS, IPA, or Paiboon transcriptions automatically and injects the CSS/JS needed to colour each syllable by tone — straight into your card templates.



Features

  • Tone-coloured readings — RTGS, IPA, and Paiboon, each with 5 configurable tone colours
  • Automatic template injection — CSS and JavaScript are added to your card templates for you, no manual editing required
  • Active Fields system — choose exactly which note types, card types, fields, and sides get processed
  • Smart segmentation — greedy-lookahead tokenization matches words against the bundled pronunciation dictionary
  • Two RTGS display styles — diacritic tone marks (chǎn) or digit suffixes (chan5)
  • One-key toggle — show/hide readings with a configurable shortcut (default F9)

Reading Systems

RTGS (Royal Thai General System) — the official Thai romanization standard.
IPA (International Phonetic Alphabet) — precise phonetic transcription with tone letters.
Paiboon — a learner-friendly system using tone diacritics on vowels.

Tone colouring works from the underlying tone data regardless of which system or display style you choose, so you can switch freely without losing the colour coding.

Configuration

All settings are available under Tools → Thai Reading Settings, including reading type, font size, tone colours, RTGS tone style, keyboard shortcut, and per-field activation rules. No need to edit config files by hand.

Links

README

Thai Reading Addon

An Anki add-on for Thai learners — generates tone-coloured readings (RTGS / IPA / Paiboon) and injects CSS/JS into card templates.

AnkiWeb License


Features

  • Tone-coloured readings — RTGS, IPA, and Paiboon with 5 configurable Thai tone colours
  • Template injection — Auto-injects CSS and JavaScript into card templates for tone colouring
  • Active Fields system — Configure which note types, card types, fields, and sides get processed
  • Segment & lookup — Greedy-lookahead tokenization for dictionary matching

Reading Systems

IPA (International Phonetic Alphabet)

/tɕʰan˩˩˦ tɕʰɔːp̚˥˩ kin˧ kʰaːw˥˩ pʰat̚˨˩ maːk̚˥˩ kʰrap̚˦˥/

Precise phonetic transcription with tone letters.

Paiboon (learner-friendly)

chǎn chɔ̂ɔp gin kâao pàt mâak kráp

Tone diacritics on vowels, doubled for length.

RTGS Tone Display

The addon's dictionary stores RTGS readings in a digit-suffix format (sa2 wat2 di1), where each digit maps to a Thai tone class. Readings can be displayed in two styles:

Style Example Description
marks (default) chǎn chóp kin khâao phàt mâak khráp Digits replaced with conventional tone diacritics on the syllable's vowel
numbers chan5 chop3 kin1 khao3 phat2 mak3 khrap4 Raw digit suffix per syllable, as stored in the dictionary

Tone colours always work from the underlying tone number regardless of which reading system or display style is selected. Switch between Reading systems and styles via Tools → Thai Reading Settings.


Visual Reference

A demo page showing all display types, reading types, and tone colours is available in demo/index.html.

Display options preview


Configuration

Access settings via Tools → Thai Reading Settings or through Anki's add-on config editor.

Key Type Default Description
ReadingType "rtgs" | "ipa" | "phonetics" "rtgs" Default reading system
FontSize int (1–200) 75 Reading font size as % of base text
ThaiTones [str; 5] ["#78716C","#0F766E","#B91C1C","#D97706","#7C3AED"] Colours for tones 1–5 (Mid, Low, Falling, High, Rising)
RtgsToneStyle "marks" | "numbers" "marks" Tone marks on vowels (sà) or digit suffix (sa2)
AutoCssJsGeneration bool true Auto-inject CSS/JS into card templates
ShortcutKey str "F9" Keyboard shortcut for toggle reading (set "" to disable)
Profiles [str] ["all"] Anki profiles the addon is active on
UseFileReferences bool false Write CSS/JS as standalone files in collection.media
ActiveFields [str] [] Entries: display;profile;noteType;cardType;field;side;readingType

Dependencies

Pronunciation dictionary

These populate db/thai_dict.sqlite:

Dependency Role
thaiphon ≥0.6.0 Thai phonetic transcription engine — RTGS and IPA rendering, syllable analysis, tone detection
thaiphon-data-volubilis ≥0.2.0 ~84k word Thai pronunciation lexicon (optional but recommended)

Run uv run python db/populate_dict.py to build the dictionary.

Runtime

No additional pip dependencies. Uses PyQt6, aqt, and anki provided by the Anki environment.

Development tooling

Tool Purpose
ruff Linter and formatter
pytest Unit test runner
pytest-anki2 Integration test fixtures
ty Static type checker

Development

uv venv .venv
source .venv/bin/activate
uv sync

# Populate pronunciation dictionary
uv run python db/populate_dict.py

# Run checks
python dev.py lint        # ruff linter
python dev.py typecheck   # ty type checker
python dev.py test-unit   # fast unit tests (no Anki)
python dev.py test        # full test suite (needs Anki)
python dev.py build       # .ankiaddon package
python dev.py ci          # full CI pipeline

License

GNU AGPLv3 — see LICENSE.