Spaces:
Sleeping
Sleeping
Contributing to OmniVoice Studio
Thanks for your interest in improving OmniVoice Studio! This guide covers everything you need to get started.
Quick Links
| π¬ Chat | Discord |
| π Bugs | GitHub Issues |
| π·οΈ Good First Issues | Filtered list |
| π Roadmap | README β Roadmap |
Development Setup
Prerequisites
- Git
- Bun (frontend package manager)
- uv (Python environment manager)
- ffmpeg (audio/video processing)
- Python 3.10+ (managed automatically by
uv)
Clone & Run
git clone https://github.com/debpalash/OmniVoice-Studio.git
cd OmniVoice-Studio
bun install
bun run dev
This starts both services:
| Service | URL | What it does |
|---|---|---|
| Backend | localhost:3900 |
FastAPI server β TTS, ASR, diarization, dubbing pipeline |
| Frontend | localhost:3901 |
React + Vite UI |
Desktop App (Tauri)
bun run desktop
Requires Rust and platform-specific Tauri dependencies β see the Tauri prerequisites.
Project Structure
OmniVoice-Studio/
βββ backend/ # Python FastAPI server
β βββ api/ # Route handlers
β βββ core/ # Config, prefs, constants
β βββ services/ # TTS engines, ASR, dubbing, audio DSP
β βββ tts_backend.py # β Multi-engine TTS registry
βββ frontend/ # React + Vite
β βββ src/
β β βββ components/ # UI components
β β βββ hooks/ # Custom React hooks
β β βββ stores/ # Zustand state slices
β β βββ utils/ # Shared utilities
β βββ src-tauri/ # Rust/Tauri desktop shell
βββ deploy/ # Docker, CI configs
βββ docs/ # Screenshots, MCP config
βββ scripts/ # Build & release scripts
How to Contribute
Bug Reports
Open an issue with:
- What happened vs what you expected
- Steps to reproduce
- OS, GPU, and Python version (find in Settings β Logs)
- Error logs (Settings β Logs β copy relevant lines)
Pull Requests
- Fork the repo and create a branch from
main - Keep PRs focused β one feature or fix per PR
- Run tests before pushing:
# Backend tests uv run pytest backend/ -x -q # Frontend build check cd frontend && npx vite build --mode development - Write a clear PR title β it becomes the squash-merge commit message
- Don't include local machine stats, file paths, or private system info in PR descriptions
Adding a New TTS Engine
OmniVoice's TTS backend is a plugin registry. Adding a new engine takes ~50 lines:
- Open
backend/services/tts_backend.py - Create a class extending
TTSBackend:
class MyEngineBackend(TTSBackend):
id = "my-engine"
display_name = "My Engine (description)"
@classmethod
def is_available(cls) -> tuple[bool, str]:
try:
import my_engine # noqa: F401
return True, "ready"
except ImportError:
return False, "my_engine not installed. pip install my-engine"
@property
def sample_rate(self) -> int:
return 24000
@property
def supported_languages(self) -> list[str]:
return ["en", "zh"]
def generate(self, text: str, **kw) -> torch.Tensor:
# ... call your engine, return [1, num_samples] tensor
- Register it in
_REGISTRYat the bottom of the file - That's it β it auto-appears in Settings β TTS Engine
Code Style
Python (Backend)
- Formatter: We don't enforce one globally β match the style of the file you're editing
- Logging: Use
logger.warning()/logger.error(), never bareprint() - Exceptions: Avoid bare
except: passβ catch specific exceptions - Type hints: Use them for public API functions and class methods
JavaScript/React (Frontend)
- Components: Functional components with hooks
- State: Zustand stores in
src/stores/, organized by slice - CSS: Vanilla CSS in component-level files β no Tailwind
- Naming:
PascalCasefor components,camelCasefor hooks and utils
Rust (Tauri)
- Format:
cargo fmtbefore committing - Modules: One concern per file (
bootstrap.rs,tools.rs,config.rs,commands.rs)
Commit Messages
Write clear, concise messages. The PR title becomes the squash-merge commit.
good: fix: prevent CUDA OOM during concurrent transcription + TTS
good: feat: add CosyVoice 3 TTS backend adapter
good: docs: add platform compatibility matrix to README
bad: fixed stuff
bad: update
bad: WIP
Testing
# Run all backend tests
uv run pytest backend/ -x -q
# Run a specific test file
uv run pytest backend/tests/test_api.py -x -q
# Frontend build validation (no test suite yet)
cd frontend && npx vite build --mode development
# Tauri shell check (requires Rust)
cd frontend/src-tauri && cargo check
Need Help?
- Stuck on setup? Ask in Discord #help
- Not sure where to start? Check good first issues
- Want to discuss a big change? Open a discussion or Discord thread before coding
Thank you for contributing! ποΈ