Skip to content

Clone your own voice on your own computer: speak any text in 60+ languages and dub videos into another language in your voice. Fully local. Early version.

6.1 KB
Raw Blame

Contributing

Bug reports, ideas and pull requests are welcome. Open an issue first for anything larger than a small fix, so the change can be discussed before you spend time on it.

Terms for contributions

The project is licensed under the PolyForm Noncommercial License 1.0.0, and its author keeps the right to offer it under other terms, including commercial ones. To keep that possible, every contribution is accepted on these terms:

  • You confirm that you wrote the contribution yourself, or otherwise have the right to submit it under these terms.
  • You grant the project's author (tarpetos) a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license to use, copy, modify, publish, distribute, sublicense and relicense your contribution, under any terms, including commercial ones.
  • Your contribution is published in this repository under the project's license.

Opening a pull request means you agree to these terms.

Ground rules

  • Everything in English: code, comments, documentation, UI text and commit messages.
  • The app is event-driven: no polling loops, no while True with sleeps or timeouts. Background threads post events to the UI; the engine runs on one asyncio loop (see docs/architecture.md).
  • The engine protocol in contract/engine-protocol.md is the source of truth: change it together with the app and the engine.
  • A change that makes setup install something new the app or engine depends on (a Python package, a model, the Applio commit) also bumps tools/setup/runtime_version.txt: installed apps that update to it then ask the user to run setup again.
  • The app must stay usable for its purpose only: cloning your own voice, or a voice you have explicit permission for (see DISCLAIMER.md).

Checks

Pull requests run one workflow, .github/workflows/ci.yml: the title check, the linters (.github/workflows/lint.yml) and the tests (.github/workflows/test.yml). Editing the title or text runs every check again. Run the linters and tests locally before pushing:

uvx [email protected] format --check . && uvx [email protected] check .
cargo fmt --all --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace
uv run --group test pytest

uvx [email protected] format ., uvx [email protected] check --fix . and cargo fmt fix most findings; code is formatted by them, never by hand. Python uses pathlib for paths. Ruff's rules are in pyproject.toml, rustfmt's in rustfmt.toml.

Every push to a release branch (chore/release-x.y.z) also runs Fresh setup (.github/workflows/fresh-setup.yml): tools/setup/setup.py on an empty data folder on Windows, Linux and macOS, without models, then a check of each environment against tools/setup/locks. Its checks show on the release pull request. Merge a release pull request only after Fresh setup is green on its last commit; to run it again, push an empty commit (git commit --allow-empty -m "chore(release): run fresh setup again"). On another branch, start it by hand with gh workflow run fresh-setup.yml --ref <branch> once the workflow is on master.

Comments

Code explains itself through names, types and structure. A comment is the exception, written only when it is fully justified: when a reader would otherwise get something wrong and the code cannot say it.

  • Write one for a reason the code cannot show: a workaround for a bug or a platform quirk, a constraint from outside (the protocol, a thread, unsafe, a file format), or where a number comes from when it was measured or tuned (one line, with the number).
  • Do not write one that repeats what the code or a name already says, describes a field or a function whose signature is clear, narrates history ("used to", "now", "since 0.3"), or explains the feature to a user. Architecture and behaviour belong in docs/ and contract/, not in module headers.
  • Keep it short: one or two lines. No essays, no lists of measurements, no cross-references to other files unless the link is the point.
  • Doc comments (///, //!, Python docstrings) only on items whose contract is not obvious from the signature.
  • When in doubt, leave it out.

Commit messages

Pull requests are squash-merged: the pull request's title becomes the one commit on master (the pull request number is added to it), and its description becomes the commit body. A check (PR title) refuses a title that does not follow this convention (Conventional Commits):

type(scope): summary
  • type, one of:
    • feat: something new the user can do;
    • fix: something that did not work and now does;
    • perf: the same, faster or lighter;
    • refactor: code changed, behaviour not;
    • docs: documentation only;
    • build: installers, build scripts, dependencies;
    • ci: GitHub workflows;
    • chore: the rest (version bumps, housekeeping);
    • revert: undoes an earlier commit.
  • scope, optional, one of:
    • app: the Rust desktop app;
    • engine: the Python engine;
    • api: the HTTP API (crates/api, mimvox-server);
    • mcp: the MCP server (crates/mcp);
    • setup: setup.sh / setup.cmd and tools/setup;
    • build, ci, docs, release, deps.
  • summary: what changes, as seen by a user where there is one. It has no full stop at the end. Keep it short; details belong in the description.
  • Breaking change: ! before the colon (feat(engine)!: ...), with the details in the description.

Examples:

feat(app): update the app from inside it on every platform
fix(setup): find setup.sh in AppImage, .deb and macOS installs
docs: explain the Book mode's chapter controls
chore(release): 0.1.6

Direct commits to master (maintainers only) follow the same convention.

Branch names

type/what, with the commit types above and a few lowercase words joined by -: feat/setup-locks, fix/llama-unpack-rmtree, ci/fresh-setup, chore/release-0.9.2. No tool prefix and no random suffix: a branch made with one (claude/name-0c5889) is renamed before its pull request is opened.