cd /news/developer-tools/anki-migrate-english-notes-to-tts-no… · home topics developer-tools article
[ARTICLE · art-107399] src=perrotta.dev ↗ pub= topic=developer-tools verified=true sentiment=· neutral

anki: migrate English notes to TTS note types

A developer migrated 1,089 English notes in Anki to dedicated note types with British English text-to-speech, removing 7 reverse cards and preserving all review data, using Anki's Python package after AnkiConnect lacked a changeNoteType action. The migration, rehearsed on a database copy, resulted in 1,086 language notes and 3 cloze notes, with integrity check passing and a successful AnkiWeb sync.

read1 min views1 publishedAug 22, 2026

Previously.

Problem statement: migrate my English 🇬🇧 deck to dedicated note types with British English text-to-speech, without adding reverse cards.

I created English Language Card 🇬🇧

with four fields (Front

, Front Example

, Back

, and Striked

) and only one card template:

{{Front}} {{tts en_GB:Front}}

{{#Front Example}}
<br>
<i>{{Front Example}}</i> {{tts en_GB:Front Example}}
{{/Front Example}}

English Grammatik Cloze 🇬🇧

uses the same TTS setup for cloze notes:

{{cloze:Text}} {{tts en_GB:Text}}

AnkiConnect could create both types, but did not expose a changeNoteType

action. I closed Anki and used its own Python package instead. Before changing the collection, I exported the English deck and copied the SQLite database:

4.8M pre-english-note-type-migration-2026-08-22-13.27.44.apkg
9.9M pre-english-note-type-migration-2026-08-22-13.29.08.collection.anki2

The field and template maps did the migration in place:

col.models.change(basic, groups["Basic"], language, {0: 0, 1: 2}, {0: 0})
col.models.change(cloze, groups["Cloze"], english_cloze, {0: 0, 1: 1}, None)

I rehearsed the migration against the database copy before running it for real:

% PYTHONPATH=/Applications/Anki.app/Contents/Resources/app_packages \
  /opt/homebrew/bin/python3.13 /tmp/anki_migrate_english.py \
  ~/Library/Application\ Support/Anki2/User\ 1/collection.anki2
{
  "notes": 1089,
  "cards_before": 1096,
  "cards_after": 1089,
  "language_notes": 1086,
  "cloze_notes": 3,
  "removed_reverse_cards": 7,
  "integrity": "ok"
}

The script also checked every mapped field, retained card ID, and review-log count. After a full upload to AnkiWeb, a normal sync passed.

No reverse cards, and all English notes can now speak for themselves (pun intended!).

🤖 *Drafted with * ∎

/bloggify

.— § —

Reply via [email](mailto:serendipity@perrotta.dev?subject=Reply to: anki: migrate English notes to TTS note types)

── more in #developer-tools 4 stories · sorted by recency
── more on @anki 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/anki-migrate-english…] indexed:0 read:1min 2026-08-22 ·