Install local speech runtime on demand#1056
Open
boudra wants to merge 1 commit into
Open
Conversation
Collaborator
Author
|
@paseo-ai hello |
Contributor
|
Hi! 👋 Smoke test reply from Paseo — everything looks good on my end. |
Collaborator
Author
|
@paseo-ai hello |
Contributor
|
Hello! 👋 Paseo here — smoke test acknowledged. |
Collaborator
Author
|
@paseo-ai rebase this PR |
1 similar comment
Collaborator
Author
|
@paseo-ai rebase this PR |
Collaborator
Author
|
@paseo-ai what is the most recent commit on main? |
Contributor
|
Most recent commit on
|
Collaborator
Author
|
@paseo-ai rebase this PR |
The daemon no longer bundles sherpa-onnx, sherpa-onnx-node, or onnxruntime-node. On first boot they are downloaded into $PASEO_HOME/runtime/local-speech alongside the existing voice models, non-blocking. Users who don't enable local voice never pay the size cost. The wire protocol is unchanged. server_info.capabilities.voice.* already gates voice in the client; readiness now reports runtime_install_in_progress / runtime_missing / runtime_install_failed on the same channel as the existing model_download_* states. The native runtime lives under packages/server/src/server/speech/ providers/local/runtime and exposes a small surface: configure the home once at speech-service init, ensureInstalled, loadPackage, getStatus, plus a typed error. Provider configs do not know about the install path.
e2d8595 to
979326c
Compare
Collaborator
Author
|
@paseo-ai what is the most recent commit on main? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The daemon no longer bundles the local speech native runtime (sherpa-onnx, sherpa-onnx-node, onnxruntime-node). On first boot, those packages are downloaded into
$PASEO_HOME/runtime/local-speechalongside the existing voice model downloads — non-blocking. Users who never enable local voice never pay the size cost.The wire protocol is unchanged.
server_info.capabilities.voice.*already gates the voice UI in the client; readiness now reportsruntime_install_in_progress/runtime_missing/runtime_install_failedon the same channel as the existing model-download states. Old clients see voice as unavailable until install completes (same shape as missing models today).Shape
packages/server/src/server/speech/providers/local/runtime/is the home for everything install-related (paths, package specs, status, install, package loading, error). External callers see a small surface via the module'sindex.ts. Provider configs (SherpaOnnxTTS, the recognizers, the VAD session,PocketTtsOnnxTTS) don't know about the install path — the runtime module is configured once at speech-service init and the loaders consult it internally.The install lifecycle in
speech-runtime.tsis oneInstallableAssetloop registered with two entries (models,runtime), not two parallel lifecycles.How to verify beyond CI
$PASEO_HOME/runtime/local-speech/node_modules/populate, confirm voice becomes ready without daemon restart, and thatserver_info.capabilities.voicetransitions from theruntime_install_in_progressreason text toready.sherpa-onnx-linux-x64,sherpa-onnx-win32-x64, etc.) andonnxruntime-nodeships per-platform.nodebinaries. The newbin/napi-*/<platform>/<arch>/*.nodevalidation and theDYLD/LD_LIBRARY_PATH/PATHprepend insherpa-runtime-env.tsneed a real Linux and Windows run before merge.websocket-server.relay-reconnect.test.ts), but a manual run with a 6-month-old client against the new daemon would confirm the new reason codes don't trip parsers.Risk surface
$PASEO_HOMEplus shared-lib env preparation differs per OS.$PASEO_HOMEwrite access. Install fails if the daemon can't write to the runtime dir. Surfaces asruntime_install_failedwith the error string.registry.npmjs.org. If the daemon runs offline-first, the existing fallback ("no PASEO_HOME configured → use bundled deps viacreateRequire") covers dev/test but not production runtime-disabled scenarios.