Enrich your Anki flashcards with pronunciations from Forvo, directly inside Anki.
- Source code:
src/anki_forvo_enrich/
- Config file used by the add-on:
src/anki_forvo_enrich/config.json
- Anki desktop installed
- Python 3.9+ (Anki bundles Python but a virtualenv is used for development)
- A Forvo API key
Install development dependencies into a per-project venv:
cd anki-forvo-enrich
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Run static checks:
bash setup.sh
This will install deps (if not installed) and run mypy
against src/anki_forvo_enrich/
.
- Create a directory in your Anki add-ons folder, e.g.
anki-forvo-enrich
. - Copy the contents of
src/anki_forvo_enrich/
into that folder. - Restart Anki.
Anki will load the add-on via __init__.py
. A menu entry "Forvo Enrich" will appear under Tools.
- In Anki, go to Tools > Forvo Enrich
- Enter your Forvo API key and language when prompted (saved in the add-on config)
- Use the batch dialog to search notes and enrich them
The add-on stores configuration managed by Anki (mw.addonManager
) and reads defaults from src/anki_forvo_enrich/config.json
.
Key options:
api_key
: Forvo API keylanguage
: default ISO 639-1 language codedefault_search_query
: search used to find notes to enrichtarget_field
: field to append audio toskip_if_has_audio
: skip notes that already contain audioarticles
: per-language articles that will be stripped when querying Forvo
- This repository now only contains the Python Anki add-on. The previous Node/CLI workflow and
addon/
staging folder have been removed. - Logs and build artifacts are ignored via
.gitignore
.