Note: These docs need review.
This guide covers setting up VoiceMode for development, including building from source, configuring your IDE, and contributing to the project.
- Python 3.10 or higher
- Git
- UV package manager (recommended) or pip
- Node.js 18+ (for frontend development)
UV is a fast Python package manager written in Rust. It's the recommended tool for VoiceMode development:
# Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or using pip
pip install uvFor contributors: Fork the repo first at https://github.com/mbailey/voicemode, then clone your fork:
# Clone your fork (replace YOUR-USERNAME)
git clone https://github.com/YOUR-USERNAME/voicemode
cd voicemode
# Install in development mode
uv tool install -e .# Build the package
uv build
# This creates:
# dist/voice_mode-X.Y.Z-py3-none-any.whl
# dist/voice_mode-X.Y.Z.tar.gz
# Test the built package
uvx --from dist/voice_mode-*.whl voicemode# Run all tests
pytest
# Run with coverage
pytest --cov=voice_mode
# Run specific test file
pytest tests/test_converse.py
# Run with verbose output
pytest -vFor development without API keys:
# Or manually
voicemode whisper install
voicemode kokoro install
# Or manually
voicemode whisper start
voicemode kokoro startvoicemode/
├── voice_mode/ # Main package
│ ├── __init__.py
│ ├── server.py # MCP server
│ ├── cli.py # CLI commands
│ ├── config.py # Configuration
│ ├── tools/ # MCP tools
│ │ ├── converse.py
│ │ └── services/ # Service installers
│ ├── providers.py # Service providers
│ ├── frontend/ # Next.js frontend
│ └── templates/ # Service templates
├── tests/ # Test suite
├── docs/ # Documentation
├── scripts/ # Development scripts
├── Makefile # Development tasks
└── pyproject.toml # Project configuration
- Create tool file in
voice_mode/tools/ - Implement tool class with MCP decorators
- Add tests in
tests/tools/ - Update documentation
- Update
voice_mode/config.py - Add environment variable to docs
- Update tests for new config
- Add to example
.envfiles
# Add a new dependency
uv add requests
# Add development dependency
uv add --dev pytest-mock
# Update all dependencies
uv syncexport VOICEMODE_DEBUG=true
export VOICEMODE_LOG_LEVEL=debug- Logs:
~/.voicemode/logs/ - Audio files:
~/.voicemode/debug/ - Event logs:
~/.voicemode/events.log
# Check service status
voicemode whisper status
voicemode kokoro status# Run all unit tests
pytest tests/unit/
# Run with markers
pytest -m "not integration"# Run integration tests
pytest tests/integration/
# Run specific service tests
pytest tests/integration/test_whisper.py# Test voice conversation
voicemode converse --debug
# Test with different providers
VOICEMODE_TTS_BASE_URLS=http://localhost:8880/v1 voicemode converseWe use Black for formatting and Ruff for linting:
# Format code
black voice_mode tests
# Run linter
ruff check voice_mode tests
# Fix linting issues
ruff check --fix voice_mode tests# Install pre-commit
pip install pre-commit
# Install hooks
pre-commit install
# Run manually
pre-commit run --all-filesFollow conventional commits:
feat:New featurefix:Bug fixdocs:Documentationtest:Testsrefactor:Code refactoringchore:Maintenance
- Fork the repository
- Create feature branch
- Make changes with tests
- Run test suite
- Submit pull request
# Development
make dev # Install in dev mode
make test # Run tests
make lint # Run linters
make format # Format code
# Building
make build # Build package
make clean # Clean build artifacts
# Services
make install-services # Install local services
make start-services # Start local services
make stop-services # Stop local services
# Documentation
make docs # Build documentation
make docs-serve # Serve docs locallyuv pip install -e .# Check if ports are in use
lsof -i :8880 # Kokoro
lsof -i :2022 # Whisper
lsof -i :7880 # LiveKit
# Kill stuck processes
pkill -f kokoro
pkill -f whisper