2:I[7012,["4765","static/chunks/4765-f5afdf8061f456f3.js","9856","static/chunks/9856-3b185291364d9bef.js","6687","static/chunks/app/docs/%5B...slug%5D/page-e07536548216bee4.js"],"MarkdownRenderer"] 4:I[9856,["4765","static/chunks/4765-f5afdf8061f456f3.js","9856","static/chunks/9856-3b185291364d9bef.js","6687","static/chunks/app/docs/%5B...slug%5D/page-e07536548216bee4.js"],""] 5:I[4126,[],""] 7:I[9630,[],""] 8:I[4278,["9856","static/chunks/9856-3b185291364d9bef.js","8172","static/chunks/8172-b3a2d6fe4ae10d40.js","3185","static/chunks/app/layout-2814fa5d15b84fe4.js"],"HeadingProvider"] 9:I[1476,["9856","static/chunks/9856-3b185291364d9bef.js","8172","static/chunks/8172-b3a2d6fe4ae10d40.js","3185","static/chunks/app/layout-2814fa5d15b84fe4.js"],"Header"] a:I[3167,["9856","static/chunks/9856-3b185291364d9bef.js","8172","static/chunks/8172-b3a2d6fe4ae10d40.js","3185","static/chunks/app/layout-2814fa5d15b84fe4.js"],"Sidebar"] b:I[7409,["9856","static/chunks/9856-3b185291364d9bef.js","8172","static/chunks/8172-b3a2d6fe4ae10d40.js","3185","static/chunks/app/layout-2814fa5d15b84fe4.js"],"PageFrame"] 3:T170f, # VoiceAssist Voice-Ready State - November 25, 2025 ## Summary The voice pipeline is now stable on `main` with all tests passing. This document serves as context for future AI assistant sessions. ## Current State ### Merged PRs - **PR #47**: Unified Voice Mode pipeline (ephemeral tokens, settings -> backend, chat integration, metrics) - **PR #48**: `/api/voice/metrics` + frontend metrics export (sendBeacon), 11 metrics tests - **PR #49**: Voice observability stack (Sentry backend/frontend, SLOs, Prometheus metrics, E2E transcript validation) - **PR #60**: Fixed 404 on `/api/voice/realtime-session` by adding `prefix="/api"` for voice.router - **PRs #50-56, #58-59**: All Dependabot dependency updates merged; #57 closed as superseded ### Test Status (All Passing) | Test Suite | Tests | Status | | ------------------------------------------ | --------------------------- | ------ | | Backend: test_openai_config.py | 17 passed, 3 skipped (live) | ✅ | | Backend: test_voice_metrics.py | 11 passed | ✅ | | Frontend: useRealtimeVoiceSession | 22 passed | ✅ | | Frontend: voiceSettingsStore | 17 passed | ✅ | | Frontend: VoiceModeSettings | 25 passed | ✅ | | Frontend: MessageInput-voice-settings | 12 passed | ✅ | | Frontend: useChatSession-voice-integration | 8 passed | ✅ | | UI: MessageBubble | 18 passed | ✅ | **Known Issue (Not Voice-Related):** `test_realtime_voice_pipeline.py` has Qdrant DNS errors - this is external infrastructure, not voice code. ### API Gateway Dependency Fix (This Session - 2025-11-25 18:00 UTC) Resolved arq/redis version conflict that was preventing Docker builds: **Problem:** - `requirements.txt` had `redis==7.1.0` but `arq==0.26.3` requires `redis<6` - Docker build failed with pip dependency resolution error - Previous hot-patch in running container had `redis==4.6.0` (working) **Solution:** - Changed `redis==7.1.0` → `redis==4.6.0` in `services/api-gateway/requirements.txt` - Updated comment to reflect the actual constraint (arq compatibility, not fastapi-cache2) - Rebuilt Docker image successfully - Container now runs from correct built image (no manual `docker cp` needed) **Verification:** - Docker build passes cleanly - Container starts with `redis==4.6.0` + `arq==0.26.3` - `/api/voice/realtime-session` returns 401 (auth required), not 404 - `/api/voice/metrics` returns 405 (expects POST), not 404 - All 28 backend tests pass - All 84 frontend voice tests pass **Branch:** `claude/api-gateway-redis-arq-fix-20251125180054` ### MessageBubble Fix (Previous Session) Fixed DOM nesting issues in `MessageBubble.tsx` that caused 2 failing tests: **Problem:** `
` elements inside `` tags when rendering markdown code blocks. **Solution:** 1. Added `pre` component override returning a Fragment to avoid double-wrapping 2. Improved inline vs block code detection logic 3. Wrapped syntax highlighted code in semantic `
` element 4. Used `` instead of `` for line wrappers inside `` **Branch:** `claude/ui-tests-cleanup-20251125155226` **Commit:** `82bc1f7` ## Voice + Observability Stack Architecture ``` Frontend (quran.asimo.io / dev.asimo.io) ├── VoiceModePanel (UI component) │ └── Uses useRealtimeVoiceSession hook ├── voiceSettingsStore (Zustand) │ └── Persists: voice, language, vadSensitivity, autoStartOnOpen, showStatusHints ├── Metrics Collection │ └── sendBeacon to /api/voice/metrics on disconnect └── Sentry Integration └── Frontend error tracking Backend (FastAPI) ├── /api/voice/realtime-session │ └── Generates ephemeral OpenAI token + session config ├── /api/voice/metrics │ └── Accepts voice session metrics ├── RealtimeVoiceService │ └── Uses settings from request (voice, language, vad_sensitivity) ├── Prometheus Metrics │ └── voice_session_duration, token_generation_time, etc. └── Sentry Integration └── Backend error tracking with voice SLO alerts ``` ## E2E Tests E2E tests exist at `/home/asimo/VoiceAssist/e2e/`: - `voice-mode-navigation.spec.ts` - `voice-mode-session-smoke.spec.ts` - `voice-transcript-validation.spec.ts` **To run:** Requires dev server (`pnpm dev`) via Playwright's `webServer` config. ## TODOs for Future Work ### Infrastructure/Observability - [ ] Configure Prometheus scrapes for voice metrics - [ ] Set up Grafana dashboards for voice SLOs - [ ] Configure Sentry alerts for voice SLO violations ### Voice UX Features (After Stable Pipeline) - [ ] Per-user voice preferences persistence (backend) - [ ] Voice activity visualization improvements - [ ] Multi-language auto-detection - [ ] Session resumption on reconnect ### Testing - [ ] Add E2E tests to CI pipeline with automated dev server startup - [ ] Investigate Qdrant DNS issues for full realtime pipeline tests ## Quick Commands ```bash # Run backend voice tests cd /home/asimo/VoiceAssist/services/api-gateway source venv/bin/activate && export PYTHONPATH=. python -m pytest tests/integration/test_openai_config.py tests/integration/test_voice_metrics.py -v # Run frontend voice tests cd /home/asimo/VoiceAssist/apps/web-app export NODE_OPTIONS="--max-old-space-size=768" npx vitest run src/hooks/__tests__/useRealtimeVoiceSession.test.ts \ src/stores/__tests__/voiceSettingsStore.test.ts \ src/components/voice/__tests__/VoiceModeSettings.test.tsx # Run MessageBubble tests npx vitest run src/components/chat/__tests__/MessageBubble.test.tsx ``` --- _Last updated: 2025-11-25 by Claude_ 6:["slug","VOICE_READY_STATE_2025-11-25","c"] 0:["X7oMT3VrOffzp0qvbeOas",[[["",{"children":["docs",{"children":[["slug","VOICE_READY_STATE_2025-11-25","c"],{"children":["__PAGE__?{\"slug\":[\"VOICE_READY_STATE_2025-11-25\"]}",{}]}]}]},"$undefined","$undefined",true],["",{"children":["docs",{"children":[["slug","VOICE_READY_STATE_2025-11-25","c"],{"children":["__PAGE__",{},[["$L1",["$","div",null,{"children":[["$","div",null,{"className":"mb-6 flex items-center justify-between gap-4","children":[["$","div",null,{"children":[["$","p",null,{"className":"text-sm text-gray-500 dark:text-gray-400","children":"Docs / Raw"}],["$","h1",null,{"className":"text-3xl font-bold text-gray-900 dark:text-white","children":"Voice Ready State 2025 11 25"}],["$","p",null,{"className":"text-sm text-gray-600 dark:text-gray-400","children":["Sourced from"," ",["$","code",null,{"className":"font-mono text-xs","children":["docs/","VOICE_READY_STATE_2025-11-25.md"]}]]}]]}],["$","a",null,{"href":"https://github.com/mohammednazmy/VoiceAssist/edit/main/docs/VOICE_READY_STATE_2025-11-25.md","target":"_blank","rel":"noreferrer","className":"inline-flex items-center gap-2 rounded-md border border-gray-200 dark:border-gray-700 px-3 py-1.5 text-sm text-gray-700 dark:text-gray-200 hover:border-primary-500 dark:hover:border-primary-400 hover:text-primary-700 dark:hover:text-primary-300","children":"Edit on GitHub"}]]}],["$","div",null,{"className":"rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 p-6","children":["$","$L2",null,{"content":"$3"}]}],["$","div",null,{"className":"mt-6 flex flex-wrap gap-2 text-sm","children":[["$","$L4",null,{"href":"/reference/all-docs","className":"inline-flex items-center gap-1 rounded-md bg-gray-100 px-3 py-1 text-gray-700 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700","children":"← All documentation"}],["$","$L4",null,{"href":"/","className":"inline-flex items-center gap-1 rounded-md bg-gray-100 px-3 py-1 text-gray-700 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700","children":"Home"}]]}]]}],null],null],null]},[null,["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children","$6","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7f586cdbbaa33ff7.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"h-full","children":["$","body",null,{"className":"__className_f367f3 h-full bg-white dark:bg-gray-900","children":[["$","a",null,{"href":"#main-content","className":"skip-to-content","children":"Skip to main content"}],["$","$L8",null,{"children":[["$","$L9",null,{}],["$","$La",null,{}],["$","main",null,{"id":"main-content","className":"lg:pl-64","role":"main","aria-label":"Documentation content","children":["$","$Lb",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]]}]]}]}]],null],null],["$Lc",null]]]] c:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Voice Ready State 2025 11 25 | Docs | VoiceAssist Docs"}],["$","meta","3",{"name":"description","content":"The voice pipeline is now stable on `main` with all tests passing. This document serves as context for future AI assistant sessions."}],["$","meta","4",{"name":"keywords","content":"VoiceAssist,documentation,medical AI,voice assistant,healthcare,HIPAA,API"}],["$","meta","5",{"name":"robots","content":"index, follow"}],["$","meta","6",{"name":"googlebot","content":"index, follow"}],["$","link","7",{"rel":"canonical","href":"https://assistdocs.asimo.io"}],["$","meta","8",{"property":"og:title","content":"VoiceAssist Documentation"}],["$","meta","9",{"property":"og:description","content":"Comprehensive documentation for VoiceAssist - Enterprise Medical AI Assistant"}],["$","meta","10",{"property":"og:url","content":"https://assistdocs.asimo.io"}],["$","meta","11",{"property":"og:site_name","content":"VoiceAssist Docs"}],["$","meta","12",{"property":"og:type","content":"website"}],["$","meta","13",{"name":"twitter:card","content":"summary"}],["$","meta","14",{"name":"twitter:title","content":"VoiceAssist Documentation"}],["$","meta","15",{"name":"twitter:description","content":"Comprehensive documentation for VoiceAssist - Enterprise Medical AI Assistant"}],["$","meta","16",{"name":"next-size-adjust"}]] 1:null