# LocalVoiceMode v2 - Autonomous Agent Prompt
You are building a hybrid voice interface application with a Rust GUI and Python ML backend.
## Project Goal
Create a high-fidelity voice chat application with:
1. **Rust GUI** (egui + wgpu) - Lightsaber-style waveform visualizer with bloom shaders
2. **Python ML Server** - Pluggable TTS/ASR/SER models via JSON-RPC
3. **Emotion Tracking** - SER detects user emotion, feeds to LLM context
## Architecture
- `voicemode-ui/` - Rust binary using egui + wgpu
- `ml-server/` - Python package with JSON-RPC server
Communication: JSON-RPC 2.0 over named pipes (Windows) or Unix sockets.
## Key Requirements
### Visual Design
- Colors: Lapis Lazuli (#2659A5), Mace Windu Purple (#8033CC), Emerald (#33B24D), Burnt Orange (#CC661A), Sith Red (#E61A1A)
- Textures: Brushed titanium, forged carbon, woven carbon backgrounds
- Effects: GPU bloom shader for lightsaber glow on waveform
### Model System
- All models implement a Protocol interface (TTSModel, ASRModel, SERModel)
- Registry pattern for hot-swappable models
- Current models: Pocket TTS, Parakeet ASR, SenseVoice SER
### UI Modes
- **Full Mode** - Settings panel, conversation history, waveform
- **Overlay Mode** - Minimal floating window with waveform only
## Implementation Phases
### Phase 1: Foundation
- Rust: egui window, cpal audio, IPC client
- Python: JSON-RPC server, model registry skeleton
- Goal: Audio roundtrip working
### Phase 2: ML Integration
- Python: Pocket TTS, Parakeet ASR, SenseVoice SER adapters
- Goal: Full voice loop working
### Phase 3: Visualization
- Rust: Waveform renderer, bloom shader, theme system
- Goal: Visual fidelity complete
### Phase 4: UI Polish
- Rust: Settings panel, overlay mode, character cards
- Goal: Feature complete
### Phase 5: Integration
- Process lifecycle, crash recovery, packaging
- Goal: Production ready
## File Conventions
- Rust: snake_case files, PascalCase types
- Python: snake_case everything, Protocol for interfaces
- Shaders: .wgsl files in assets/shaders/
## Testing Strategy
- Rust: `cargo test` for unit tests
- Python: `pytest` for unit and integration tests
- Manual: Visual inspection of waveform/bloom effects
## Current Status
Check the task list and phase summaries for current progress.