Contributing
Contributions are welcome! Read the contributing guide before opening a pull request. You can also propose ideas in the discussions or check the project backlog.
Set up the project
Section titled “Set up the project”Python 3.10 to 3.13 is required. uv downloads it if it’s missing.
-
Install FFmpeg and, on Linux, PortAudio:
Terminal window # macOSbrew install ffmpeg# Ubuntu or Debiansudo apt install ffmpeg libportaudio2# Windowschoco install ffmpeg -
Clone the repository:
Terminal window git clone https://github.com/HenestrosaDev/audiotext.gitcd audiotext -
Install uv, which manages the dependencies and the virtual environment.
-
Install the dependencies:
Terminal window uv syncuv syncinstalls PyTorch with CUDA support, which is a large download on Linux and Windows. Without an NVIDIA GPU, install the CPU build instead:Terminal window uv sync --no-group cuda --group cpu -
Run the app:
Terminal window uv run src/app.py
Development tools
Section titled “Development tools”uv run pre-commit install # lints and formats the code before each commituv run pytest # runs the testsTranslate the interface
Section titled “Translate the interface”The interface is translated with gettext. The texts are in res/locales/audiotext.pot, and the translations of each language in res/locales/<language>/LC_MESSAGES/audiotext.po. The texts that depend on a number (e.g. {count} file / {count} files) have a translation for each plural form of the language (msgstr[0], msgstr[1]…), as set by the Plural-Forms header of its catalog. The same text can appear twice, once with a context (msgctxt), so it’s translated differently in each place: e.g. Done is the status of a transcription, and with the files context, a filter of the files of a folder.
After the texts of the code change, or after editing a .po file (e.g. with Poedit), run this script. It extracts the texts, updates the catalogs, compiles them and lists the texts that are still to translate or review (marked as fuzzy), which the app shows in English until then. The tests fail while a catalog is out of date.
uv run .github/scripts/update_translations.pyTo add a language, create its catalog, translate it, compile it and add it to UI_LANGUAGES in src/utils/i18n.py:
uv run pybabel init -i res/locales/audiotext.pot -d res/locales -D audiotext -l <code>uv run .github/scripts/update_translations.pyImprove this documentation
Section titled “Improve this documentation”This website is built with Starlight and lives in the audiotext-docs repository. Each language has its own folder in src/content/docs (English is in en).
git clone https://github.com/HenestrosaDev/audiotext-docs.gitcd audiotext-docsnpm installnpm run dev # serves the site at http://localhost:4321npm run build # builds the site into distEvery page has an Edit page link at the bottom that opens it on GitHub.