Compare commits

..
19 Commits
Author SHA1 Message Date
Pawel Sarkowicz 7a71d14139 Remove Spanish-specific TSV tooling 2026-06-15 16:45:26 -04:00
Pawel Sarkowicz 622f4899ac Improve Spanish Anki vocabulary tooling 2026-06-13 19:26:45 -04:00
ps d06ce15eed Added pyproject.toml, version flag, dry-run flag, etc. 2026-06-08 13:41:10 -04:00
ps 16bffef783 Updated some sane defaults 2026-06-05 05:54:33 -04:00
ps c923f90a75 Updated docs + added TTS backends 2026-06-03 14:01:18 -04:00
ps 226fecbe71 Move package into src layout 2026-06-02 21:02:56 -04:00
Pawel f38030238c Rename project to Saiki and unify CLI 2026-05-26 18:09:26 -04:00
Pawel 8ee1f8de25 Add shared config and update tool scripts 2026-05-25 07:07:13 -04:00
Pawel Sarkowicz f46ff5d9b0 batch_anki_import tags 2026-05-12 10:09:15 -04:00
Pawel 343568f32b on venv -> one venv 2026-03-07 09:05:31 -05:00
Pawel c09ad5a76c links 2026-02-25 11:47:58 -05:00
Pawel 0ae80dfc93 license link 2026-01-26 19:44:22 -05:00
Pawel 10dd76301b LICENSE 2026-01-26 19:43:37 -05:00
Pawel 5daa9d9f91 license 2026-01-26 19:42:52 -05:00
Pawel 4aca942a80 linux knowledge 2026-01-26 08:42:35 -05:00
Pawel 5c900695f2 language support 2026-01-26 08:30:47 -05:00
Pawel 8510eeeaf5 README update 2026-01-24 20:42:39 -05:00
Pawel 2c50160a76 Documents -> Languages/Anki 2026-01-24 20:22:55 -05:00
Pawel 14b9e814da initial 2026-01-22 21:04:23 -05:00
+17 -102
View File
@@ -17,106 +17,28 @@ saiki --help
- Python 3.12+ - Python 3.12+
- [Anki](https://apps.ankiweb.net/) with [AnkiConnect](https://github.com/amikey/anki-connect) - [Anki](https://apps.ankiweb.net/) with [AnkiConnect](https://github.com/amikey/anki-connect)
- `ffmpeg` - `ffmpeg`
- spaCy models for word mining (install after Saiki, as shown below) - spaCy models for word mining:
## Installation
Choose either a virtual environment or a local command-line installation with
pipx. Run the installation commands from the root of this checkout (the directory
containing `pyproject.toml`).
### Virtual environment
```shell
python3.12 -m venv ~/.venv/saiki
source ~/.venv/saiki/bin/activate
pip install -U pip
pip install -e .
saiki --help
```
Activate it with `source ~/.venv/saiki/bin/activate` in each new terminal before
running Saiki. Install `ffmpeg` with your OS package manager (examples below).
For word mining, install the models for the languages you need inside the
activated environment:
```shell ```shell
python -m spacy download es_core_news_sm python -m spacy download es_core_news_sm
python -m spacy download ja_core_news_lg python -m spacy download ja_core_news_lg
``` ```
### Install locally (no virtual environment activation) Setup example:
Use [pipx](https://github.com/pypa/pipx) to install Saiki as a command-line app.
It manages an isolated Python environment and puts the commands on your `PATH`,
so you can run `saiki` from any directory without sourcing a `.venv`.
Install pipx and ffmpeg with your OS package manager, for example:
```shell ```shell
# Fedora python3.12 -m venv ~/.venv/saiki
sudo dnf install pipx ffmpeg source ~/.venv/saiki/bin/activate
pip install -U pip
# Ubuntu / Debian pip install -e .
sudo apt install pipx ffmpeg sudo dnf install ffmpeg
# macOS (Homebrew)
brew install pipx ffmpeg
``` ```
Run the block for your OS, then:
```shell
pipx ensurepath
```
Open a new terminal so the `PATH` change takes effect. From the root of this
checkout (the directory containing `pyproject.toml`), install Saiki:
```shell
pipx install --python python3.12 --include-deps --editable .
saiki --help
```
Python 3.12 must be installed; you can replace `python3.12` with another installed
Python 3.12+ interpreter. Keep this checkout in place: `--editable` makes the
installed command use its source files directly. Omit `--editable` if you prefer
an independent installation that does not depend on keeping the checkout.
`--include-deps` also exposes dependency commands such as `edge-tts`, `gtts-cli`,
and `spacy`. Saiki invokes the TTS commands as subprocesses, so they must be on
`PATH` too.
For word mining, install the models using the `spacy` command supplied by this
installation (choose the languages you need):
```shell
spacy download es_core_news_sm
spacy download ja_core_news_lg
```
These install into Saiki's pipx environment. Model downloads are not required for
`saiki import`. If you previously activated a virtual environment, deactivate it
or open a fresh terminal before using this installation.
### Updating ### Updating
For the editable pipx installation, source changes take effect immediately. If you installed with `pip install -e .` (editable mode), changes to the source
Pull updates from the checkout root; if dependencies or entry points in are live immediately — no reinstall needed. Only re-run `pip install -e .` if
`pyproject.toml` changed, refresh the installation: you pull changes that add new dependencies or scripts.
```shell
git pull
pipx install --force --include-deps --editable .
```
For a non-editable pipx installation, reinstall after every update, omitting
`--editable`. To remove either installation, run `pipx uninstall saiki`.
For a development environment installed with `pip install -e .`, source changes
are also live immediately. Activate that environment before running the update
commands; only reinstall if dependencies or scripts changed.
```shell ```shell
git pull git pull
@@ -126,19 +48,12 @@ pip install -e . # only needed if pyproject.toml changed
### Optional TTS Backends ### Optional TTS Backends
The default `edge-tts` backend is included. To install the optional Python-backed The default `edge-tts` backend is included. To install the optional Python-backed
engines (piper, kokoro), run this from the checkout root: engines (piper, kokoro):
```shell ```shell
pipx install --force --include-deps --editable ".[tts]" pip install ".[tts]"
```
Keep `".[tts]"` in subsequent reinstall commands to retain these extras. Omit # System package for espeak-ng.
`--editable` for an independent installation. If using a manually activated
virtual environment instead, run `pip install ".[tts]"` inside it.
For espeak-ng, install the system package:
```shell
sudo dnf install espeak-ng sudo dnf install espeak-ng
``` ```
@@ -151,14 +66,14 @@ sudo pacman -S espeak-ng
Backend notes: Backend notes:
- `edge-tts`: included in the base installation; no API key, but it uses - `edge-tts`: installed by `pip install edge-tts`; no API key, but it uses
Microsoft Edge's online TTS service. Microsoft Edge's online TTS service.
- `gtts`: included in the base installation; no API key, but it uses Google's - `gtts`: installed by `requirements.txt`; no API key, but it uses Google's
online TTS service through `gtts-cli`. online TTS service through `gtts-cli`.
- `piper`: included in the `tts` extra; you still need a compatible - `piper`: installed by `pip install piper-tts`; you still need a compatible
`.onnx` voice model, usually with its matching `.onnx.json` config file. `.onnx` voice model, usually with its matching `.onnx.json` config file.
- `espeak-ng`: installed through your OS package manager, not pip. - `espeak-ng`: installed through your OS package manager, not pip.
- `kokoro`: included in the `tts` extra; you still need - `kokoro`: installed by `pip install kokoro-onnx soundfile`; you still need
`kokoro-v1.0.onnx` and `voices-v1.0.bin`, plus any language-specific G2P `kokoro-v1.0.onnx` and `voices-v1.0.bin`, plus any language-specific G2P
setup required by your Kokoro release. setup required by your Kokoro release.