Complete rebuild of voice input on a server-authoritative streaming architecture, replacing the legacy Web Speech / whole-blob / WASM engines and the dead voice-agent layer (~4k lines removed). Speech-to-text (dictation): - Client streams 16 kHz mono PCM16 chunks over /api/dictation/ws with seq/ack ordering; buffered audio is retained and replayed on reconnect - Server transcribes and streams live partial transcripts back; segments auto-commit every ~15s with silence suppression and adaptive finalization timeouts - Local provider (default, zero config): sherpa-onnx models in a forked worker process — auto-download with progress, staged extraction with verification, corrupt-model auto-recovery, idle shutdown after 5 min - Model catalog with settings picker (accuracy/speed ratings, sizes, download/delete): Parakeet TDT v2 (English) and v3 (25 European languages, auto-detected), Whisper base and tiny (multilingual, light) - OpenAI-compatible provider for any Whisper endpoint - Composer overlay with live transcript, volume meter, timer, and cancel / insert / insert-and-send actions; failed transcriptions keep their audio for retry or accepting the partial text as-is - Configurable keyboard shortcut (default mod+alt+v) toggles dictation; Enter confirms and Escape cancels while recording - Overlay is pixel-aligned with the composer (measured footer height, matching paddings/typography/gaps) — no layout shift when toggling Text-to-speech: - Local Kokoro provider (English, 11 voices) synthesized in the same worker via /api/dictation/tts/speak, managed by the shared model pipeline; sentence-pipelined playback keeps time-to-first-audio at ~1 sentence regardless of message length, and stop cancels in-flight synthesis - Sanitizer keeps inline-code content (strips backticks only), reads interword slashes aloud, and removes only absolute file paths Settings: - Voice page unified: a single read-aloud toggle owns all playback options (the confusing "Enable Voice Mode" is gone); a new "Enable voice input" toggle (default on, persisted to settings.json) hides the composer mic entirely when disabled Mobile and transport: - iOS/Android microphone permissions added (dictation was previously impossible on mobile) - Fixed Android WebSocket upgrades: the Capacitor WebView origin (https://localhost) was missing from the packaged-client allowlist, 403-ing every WS connection — root cause of the old mobile SSE lock, which is now removed for all transports Security and conventions: - All HTTP routes sit behind the global /api auth gate; the WS upgrade explicitly validates the UI session and origin, with oc_url_token narrowly allowlisted and covered by tests; the dictation socket mints a fresh URL token before connecting - Routes register before the generic OpenCode proxy; the client goes through runtimeFetch/getRuntimeUrlResolver, and runtime switches reset the dictation socket - VS Code deliberately reports dictation as unavailable (no server process in that runtime) CI: workflow Node bumped 20 -> 22 to match the repo engines and fix better-sqlite3 installs broken by node-gyp@latest on Node 20. New dependency: sherpa-onnx-node (prebuilt N-API; macOS/Linux x64+arm64, Windows x64 — Windows-on-ARM falls back to the OpenAI-compatible provider)
115 lines
3.3 KiB
JSON
115 lines
3.3 KiB
JSON
{
|
|
"name": "@openchamber/web",
|
|
"version": "1.13.9",
|
|
"private": false,
|
|
"type": "module",
|
|
"main": "./server/index.js",
|
|
"types": "./server/index.d.ts",
|
|
"bin": {
|
|
"openchamber": "./bin/cli.js"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"scripts": {
|
|
"dev": "bun run build:watch",
|
|
"dev:server": "bun server/index.js --port ${OPENCHAMBER_PORT:-3001}",
|
|
"dev:server:watch": "nodemon --watch server --ext js --exec \"bun server/index.js --port ${OPENCHAMBER_PORT:-3001}\"",
|
|
"build": "vite build",
|
|
"build:watch": "vite build --watch",
|
|
"type-check": "tsc --noEmit",
|
|
"lint": "eslint \"./src/**/*.{ts,tsx}\" --config ../../eslint.config.js",
|
|
"test": "vitest run",
|
|
"start": "node bin/cli.js serve"
|
|
},
|
|
"dependencies": {
|
|
"@clack/prompts": "^1.1.0",
|
|
"@octokit/rest": "^22.0.1",
|
|
"@opencode-ai/sdk": "1.17.12",
|
|
"@simplewebauthn/server": "13.3.1",
|
|
"adm-zip": "^0.5.16",
|
|
"better-sqlite3": "^12.10.0",
|
|
"bun-pty": "^0.4.5",
|
|
"compression": "^1.8.1",
|
|
"cron-parser": "^4.9.0",
|
|
"express": "^5.1.0",
|
|
"http-proxy-middleware": "^3.0.5",
|
|
"jose": "^6.1.3",
|
|
"jsonc-parser": "^3.3.1",
|
|
"luxon": "^3.5.0",
|
|
"node-pty": "1.2.0-beta.12",
|
|
"openai": "^4.79.0",
|
|
"qrcode-terminal": "^0.12.0",
|
|
"reflect-metadata": "^0.2.2",
|
|
"sherpa-onnx-node": "1.12.28",
|
|
"simple-git": "^3.28.0",
|
|
"web-push": "^3.6.7",
|
|
"ws": "^8.18.3",
|
|
"yaml": "^2.8.1"
|
|
},
|
|
"devDependencies": {
|
|
"@base-ui/react": "^1.4.0",
|
|
"@codemirror/lang-cpp": "^6.0.3",
|
|
"@codemirror/lang-go": "^6.0.1",
|
|
"@eslint/js": "^9.33.0",
|
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
"@radix-ui/react-select": "^2.2.6",
|
|
"@radix-ui/react-separator": "^1.1.7",
|
|
"@radix-ui/react-slot": "^1.2.3",
|
|
"@radix-ui/react-toggle": "^1.1.10",
|
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
"@remixicon/react": "^4.7.0",
|
|
"@simplewebauthn/browser": "13.3.0",
|
|
"@tailwindcss/postcss": "^4.0.0",
|
|
"@types/adm-zip": "^0.5.7",
|
|
"@types/node": "^24.3.1",
|
|
"@types/react": "^19.1.10",
|
|
"@types/react-dom": "^19.1.7",
|
|
"@types/supertest": "^7.2.0",
|
|
"@vitejs/plugin-react": "^5.0.0",
|
|
"autoprefixer": "^10.4.21",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "^1.1.1",
|
|
"concurrently": "^9.2.1",
|
|
"cors": "^2.8.5",
|
|
"cross-env": "^7.0.3",
|
|
"eslint": "^9.33.0",
|
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
"eslint-plugin-react-refresh": "^0.5.0",
|
|
"ghostty-web": "0.4.0",
|
|
"globals": "^16.3.0",
|
|
"next-themes": "^0.4.6",
|
|
"nodemon": "^3.1.7",
|
|
"react": "^19.1.1",
|
|
"react-dom": "^19.1.1",
|
|
"react-markdown": "^10.1.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"sonner": "^2.0.7",
|
|
"strip-json-comments": "^5.0.3",
|
|
"tailwind-merge": "^3.3.1",
|
|
"supertest": "^7.2.2",
|
|
"tailwindcss": "^4.0.0",
|
|
"tsx": "^4.20.6",
|
|
"tw-animate-css": "^1.3.8",
|
|
"typescript": "~5.9.0",
|
|
"typescript-eslint": "^8.39.1",
|
|
"vite": "^7.1.2",
|
|
"vite-plugin-pwa": "^1.0.3",
|
|
"vitest": "^4.1.4",
|
|
"workbox-window": "^7.4.0",
|
|
"zustand": "^5.0.8"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"server",
|
|
"bin",
|
|
"public",
|
|
"package.json",
|
|
"README.md"
|
|
]
|
|
}
|