An application to generate Anki decks from a dictionary and text-to-speech data. This tool allows users to create Anki cards with words, meanings, examples, and IPA pronunciations, and convert text to speech for audio files.
Have a question? · Request Feature
This project was built with Python
and Typer
, a library for creating command-line interfaces (CLI). For text-to-speech functionality, it uses the Kokoro-82M
AI model. To search for words, it utilizes the Merriam-Webster Learner's Dictionary API
. The Anki decks are generated using the genakin
library.
For run this project, you will need the following things:
For install the Anki Deck Generator you need to run the following commands:
cd anki-deck-generator
make install
If you only want to run the project directly in the folder you can run the following command for see all the commands:
python -m anki_deck_generator --help
or if you install in your machine run this command:
anki_deck --help
If you'd like to contribute to this project, please follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b feature/your-feature
. - Make your changes and commit them:
git commit -m 'Add some feature'
. - Push to the original branch:
git push origin feature/your-feature
. - Create a pull request.
- Create a place to store words that have already been added to avoid extra work (a CSV with word, status headers).
- Use an offline dictionary to improve performance.
- Allow adding cards to existing decks (currently, a new deck must be created).
- Use default values for IPA, meaning, and example if they are not found in the dictionary.
- Add a Rich progress bar to display what is happening behind the scenes.
In 2025, I set a goal to improve my English. To achieve this, I started a routine of studying for 2 hours every day, divided as follows:
- Reading: 30 minutes.
- Listening: 30 minutes.
- Grammar: 30 minutes.
- Conversation: 30 minutes.
My idea was to take words I didn't know during reading and listening and add them to my Anki deck for later study. However, this process became problematic. To add a new card, I had to look up the word in a dictionary, get the meaning and an example, generate text-to-speech for each, and then transfer everything to Anki in the correct fields.
Basically, it took me 5 minutes to add a new word. So, the best solution was to automate this process.
That's how I decided to create this CLI to automate the creation of my flashcards.
Julio Martins
Made by Julio Martins 👋🏽 Contact me!