Expert guidance for the VoiceBridge voice-text bridge project. Helps with STT/TTS features, hexagonal architecture, GPU acceleration, audio processing, and CLI development using uv package manager.
Expert guidance for developing and maintaining the VoiceBridge project - a comprehensive bidirectional voice-text CLI tool with professional-grade speech recognition and synthesis.
VoiceBridge is built on OpenAI's Whisper (STT) and VibeVoice (TTS) with advanced features including GPU acceleration, memory optimization, hotkey support, and hexagonal architecture.
VoiceBridge follows **hexagonal architecture** (ports and adapters):
```
voicebridge/
├── domain/ # Core business logic and models
├── ports/ # Interfaces/abstract base classes
├── adapters/ # External integrations (audio, GPU, Whisper, TTS, config)
├── services/ # Application services (orchestration)
├── cli/ # Command line interface (Typer-based)
└── tests/ # Test suite
```
**CRITICAL**: This project uses `uv` for Python package management. Always use Makefile commands or `uv run` for all operations.
```bash
make prepare
make prepare-cuda
make prepare-tray
uv venv .venv
uv pip install --editable ".[dev]"
```
```bash
make help
make lint
make test
make test-fast
make clean
```
**All Python commands must use `uv run`:**
```bash
uv run ruff check --fix .
uv run pytest
uv run python -m voicebridge --help
uv pip install package-name
```
Follow hexagonal architecture patterns:
1. **Domain models** (`domain/models.py`): Define data structures
2. **Port interfaces** (`ports/interfaces.py`): Define abstract contracts
3. **Adapters** (`adapters/`): Implement external integrations
4. **Services** (`services/`): Orchestrate business logic
5. **CLI commands** (`cli/`): Expose functionality to users
**Example**: Adding a new export format
Before committing:
```bash
make lint # Must pass with no errors
make test # Must pass with adequate coverage
```
Add tests for:
**Speech-to-Text:**
```bash
uv run python -m voicebridge listen
uv run python -m voicebridge hotkey --key f9 --mode toggle
uv run python -m voicebridge transcribe audio.mp3 --output transcript.txt
uv run python -m voicebridge batch-transcribe /path/to/audio/ --workers 4
uv run python -m voicebridge listen-resumable audio.wav --session-name "my-session"
```
**Text-to-Speech:**
```bash
uv run python -m voicebridge tts generate "Hello, VoiceBridge!" --voice en-Alice_woman
uv run python -m voicebridge tts listen-clipboard --streaming
uv run python -m voicebridge tts listen-selection
uv run python -m voicebridge tts daemon start --mode clipboard
uv run python -m voicebridge tts daemon status
```
**Audio Processing:**
```bash
uv run python -m voicebridge audio preprocess input.wav output.wav --noise-reduction 0.8
uv run python -m voicebridge audio split large.mp3 --method duration --chunk-duration 300
```
**System & Performance:**
```bash
uv run python -m voicebridge gpu status
uv run python -m voicebridge gpu benchmark --model base
uv run python -m voicebridge performance stats
```
**Configuration:**
```bash
uv run python -m voicebridge config --show
uv run python -m voicebridge config --set-key use_gpu --value true
uv run python -m voicebridge profile save my-profile
uv run python -m voicebridge profile load my-profile
```
**Core Requirements:**
**Key Dependencies:**
Voice samples should be:
Run guided setup:
```bash
uv run python setup_tts.py
```
Hotkeys work globally across all applications.
**Add a new Whisper model size:**
1. Update `domain/models.py` enum
2. Add benchmark support in `adapters/transcription.py`
3. Update CLI help text in `cli/commands.py`
**Implement a new export format:**
1. Add format to `domain/models.py`
2. Implement exporter in `services/export_service.py`
3. Add CLI command option in `cli/commands.py`
4. Write tests for format generation
**Optimize GPU memory usage:**
1. Check `adapters/system.py` for detection logic
2. Adjust chunking in `services/transcription_service.py`
3. Update memory limits in `domain/models.py`
**Add new audio processing feature:**
1. Implement in `adapters/audio/processor.py`
2. Expose via service in `services/`
3. Add CLI command in `cli/commands.py`
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/voicebridge-development-assistant/raw