| 36-voice-pipeline-foundation |
03 |
api |
| express |
| multer |
| voice |
| whisper |
| piper |
| sse |
| tts |
| stt |
|
| phase |
provides |
| 36-01 |
voicePipelineService with transcribe/synthesize/formatForVoice |
|
| phase |
provides |
| 36-02 |
voiceMode field on createMessageSchema and ChatMessage interface |
|
|
| POST /api/transcribe HTTP endpoint (audio upload → VoicePipelineService.transcribe) |
| POST /api/synthesize HTTP endpoint (text body → VoicePipelineService.synthesize → audio/wav) |
| voiceMode flag wired through chat stream endpoint with dual-output prompt injection (VPIPE-06) |
| voiceMode persisted to messageType column on assistant message save |
| Old inline /transcribe endpoint removed from chat-files.ts |
|
| phase-37-voice-web-ui (uses POST /api/transcribe and POST /api/synthesize from browser) |
| phase-38-telegram-bridge (uses POST /api/transcribe and POST /api/synthesize from Telegram) |
|
| added |
patterns |
|
|
| voiceRoutes() factory function pattern matching chatFileRoutes() |
| multer.memoryStorage() for audio upload in dedicated voice route |
| dual-output SSE prompt injection — full_voice mode appends SPOKEN:/DETAILED: system message |
| voiceMode-to-messageType mapping: full_voice→voice_full, voice_input→voice_input |
|
|
| created |
modified |
| server/src/routes/voice.ts |
| server/src/__tests__/36-voice-routes.test.ts |
|
| server/src/routes/chat.ts |
| server/src/routes/chat-files.ts |
| server/src/app.ts |
|
|
| Voice routes are a dedicated module (voice.ts) rather than added to chat-files.ts for clean separation of concerns |
| assertBoard(req) on both voice endpoints — same auth pattern as all other board-facing API routes |
| voiceMode destructured as typed union in stream endpoint to enable compile-time safety |
|
| Dual-output prompt: SPOKEN: section for TTS delivery, DETAILED: section for full markdown |
| messageType column stores voice_full/voice_input for downstream rendering decisions |
|
|
25min |
2026-04-04 |