26 lines
1.1 KiB
Markdown
26 lines
1.1 KiB
Markdown
---
|
|
id: TASK-142
|
|
title: miC — Voice Conversation Mode for MI Agent
|
|
status: Done
|
|
assignee: []
|
|
created_date: '2026-04-10 22:40'
|
|
labels: []
|
|
dependencies: []
|
|
priority: medium
|
|
---
|
|
|
|
## Description
|
|
|
|
<!-- SECTION:DESCRIPTION:BEGIN -->
|
|
Add a "miC" toggle button to the MI agent that enables a full voice conversation loop: speak → transcribe → auto-submit to MI → speak response aloud → listen again.
|
|
|
|
## Implementation
|
|
- `lib/mi-voice-bridge.ts`: MiVoiceBridge class — Edge TTS via `claude-voice.jeffemmett.com` WebSocket + Web Speech Synthesis fallback
|
|
- `shared/components/rstack-mi.ts`: Voice mode state machine (IDLE → LISTENING → THINKING → SPEAKING → LISTENING), miC buttons in bar + panel header, voice status strip with waveform animation, auto-submit on 1.5s silence, TTS truncation (strips markdown/code, limits to ~4 sentences), echo prevention, interruption support
|
|
|
|
## Key Decisions
|
|
- Separate SpeechDictation instance from bar dictation (browser only allows one SpeechRecognition)
|
|
- No server changes — uses existing #ask() flow and parseMiActions()
|
|
- Edge TTS primary, browser speechSynthesis fallback
|
|
<!-- SECTION:DESCRIPTION:END -->
|