Thank you for your interest in contributing to VoiceMode. This guide will help you get started with development.
- Python 3.10 or higher
- Astral UV - Package manager (install with
curl -LsSf https://astral.sh/uv/install.sh | sh) - Git
- A working microphone and speakers (for testing)
- System dependencies (see README.md for OS-specific instructions)
-
Fork and clone the repository
External contributors need to fork the repository first (you can't push directly to the main repo):
- Click Fork at https://github.com/mbailey/voicemode
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/voicemode.git cd voicemode -
Install in development mode
uv tool install -e . -
Set up environment variables
# Set your API key export OPENAI_API_KEY=your-key-here # Voice Mode will auto-generate ~/.voicemode/voicemode.env on first run # You can edit this file to customize configuration
# Run all tests
pytest
# Run with coverage
pytest --cov=voice_mode
# Run specific test file
pytest tests/test_server_syntax.py- We use standard Python formatting conventions
- Keep imports organized (stdlib, third-party, local)
- Add type hints where appropriate
- Document functions with docstrings
The easiest way to test your changes:
uv run voicemode converseThis starts a voice conversation directly, without needing Claude Code or MCP.
The repo's .mcp.json uses uv run voicemode, which automatically runs your local development version when Claude Code is started in the repo directory. No configuration changes needed.
- Start Claude Code from the voicemode repo directory
- Your code changes are immediately available via the MCP tools
- Use the voice tools to verify functionality
# Test TTS and audio playback
python -c "from voice_mode.core import text_to_speech; import asyncio; asyncio.run(text_to_speech(...))"-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
-
Run tests to ensure nothing is broken
-
Commit with descriptive messages
-
Push to your fork and create a pull request
git push origin feature/your-feature-name
Then open a PR from your fork to
mbailey/voicemode
Enable debug mode for detailed logging:
export VOICEMODE_DEBUG=trueDebug recordings are saved to ~/.voicemode/audio/
- Update dependencies: Edit
pyproject.tomland runuv pip install -e . - Build package:
make build-package - Run tests:
make test
Feel free to open an issue if you have questions or need help getting started!