chore: configure VAD assets and update Playwright MCP settings - Add vite-plugin-static-copy to bundle VAD WASM files - Configure VAD with adjusted speech detection thresholds - Switch Playwright MCP to omit image responses - Fix WebSocket abort controller handling for interruptions - Add WebFetch permission for VAD documentation ```
49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
import { viteStaticCopy } from "vite-plugin-static-copy";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
viteStaticCopy({
|
|
targets: [
|
|
{
|
|
src: path.resolve(__dirname, '../../node_modules/@ricky0123/vad-web/dist/vad.worklet.bundle.min.js'),
|
|
dest: './'
|
|
},
|
|
{
|
|
src: path.resolve(__dirname, '../../node_modules/@ricky0123/vad-web/dist/silero_vad_v5.onnx'),
|
|
dest: './'
|
|
},
|
|
{
|
|
src: path.resolve(__dirname, '../../node_modules/@ricky0123/vad-web/dist/silero_vad_legacy.onnx'),
|
|
dest: './'
|
|
},
|
|
{
|
|
src: path.resolve(__dirname, '../../node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.mjs'),
|
|
dest: './'
|
|
},
|
|
{
|
|
src: path.resolve(__dirname, '../../node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.wasm'),
|
|
dest: './'
|
|
},
|
|
{
|
|
src: path.resolve(__dirname, '../../node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.jsep.mjs'),
|
|
dest: './'
|
|
},
|
|
{
|
|
src: path.resolve(__dirname, '../../node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.jsep.wasm'),
|
|
dest: './'
|
|
}
|
|
]
|
|
})
|
|
],
|
|
root: "src/ui",
|
|
build: {
|
|
outDir: path.resolve(__dirname, "dist/ui"),
|
|
emptyOutDir: true,
|
|
},
|
|
});
|