Language Switch (Deck Direction Converter + TTS)

AnkiWeb addon 1905058369

Flips bilingual Anki decks into the opposite language direction and generates offline pronunciation audio using local models, without modifying original decks.
AI-generated summary; may contain mistakes.

card-creationainote-managementdeck-managementcard-templates

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-09-20
Anki versions
2.1.66~
Description language
en

Maintenance

active

  • Last update or commit was 11 days before the snapshot (2026-09-20).
  • The repository has 26 test files.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.12.1.66+2026-09-20
History across monthly snapshots

Loading…

Similar addons

Sengen

Generates Anki flashcards with example sentences, translations, or definitions by entering a word, choosing languages, deck, and optional TTS audio.

card-creationaidictionary

Rating 0 πŸ‘ 0 Β· πŸ‘Ž 0 ⭐ 0 Anki 2.1.1~ Updated 2026-04-19
AI Language Explainer

Generates contextual written explanations and spoken audio for target words in Anki sentence cards using OpenAI models and selectable TTS engines.

card-creationaisync-integration

Rating 10 πŸ‘ 10 Β· πŸ‘Ž 0 ⭐ 9 Anki 2.1.66~ Updated 2025-10-07

README

Deck Direction Converter

An Anki addon that takes an existing bilingual deck and flips its direction β€” for example, turning a Japanese-front/English-back deck into an English-front/Japanese-back deck β€” and generates natural pronunciation audio for the newly-fronted language. Everything runs locally and offline: a local LLM reads the deck's real fields and writes the new card layout, and a local TTS engine generates the audio. No cloud services, no accounts, no data ever leaves your machine.

<img width="1917" height="984" alt="main picture" src="https://github.com/user-attachments/assets/c6507db0-9993-4306-a169-ca9e4fab53a0" />

Why I built this

There are a lot of excellent, carefully-built decks out there for people learning Japanese β€” Core 2000 being a well-known example. But the reverse doesn't really exist: there isn't nearly as much equally well-structured material for people trying to learn English. Rather than build a new English-learning deck from scratch, it seemed simpler to just take a deck that already works β€” good example sentences, good structure, years of community refinement β€” and reverse it: flip which language is on the front, and generate real pronunciation audio for it. That way the quality of the original deck carries over, but now a much wider audience can actually use it.

Current status and limitations

  • Direction-flipping works between any two languages the deck already contains β€” the addon reads the deck's own content to figure out field placement, it isn't hardcoded to Japanese or English.
  • Pronunciation audio currently only works when English ends up as the new front-facing language. The addon's voice list right now only includes English voices, so converting into a non-English front will flip the deck correctly but won't have audio generated for it yet. Adding more languages is a matter of adding more voices, not rebuilding the pipeline β€” it's planned, just not done yet.
  • The core flow (analyze β†’ review β†’ convert β†’ generate audio) is built and tested end-to-end. See TODO.md for the small list of known open issues.

Requirements

  • Anki 2.1.50 or newer (built and verified against 26.08.1)
  • Windows, macOS, or Linux β€” CPU only, no GPU required
  • About 5 GB of free disk space the first time you use it (a local language model and a local text-to-speech voice are downloaded once and cached β€” every run after that is fast and fully offline)

How to use it

  1. Install the addon in Anki (Tools β†’ Add-ons β†’ Install from file…, using the .ankiaddon file β€” see Installing below if you're building it yourself).
  2. Open Tools β†’ Deck Direction Converter…
  3. Pick the deck and note type you want to convert from the dropdowns.
  4. Click Analyze. The first time you do this, it downloads the local language model β€” this can take a while depending on your connection, but only happens once. It reads your deck's real fields and content and works out how the converted card should look.
  5. Review the result in the live preview on the right. You can:
    • Use Hide fields to show or hide individual fields on the card without touching any code.
    • Switch to the HTML view if you want to hand-edit the generated template directly.
  6. Click Convert. This creates a brand-new deck with the flipped direction β€” your original deck, notes, and notetype are never modified or touched in any way.
  7. Click Generate TTS audio. The first time, this downloads the voice model β€” again, only once. It then generates pronunciation audio for every card, with a progress bar and a Stop button; you can stop partway through and pick up again later without redoing finished cards.
  8. Study your new deck like any other.

Licensing

This addon's own code is MIT-licensed (see LICENSE) β€” free to use, modify, and share.

Everything it downloads at runtime was individually checked for license compatibility:

Component License
Piper (TTS engine) MIT
llama.cpp (LLM runtime) MIT
Qwen2.5-7B-Instruct (language model) Apache-2.0
Piper voice en_US-ljspeech-high Public domain
Piper voice en_GB-alba-medium CC BY 4.0 (attribution: "Alba" voice via rhasspy/piper-voices)
ffmpeg (Windows/Linux build, used only to compress generated audio) LGPL-2.1+
ffmpeg (macOS build, same purpose) GPL-3.0+ β€” invoked as a separate subprocess only, never linked into this addon's code, so its license doesn't apply to this addon's own code (the same way any app can shell out to git or ImageMagick without becoming GPL itself)

None of these are bundled in this repository β€” the addon downloads each one from its own official source (GitHub releases, HuggingFace, evermeet.cx for the macOS ffmpeg build) the first time it's needed, and caches it locally.

For developers

The full technical write-up β€” architecture, design decisions, verified Anki/llama.cpp API facts, and the reasoning behind every non-obvious choice in this codebase β€” lives in CLAUDE.md and the docs/ folder. TODO.md tracks known open issues.