mateclaw/mateclaw-ui/vite.config.ts
matevip b7c911f01d feat(stt): DashScope realtime voice + language-aware routing + TalkMode polish
- DashScope paraformer-realtime-v2 WebSocket streaming
- Language-aware provider routing: Whisper for English, Paraformer for Chinese
- PCM WAV recording replaces WebM (provider filename bug + diagnostics)
- TalkMode push-to-talk fixes (audio drop, WS connecting race)
- Vite dev proxy WebSocket upgrade fix
- WebSocket binary buffer 8KB → 8MB (Tomcat default truncated voice clips)
- Audio chunk pacing at 100ms (DashScope returned 0 chars otherwise)
- Resolved language hint propagation + raw frame logging
- V46 seed idempotency fix on UI-toggled STT row
- Diagnostic cleanup after debugging session
2026-04-26 16:37:55 +08:00

37 lines
1002 B
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
import { resolve } from 'path'
export default defineConfig({
plugins: [
vue(),
tailwindcss(),
],
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
server: {
port: 5173,
proxy: {
'/api': {
target: 'http://localhost:18088',
changeOrigin: true,
// ws:true forwards WebSocket Upgrade requests through to the backend.
// Without it Vite serves the GET /api/v1/talk/ws as a regular HTTP
// proxy, the Upgrade header gets dropped, and the WS handshake
// silently fails — frontend stuck on "Connecting", backend never
// sees the connection. TalkMode (STT) lives on this WS so the
// whole feature is dead in dev mode without it.
ws: true,
},
},
},
build: {
outDir: '../mateclaw-server/src/main/resources/static',
emptyOutDir: true,
},
})