Phrase Gym
Phrase Gym is a small local Python/Vue application for studying useful English phrases and keeping private learner recordings. This checkpoint supports package import, ungraded first study, reference playback, optional recording, comparison, and saved replay. Later recall and scheduling remain the next stage.
Install and launch
The server runs on macOS and Linux. Use a macOS browser for the MVP media player and recording; Linux browser audio support is planned after the MVP.
For a source checkout, use Python 3.13, uv, Node 22.12+ and a configured English Piper voice for Coach synthesis. Install the pinned environments and build the client once:
uv sync --frozen
npm --prefix frontend ci
npm --prefix frontend run build
Start Phrase Gym without any Piper installation:
uv run phrase-gym run
For private iPhone access on your existing tailnet, use uv run inv run --build --tailscale. This points Tailscale Serve at the new server
and allows its exact HTTPS machine hostname. Open the HTTPS URL printed by Tailscale on the
iPhone with Tailscale connected.
The built wheel contains the Vue client. A lean installed package runs phrase-gym run.
Coach runs separately: set PHRASE_GYM_PIPER_CONFIG to the private voice file in
the import guide, then run
uv run phrase-gym coach in another terminal. The private Piper environment belongs to Coach;
the server needs only core dependencies. Service registration and deployment commands remain
unavailable.
Open http://127.0.0.1:8000 on the Mac. The app listens only on loopback and stores its database,
references, and recordings in the operating system's Phrase Gym application-data directory.
For a separate data directory, add --data-dir /absolute/path.
Add and study material
Open Add material, paste a package or choose its UTF-8 JSON file, and select Import. The app saves the request before acknowledging it. A text-only package stays pending while Coach is offline; Coach prepares reference audio and returns it through the API. An external agent can submit the same package with complete WAV references in one API request, without Coach. The server validates and publishes all cards and references together. A preparation error remains visible for explicit retry. Exact package retries return the existing result; a changed package ID or repeated source/item identity is rejected without overwriting learned material.
Study shows the full phrase and meaning/use help. Reference playback and recording are optional. Every stopped take is retained separately and saved automatically; pending uploads remain in the browser for retry. Next records ungraded study completion. The finish screen deliberately does not invent a recall grade or schedule before the later-recall stage exists.
See the package schema, example, and external-agent instruction.
Development
. ./activate.sh
uv run pre-commit install
inv --list
uv run inv pre
uv run inv test
inv test runs Python tests, client typechecking/unit/build checks, and silent real-backend
browser tests in Chromium and WebKit on macOS. CI runs the full gate on macOS and separately
runs all Python server tests on Linux. For server-only iteration, use uv run pytest.
Install browser binaries from frontend/ with
npx playwright install chromium webkit. If migrating from the temporary custom hook, run
git config --unset core.hooksPath before pre-commit install.
The scaffold's inv pre, inv reqs, inv docs-en, inv build-docs, inv version, and
inv ver-bug / inv ver-feature / inv ver-release commands are available.
uv run inv build builds the client and Python distributions. A version command checks and commits the
version update, then pushes its release tag; the tag workflow publishes to PyPI only after CI passes.
See development and release operations for setup and dry-run commands.
Use uv run inv run --build to rebuild the frontend and start the server, or uv run inv run
to start it with the existing client build.
Documentation, Allure reports, Codecov, and Coveralls retain the scaffold's reporting links.
Created using cookiecutter-python-package.
Current decisions and remaining work start at specs/START-HERE.md.
Metadata
Release files for phrase-gym 0.2.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.2.0.tar.gz | 197.3 kB | Without provenance | Details for phrase_gym-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phrase_gym-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for phrase_gym-0.2.0-py3-none-any.whl |
Total release size: 259.7 kB
Release files / phrase_gym-0.2.0.tar.gz
| Download URL | phrase_gym-0.2.0.tar.gz |
|---|---|
| Size | 197.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0675a55490f27ef11a9f1b2abaa1c8af27da67de550ad8411a4ad325cf69a9f8
|
|
BLAKE2b-256 checksum How to use checksums |
9538b9eaefcdd46a5380542a9b8471cf8209a9849248a9959f930905f077812f
|
| 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.2.0-py3-none-any.whl
| Download URL | phrase_gym-0.2.0-py3-none-any.whl |
|---|---|
| Size | 62.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a565a442481d53f35ee94ca5f7e5108828e29819d2b2ade019229be0800102f
|
|
BLAKE2b-256 checksum How to use checksums |
cbc3fac0fd8c082ac58f2147c72a952c1365d66502a73ed94cc5b3afff232b53
|
| 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.2.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.