A voice assistant application with multi-container support, session persistence, and AI integration.
- Multi-container voice chat with separate AI contexts
- Session persistence with auto-save
- Task queue system with cancellation
- Git worktree support for multi-branch development
- Voice command parsing and execution
- WebSocket-based real-time communication
- Node.js >= 16
- Python 3.8+
- Ollama (for local LLM)
- Google Cloud account (for Gemini API)
- Clone the repository
- Install backend dependencies:
cd backend pip install -r requirements.txt - Install frontend dependencies:
cd frontend npm install
- Start the backend:
./start.sh backend
- Start the frontend:
./start.sh frontend
See SPEAKER.md for the full list of supported voice commands and natural language patterns.
backend/
main.py # FastAPI app, WebSocket /ws, REST endpoints
services/
whisper_service.py # STT: faster-whisper large-v3
tts_service.py # TTS: Chatterbox with voice cloning
claude_service.py # Claude CLI wrapper (chat + planning modes)
session_service.py # Session persistence (JSON files)
task_queue.py # Per-container FIFO task queues
git_service.py # Git worktree management
ai/
base.py # AIProvider abstract base
gemini.py # Google Gemini
local.py # Ollama + DuckDuckGo search
data/
sessions/ # Session JSON files (auto-created)
frontend/src/
context/ContainerContext.tsx # State: 5 containers (main, a-d), session integration
hooks/
useSharedVoice.ts # Core: VAD, WebSocket, TTS, commands
useSession.ts # Session persistence management
useTaskQueue.ts # Task queue management
useGitWorktree.ts # Git worktree management
useVoiceChat.ts # Legacy hook
utils/
voiceCommands.ts # Command parsing
sessionStorage.ts # localStorage wrapper
components/
ChatView.tsx # Messages with TTS playback
ContainerTabs.tsx # Tab navigation
StatusIndicator.tsx # Status display
To add a new voice command:
- Add the command pattern to
frontend/src/utils/voiceCommands.ts - Implement the command handler in
frontend/src/hooks/useSharedVoice.ts - Update the README documentation
To add a new AI provider:
- Create a new class that inherits from
AIProviderinbackend/services/ai/ - Implement the required methods:
get_response,reset_chat, andset_history - Register the provider in
backend/main.py
Sessions are automatically saved to backend/data/sessions/ with UUID tokens. The frontend uses localStorage for temporary session data.
Each container has its own task queue. Tasks are processed in FIFO order with support for cancellation.
The application supports multi-branch development using git worktrees. Commands include:
GET /git/branches- List available branchesPOST /git/worktree- Create a new worktreeDELETE /git/worktree/{branch}- Remove a worktree
GET /- Main pageGET /ws- WebSocket connection for voice chatGET /sessions- List all sessionsGET /sessions/{id}- Get a specific sessionPOST /sessions- Create a new sessionPUT /sessions/{id}- Update a sessionDELETE /sessions/{id}- Delete a sessionGET /git/branches- List git branchesPOST /git/worktree- Create git worktreeDELETE /git/worktree/{branch}- Delete git worktree
Create a .env file in the root directory with the following variables:
GEMINI_API_KEY=your_gemini_api_key_here
LOCAL_LLM_MODEL=qwen3-coder-256k
CLAUDE_WORK_DIR=/path/to/claudeworkdir
This project is licensed under the MIT License.