Streaming dictation failed at runtime with "no available backend found /
'text/html' is not a valid JavaScript MIME type": @ricky0123/vad-web 0.0.30
defaults baseAssetPath/onnxWASMBasePath to "./" (relative to the page URL),
so the worklet, Silero model and ORT wasm/mjs were requested against the SPA
catch-all and came back as index.html.
Serve them from a fixed /vad/ instead:
- scripts/copy-vad-assets.mjs copies the 4 runtime assets (vad worklet,
silero_vad_v5.onnx, ort-wasm-simd-threaded.jsep.{mjs,wasm}) from node_modules
into apps/client/public/vad/ (gitignored — the ORT wasm is ~26 MB)
- client dev/build scripts run the copy first so the assets are always present
- useStreamingDictation points both path constants at "/vad/"
Verified: dev server serves all four under /vad/ with HTTP 200 and correct
Content-Type (js/wasm, never text/html); tsc clean. Prod (Docker) build runs
the copy step, so dist/vad/* ships in the image.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
51 lines
641 B
Plaintext
51 lines
641 B
Plaintext
.env
|
|
.env.dev
|
|
.env.prod
|
|
data
|
|
# compiled output
|
|
/dist
|
|
/node_modules
|
|
|
|
# Logs
|
|
logs
|
|
*.log
|
|
npm-debug.log*
|
|
pnpm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
lerna-debug.log*
|
|
|
|
# OS
|
|
.DS_Store
|
|
|
|
# Tests
|
|
/coverage
|
|
/.nyc_output
|
|
|
|
# IDEs and editors
|
|
/.idea
|
|
.project
|
|
.classpath
|
|
.c9/
|
|
*.launch
|
|
.settings/
|
|
*.sublime-workspace
|
|
|
|
# IDE - VSCode
|
|
.vscode/*
|
|
!.vscode/settings.json
|
|
!.vscode/tasks.json
|
|
!.vscode/launch.json
|
|
!.vscode/extensions.json
|
|
|
|
.nx
|
|
.nx/installation
|
|
.nx/cache
|
|
.claude/worktrees/
|
|
|
|
# TypeScript incremental build artifacts
|
|
*.tsbuildinfo
|
|
|
|
# Self-hosted VAD / onnxruntime-web assets (copied from node_modules at dev/build time)
|
|
apps/client/public/vad/
|