FN-8753: enable installed voice input in project settings

Make Voice Input available only after its local model and runtime are ready.

- Bundle the optional sherpa runtime with the published CLI.
- Gate the project setting on model installation and stable runtime status codes.
- Add localized recovery guidance, documentation, and coverage.

Files changed:
 .changeset/fn-8753-voice-input-enable.md           |  7 ++++
 docs/dashboard-guide.md                            |  2 +-
 docs/settings-reference.md                         |  8 +++--
 packages/cli/package.json                          |  3 ++
 packages/cli/src/__tests__/package-config.test.ts  | 16 +++++++++
 .../settings/__tests__/VoiceInputSection.test.tsx  | 36 ++++++++++++++++----
 .../settings/sections/VoiceInputSection.tsx        | 30 ++++++++++++-----
 packages/dashboard/package.json                    |  2 +-
 .../routes/__tests__/register-voice-routes.test.ts | 39 ++++++++++++++++++++++
 .../dashboard/src/stt/__tests__/voice-stt.test.ts  | 27 ++++++++++++---
 packages/dashboard/src/stt/parakeet-service.ts     | 26 ++++++++++-----
 packages/i18n/locales/en/app.json                  |  6 ++++
 pnpm-lock.yaml                                     |  6 +++-
 13 files changed, 175 insertions(+), 33 deletions(-)

Fusion-Task-Id: FN-8753

Fusion-Task-Lineage: db92b148-37f0-45d2-b616-ed2e3f2d54f6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
gsxdsm
2026-08-02 23:07:37 -07:00
parent 46583a4cb6
commit fb0863f660
13 changed files with 175 additions and 33 deletions

View File

@@ -43,7 +43,7 @@ Settings form changes save automatically after a short pause. The footer no long
## Voice Input
**Settings → Voice Input** is visible in both Basic and Advanced settings. Voice mode is off by default; enabling it is an explicit project preference. The same section shows the locally managed Parakeet v3 model and lets an operator download or remove it. Its upstream `sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8.tar.bz2` archive is about 465 MB and Fusion verifies its pinned SHA-256 before installing it; an unpinned or mismatched download is refused. Download progress is polled only while the model is downloading. When sherpa-onnx is unavailable, Settings preserves any saved enabled preference but presents voice mode as backend-enforced disabled with an explanation. If status cannot be determined, the section fails closed: voice mode stays disabled and model actions are not shown until status is available.
**Settings → Voice Input** is visible in both Basic and Advanced settings. Voice mode is off by default; enabling it is an explicit project preference. The same section shows the locally managed Parakeet v3 model and lets an operator download or remove it. Its upstream `sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8.tar.bz2` archive is about 465 MB and Fusion verifies its pinned SHA-256 before installing it; an unpinned or mismatched download is refused. Download progress is polled only while the model is downloading. The toggle becomes interactive only when the model is installed and Fusion can load the optional `sherpa-onnx-node` runtime. If Settings reports a missing module, a platform runtime load failure, or an incompatible runtime, reinstall a supported Fusion package for the current platform and reopen Settings. When sherpa-onnx is unavailable, Settings preserves any saved enabled preference but presents voice mode as backend-enforced disabled with an explanation. If status cannot be determined, the section fails closed: voice mode stays disabled and model actions are not shown until status is available.
## Reset Settings

View File

@@ -51,8 +51,12 @@ See [Signals Connectors](./signals-connectors.md) for setup, signing, payload, a
`voiceInput: { enabled?, model?, language? }`; values resolve per request with project precedence.
`enabled` defaults to false and gates dictation only, so model status/download/delete remain available
while disabled. `model` defaults to registry identifier `"parakeet-v3"` and `language` to `"en"`;
unsupported values are rejected and never become URLs or paths. The optional sherpa runtime and
user-scoped cache degrade to unavailable safely. Downloads are on demand and require a pinned SHA-256;
unsupported values are rejected and never become URLs or paths. An installed model is not by itself
sufficient: Project Settings enables the toggle only after the optional `sherpa-onnx-node` runtime
loads successfully. A missing module, platform-addon load failure, or incompatible runtime leaves
voice disabled with a recovery message; install or reinstall a supported Fusion package for the
current platform, then reopen Settings. The optional sherpa runtime and user-scoped cache degrade to
unavailable safely. Downloads are on demand and require a pinned SHA-256;
unpinned assets refuse download. The default asset is upstream `sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8.tar.bz2`
(~465 MB), verified against its pinned SHA-256 before installation. Status polling reports
`queued`/`downloading`; deleting fences an in-flight download. Voice chunks alone allow 2 MiB JSON,