Phrase Gym
One phrase in. A speaking exercise out.
You hear “Could you walk me through it?” and want to use it yourself. Send it to Coach, with the original sentence if you have it. Coach builds a card with an explanation, situations that call for the phrase, hints for when you get stuck, and reference audio.
Working through a language course? Give your AI agent a lesson and the Phrase Gym import guide. It picks useful expressions, builds the exercises, reuses suitable recordings from the course, and generates audio where it’s missing. The finished lesson goes straight into your library.
| Say it from a situation |
Reveal and compare |
- Use the phrase in different situations. The same expression can come up in a meeting, a phone call, or a chat with a friend. Say it from the prompt and ask for a hint if the wording escapes you.
- Hear how you said it. Record your reply and play it back alongside the reference. Your takes stay with the phrase so you can revisit them later.
- Go back to what you need. Open a lesson from your course or search for a phrase by wording, meaning, or situation. Practise it on the spot.
Add a phrase with Coach · Import a lesson with your AI agent
Install Phrase Gym · User guide · Use it on your phone
Built on second-language learning research
Before designing Phrase Gym, I reviewed studies on how people learn, recall, and use expressions in a second language. I documented what each study tested, where its findings applied, and which design choices the evidence could support. That work shaped the core practice loop, down to what a card shows and when it offers help.
- Bring the same phrase back in different situations. In vocabulary experiments, changing the practice sentences improved recall, even though learners expected repeating them to work better. In Phrase Gym, “So far, so good” can be an answer about a report or a group ride. Variable retrieval study
- Say the reply before hearing it. In a study of second-language requests, accuracy gains carried across listening and speaking tasks, while speed gains stayed with the task learners had practised. That’s why speaking is part of the recall step itself. Listening and speaking study
- Give the meaning and leave the wording to recall. In a study of word combinations, filling a gap after studying the phrase gave the best delayed results among the formats tested. I adapted that for speech with a meaning in parentheses and an optional hint like “far / good.” Gap-fill study
Research notes and the decisions they informed
Under the hood
- Keeping browser audio tied to the right card. Closing the microphone after each take on desktop Safari interrupted Bluetooth playback. On iPhone, the app releases the input before comparison. I built the recorder around those differences and journal each take in IndexedDB before advancing. A stable take ID keeps upload retries tied to the original phrase and prevents duplicate recordings. Recording design
- Making AI card quality testable. A model can return valid JSON and still teach the wrong sense or give away the answer. I use the same card rules across model CLIs, check structure in code, and review actual model outputs in separate sessions. Coach uses a durable SQLite handoff, so the practice app stays usable while the model and local Piper voice prepare audio. Preparation and evaluation
- Keeping the database layer small by measuring it. I prototyped SQLAlchemy against the real review and search paths. The first version let concurrent writes overwrite each other, and the rating save grew from two statements to four. I kept explicit SQLite transactions and used typed rows checked against the database schema. Database comparison
Contributing
uv sync --frozen
npm --prefix frontend ci
(cd frontend && npx playwright install chromium webkit)
uv run pre-commit install
uv run inv run --build # Start the app at http://127.0.0.1:8000
uv run inv pre # Run static checks
uv run inv test # Run the test suite
Development and releases · Architecture · Remaining work · Allure test report
Metadata
Release files for phrase-gym 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phrase_gym-0.3.0.tar.gz | 623.4 kB | Without provenance | Details for phrase_gym-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phrase_gym-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for phrase_gym-0.3.0-py3-none-any.whl |
Total release size: 798.9 kB
Release files / phrase_gym-0.3.0.tar.gz
| Download URL | phrase_gym-0.3.0.tar.gz |
|---|---|
| Size | 623.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cf850c8af8508c91ac5fb9ce0bff5410f00956c64c9b3bd840a58bd825c80bc
|
|
BLAKE2b-256 checksum How to use checksums |
78cf2872e2f73854ff87623fc08a857b80b46d9f28615c96aa815106fb8a1726
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / phrase_gym-0.3.0-py3-none-any.whl
| Download URL | phrase_gym-0.3.0-py3-none-any.whl |
|---|---|
| Size | 175.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f84bdd39a439a7f09ee15537a180992ad61b17a07d7906e4c408d9bbf0fb5f73
|
|
BLAKE2b-256 checksum How to use checksums |
349ecbdd71a7fb9d7f4cebbd686f6fc0568694730adad303613245f315e71f4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for phrase-gym 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.