Bespoke is a language learning tool that helps you both memorize and apply vocabulary in context. Powered by spaced repetition, users are shown sentences that connect words that need practice.
Generative AI can help you create large amounts of custom flashcards for any language pair. Or, if a dataset already exists, jump straight into learning!
Compared to existing flashcard software, this tool is specialized for languages, with the following advantages:
- Depth: Beyond pure memorization, you learn to use vocabulary in sentences.
- Efficiency: A flashcard can have more than one learnable unit.
- Cohesion: Supports receptive (listen/read) and expressive (speak/write) skills. It adjusts your review schedule to account for cross-pollination. 🐝
Bespoke is experimental, and we are still learning how to learn better.
The project consists of 2 parts:
- The LLM calls to generate the collection of learning cards.
- A simple frontend that selects and shows cards to the user.
You may skip this section if you find your languages in Existing datasets.
The command below runs Bespoke with uv. You can also use a different package manager that can read pyproject.toml.
You need FFmpeg installed and an API key. Depending on what keys you export, the model will be chosen. You can use:
GEMINI_API_KEYOPENROUTER_API_KEYandELEVENLABS_API_KEY(text and speech)OPENAI_API_KEY
Example run commands:
apt-get install ffmpeg
export GEMINI_API_KEY=your_key_here
uv run create.py --target="Japanese" --native="English"
You can also use other models, see llm.py. The quality of generated cards varies between providers and models.
First, you need to either create or import cards for your language. From here on, you won't need FFmpeg or your API key anymore. Run this command and a tab should open in your web browser:
uv run learn.py --target="Japanese" --native="English" --difficulty=A1 --use_read_mode
After learning your first card, you can keep learning with a simple
uv run learn.py, or use the full command to choose languages, difficulty and
modes.
Due to browser restrictions, the first card will not autoplay sound. All cards after the first will work as expected.
You can find instructions in languages.py to add languages, both as a target for learning and your native language.
For the target parameter above, try:
- "German"
- "Japanese"
- "Simplified Chinese"
- "Traditional Chinese"
This collection grows as more cards are generated.
| Language Pair | Kaggle Dataset |
|---|---|
| German → Traditional Chinese | bespoke-cards-german-tradchinese |
Download the dataset and unzip it into the cards/ directory, so that the
directory structure looks like, for example:
cards/index_trad_chinese_german.jsoncards/trad_chinese_german/*
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.