fix(preservation): keep vinput config and models across reboots (#381)

Vinput stores its core config in ~/.config/vinput/config.json and its
downloaded sherpa-onnx models in ~/.local/share/vinput/models/. Neither
was bind-mounted from /persistent on the tmpfs-root hosts, so a reboot
wiped both and vinput-daemon started with "Local ASR provider model is
not configured". Persist both directories and document the one-shot CLI
model setup in the vinput README.
This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-10-05 00:18:01 +08:00
1 parent 8f0961d9c2
commit 502d0c85c7
2 files changed
+39 -8

No files matched your search

+32 -8
View File
@@ -1,19 +1,43 @@
# Fcitx5 Vinput
On `ai` and `shoukei`, install a Sherpa-ONNX model in Vinput under **Resources → Models**, then
select it in **Control → ASR Providers**. Hold and release **right Alt** to dictate. **Right Shift**
toggles Chinese/English; **left Shift** remains a normal modifier. Open Vinput from the application
launcher for settings.
On `ai` and `shoukei`, install a Sherpa-ONNX model, then hold and release **right Alt** to dictate.
**Right Shift** toggles Chinese/English; **left Shift** remains a normal modifier. Open Vinput from
the application launcher for settings.
Models are stored in `~/.local/share/vinput/models/sherpa-onnx/`. Review their source and license
before installing.
## One-time setup (CLI)
The GUI path is **Resources → Models** (download and activate), then **Control → ASR Providers**.
The equivalent non-interactive commands are:
```sh
vinput model add onnx-xasr-zh-en-960ms-punct-stream # download (~130 MB, sha256-verified)
vinput model use onnx-xasr-zh-en-960ms-punct-stream # set as active model
systemctl --user restart vinput-daemon
```
`vinput model list -a` lists the available registry models.
## Backends
- `shoukei` uses CPU. Leave the model's provider at its default.
- `ai` uses OpenVINO when the model's `vinput-model.json` sets `"provider": "openvino"`; restart
`vinput-daemon` after changing it. The user needs the `render` group and a new login after
deployment.
`vinput-daemon` after changing it. One-shot enable:
```sh
f=~/.local/share/vinput/models/sherpa-onnx/x-asr-960ms-streaming-zipformer-transducer-zh-en-punct-int8/vinput-model.json
jq '.model.provider = "openvino"' "$f" | tee "$f.tmp" && mv "$f.tmp" "$f"
systemctl --user restart vinput-daemon
```
The user needs the `render` group and a new login after deployment.
## Persistence
Models are stored in `~/.local/share/vinput/models/sherpa-onnx/` and the core config lives in
`~/.config/vinput/config.json`. Both directories are bind-mounted from `/persistent` on the
tmpfs-root hosts (see `hosts/idols-ai/preservation.nix`); without that they are wiped on every
reboot and the daemon logs `Local ASR provider model is not configured`. Review model source and
license before installing.
**NPU execution status: unverified.** On `ai`, the OpenVINO runtime and NPU plugin load, the daemon
opens `/dev/accel/accel0`, and the bundled WAV sample transcribes. However, the NPU busy-time
+7
View File
@@ -355,6 +355,13 @@ in
# Japanese IME
".config/mozc" # used by fcitx5-mozc
# Vinput voice input (fcitx5-vinput): core config.json + downloaded
# sherpa-onnx models (~/.local/share/vinput/models/). Without these the
# daemon starts with "Local ASR provider model is not configured" after
# every reboot. Setup commands: home/linux/gui/base/vinput/README.md
".config/vinput"
".local/share/vinput"
".config/nushell"
];
files = [