feat(dictate): support configurable ASR backends
This commit is contained in:
@@ -11,7 +11,7 @@ Personal [Pi](https://github.com/earendil-works/pi-mono) extensions, skills, glo
|
||||
- the `manage-pi-links` and `nono-profiles` project-only skills under `.pi/skills/`;
|
||||
- no global Pi extension symlinks. Active extensions are installed separately as pinned Gitea npm packages.
|
||||
|
||||
The repository contains `copy-all`, `dictate`, `effort-controls`, `file-search`, `interactive-subagents`, `lm-studio`, `native-hooks`, `prompt-snippets`, `subagents`, `todo-herdr`, `update`, and the private `workflow` extension. The link manifest does not install any of them globally. The `pptx`, `stop-slop`, `subagents`, and `xlsx` skills are also intentionally excluded. Archived resources under `__archived/` are never installed. Update `config/pi-links.json` deliberately if that policy changes.
|
||||
The repository contains `copy-all`, `dictate` (Linux host-service dictation), `effort-controls`, `file-search`, `interactive-subagents`, `lm-studio`, `native-hooks`, `prompt-snippets`, `subagents`, `todo-herdr`, `update`, and the private `workflow` extension. The link manifest does not install any of them globally. The `pptx`, `stop-slop`, `subagents`, and `xlsx` skills are also intentionally excluded. Archived resources under `__archived/` are never installed. Update `config/pi-links.json` deliberately if that policy changes.
|
||||
|
||||
## Fresh-machine setup
|
||||
|
||||
@@ -435,31 +435,36 @@ Do not place real provider keys in files readable by sandboxed Pi if the goal is
|
||||
|
||||
## Optional Dictate service
|
||||
|
||||
Dictate is Linux-only and requires:
|
||||
Dictate is a Linux-only host service. Every backend requires:
|
||||
|
||||
- PipeWire with `pw-record`;
|
||||
- systemd user services;
|
||||
- an NVIDIA GPU with a working CUDA runtime;
|
||||
- `uv`;
|
||||
- network access for the initial locked dependency and model download;
|
||||
- UID 1000 unless the hardcoded socket path is changed first.
|
||||
- access to the exact `/run/user/1000/pi-dictate.sock`, unless the socket path is changed for another UID.
|
||||
|
||||
Install the host service from the repository root:
|
||||
The default backend is local NeMo/Parakeet. Local installation additionally requires an NVIDIA GPU, a working CUDA runtime, network access for initial provisioning, and several gigabytes for the locked environment and pinned model. Meta and OpenAI are explicit cloud opt-ins. Cloud-only installation does not install NeMo, CUDA, or model weights, but it requires a dedicated host credential and outbound DNS/TLS access from the service.
|
||||
|
||||
Install one backend from the repository root:
|
||||
|
||||
```bash
|
||||
cd /srv/data/code/harness-tools
|
||||
./services/dictate/install.sh
|
||||
./services/dictate/install.sh install --backend local
|
||||
# or:
|
||||
./services/dictate/install.sh install --backend meta --api-key-file /path/to/meta-key
|
||||
./services/dictate/install.sh install --backend openai --api-key-file /path/to/openai-key
|
||||
```
|
||||
|
||||
`--api-key-file` copies a regular source file into the host-owned mode-`0600` credential directory. Never pass a literal key. Configure an installed backend or validate it with:
|
||||
|
||||
```bash
|
||||
./services/dictate/install.sh configure --backend local
|
||||
./services/dictate/install.sh check
|
||||
systemctl --user status pi-dictate.socket pi-dictate.service
|
||||
```
|
||||
|
||||
The installer provisions the locked Python environment, verifies the pinned model, installs host-owned systemd units, and enables socket activation. Initial storage is several gigabytes. To reuse an existing model archive or preview the operation:
|
||||
Local mode remains offline after provisioning and uses the checksum-pinned Parakeet archive. Cloud mode streams bounded PCM to the selected provider only after its session is authenticated and ready. Backend changes are privileged host operations, require validation and a service restart, and fail closed if systemd network hardening does not match the selection. The service does not write audio files or expose provider credentials to Pi. Cloud provider retention, terms, and billing policies apply to audio and configured context sent with a cloud session.
|
||||
|
||||
```bash
|
||||
./services/dictate/install.sh --model-source /path/to/parakeet-tdt-0.6b-v3.nemo
|
||||
./services/dictate/install.sh --dry-run --model-source /path/to/model.nemo
|
||||
```
|
||||
|
||||
Restart a sandboxed Pi after profile or socket changes. In Pi, press `Alt+M` to start or stop dictation and `Alt+N` to cancel. See [`extensions/dictate/README.md`](extensions/dictate/README.md) for privacy, dictionary, model, and troubleshooting details.
|
||||
Restart a sandboxed Pi after profile or socket changes. In Pi, press `Alt+M` to start or stop dictation, `Alt+N` or `/dictate-cancel` to cancel, and `/dictate-status` to display bounded backend/model diagnostics. See [`extensions/dictate/README.md`](extensions/dictate/README.md) for configuration, provider links, privacy, dictionary, model, and troubleshooting details.
|
||||
|
||||
## Maintenance
|
||||
|
||||
|
||||
Reference in New Issue
Block a user