Skip to content

This tool allows users to create Anki cards with words, meanings, examples, and IPA pronunciations, and convert text to speech for audio files.

License

Notifications You must be signed in to change notification settings

eujuliu/anki-deck-generator

Repository files navigation

🗃️ Anki Deck Generator

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

Python Version Last Update Issues Forks Stars License

Image Image

Table of Contents

Technologies

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.

Getting Started

Prerequisites

For run this project, you will need the following things:

Installation

For install the Anki Deck Generator you need to run the following commands:

cd anki-deck-generator
make install

Usage

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

Contributing

If you'd like to contribute to this project, please follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b feature/your-feature.
  3. Make your changes and commit them: git commit -m 'Add some feature'.
  4. Push to the original branch: git push origin feature/your-feature.
  5. Create a pull request.

Backlog

  • 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.

Motivation

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.

Author


Julio Martins

Made by Julio Martins 👋🏽 Contact me!

Linkedin Badge Email Badge

(back to top)

About

This tool allows users to create Anki cards with words, meanings, examples, and IPA pronunciations, and convert text to speech for audio files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published