feat: 部署优化

This commit is contained in:
2026-06-14 21:24:11 +08:00
parent 7ea6c0d4f2
commit 083ede8b6d
6 changed files with 89 additions and 17 deletions

View File

@@ -50,8 +50,9 @@ export function useVAD(options?: VADOptions) {
getStream: () => Promise.resolve(stream),
startOnLoad: true,
model: "legacy",
// 指向 node_modules 中的 WASM 文件由 Vite 中间件提供)
onnxWASMBasePath: "/node_modules/onnxruntime-web/dist/",
// WASM 和模型文件由 Vite 插件复制到 public/ (即 dist 根目录)
onnxWASMBasePath: "/",
modelURL: "/silero_vad_legacy.onnx",
onSpeechStart: () => {
setIsSpeaking(true);