mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-18 22:30:40 -07:00
Enhance contribution guidelines and remove outdated setup documentation
- Updated CONTRIBUTING.md with detailed setup instructions for Bun, Python, and Rust. - Removed SETUP.md as its content is now integrated into CONTRIBUTING.md. - Adjusted README.md to reference the new contribution guidelines. - Improved the HistoryTable component for better accessibility and user interaction. - Updated global styles and landing page elements for improved aesthetics and functionality.
This commit is contained in:
+121
-12
@@ -13,10 +13,22 @@ Thank you for your interest in contributing to Voicebox! This document provides
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- [Bun](https://bun.sh) - Package manager
|
||||
- [Rust](https://rustup.rs) - For Tauri desktop app
|
||||
- [Python 3.11+](https://python.org) - For backend
|
||||
- Git
|
||||
- **[Bun](https://bun.sh)** - Fast JavaScript runtime and package manager
|
||||
```bash
|
||||
curl -fsSL https://bun.sh/install | bash
|
||||
```
|
||||
|
||||
- **[Python 3.11+](https://python.org)** - For backend development
|
||||
```bash
|
||||
python --version # Should be 3.11 or higher
|
||||
```
|
||||
|
||||
- **[Rust](https://rustup.rs)** - For Tauri desktop app (installed automatically by Tauri CLI)
|
||||
```bash
|
||||
rustc --version # Check if installed
|
||||
```
|
||||
|
||||
- **Git** - Version control
|
||||
|
||||
### Development Setup
|
||||
|
||||
@@ -26,26 +38,104 @@ Thank you for your interest in contributing to Voicebox! This document provides
|
||||
cd voicebox
|
||||
```
|
||||
|
||||
2. **Install dependencies**
|
||||
2. **Install JavaScript dependencies**
|
||||
```bash
|
||||
bun install
|
||||
cd backend && pip install -r requirements.txt && cd ..
|
||||
```
|
||||
This installs dependencies for:
|
||||
- `app/` - Shared React frontend
|
||||
- `tauri/` - Tauri desktop wrapper
|
||||
- `web/` - Web deployment wrapper
|
||||
|
||||
3. **Set up Python backend**
|
||||
```bash
|
||||
cd backend
|
||||
|
||||
# Create virtual environment
|
||||
python -m venv venv
|
||||
|
||||
# Activate virtual environment
|
||||
source venv/bin/activate # On macOS/Linux
|
||||
# or
|
||||
venv\Scripts\activate # On Windows
|
||||
|
||||
# Install Python dependencies
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Install Qwen3-TTS (required for voice synthesis)
|
||||
pip install git+https://github.com/QwenLM/Qwen3-TTS.git
|
||||
```
|
||||
|
||||
3. **Set up the database**
|
||||
4. **Initialize database**
|
||||
```bash
|
||||
cd backend
|
||||
python -c "from database import init_db; init_db()"
|
||||
```
|
||||
This creates the SQLite database at `data/voicebox.db`.
|
||||
|
||||
4. **Start development**
|
||||
```bash
|
||||
# Terminal 1: Backend server
|
||||
bun run dev:server
|
||||
5. **Start development servers**
|
||||
|
||||
# Terminal 2: Desktop app
|
||||
**Terminal 1: Backend server**
|
||||
```bash
|
||||
cd backend
|
||||
source venv/bin/activate # Activate venv if not already active
|
||||
bun run dev:server
|
||||
# Or manually: uvicorn main:app --reload --port 8000
|
||||
```
|
||||
Backend will be available at `http://localhost:8000`
|
||||
|
||||
**Terminal 2: Desktop app**
|
||||
```bash
|
||||
bun run dev
|
||||
```
|
||||
This will:
|
||||
- Start Vite dev server on port 5173
|
||||
- Launch Tauri window pointing to localhost:5173
|
||||
- Enable hot reload
|
||||
|
||||
**Optional: Web app**
|
||||
```bash
|
||||
bun run dev:web
|
||||
```
|
||||
Web app will be available at `http://localhost:5174`
|
||||
|
||||
### Model Downloads
|
||||
|
||||
Models are automatically downloaded from HuggingFace Hub on first use:
|
||||
- **Whisper** (transcription): Auto-downloads on first transcription
|
||||
- **Qwen3-TTS** (voice cloning): Auto-downloads on first generation (~2-4GB)
|
||||
|
||||
First-time usage will be slower due to model downloads, but subsequent runs will use cached models.
|
||||
|
||||
### Building
|
||||
|
||||
**Build Python server binary:**
|
||||
```bash
|
||||
./scripts/build-server.sh
|
||||
```
|
||||
Creates platform-specific binary in `tauri/src-tauri/binaries/`
|
||||
|
||||
**Build Tauri desktop app:**
|
||||
```bash
|
||||
cd tauri
|
||||
bun run tauri build
|
||||
```
|
||||
Creates platform-specific installers (`.dmg`, `.msi`, `.AppImage`)
|
||||
|
||||
**Build web app:**
|
||||
```bash
|
||||
cd web
|
||||
bun run build
|
||||
```
|
||||
Output in `web/dist/`
|
||||
|
||||
### Generate OpenAPI Client
|
||||
|
||||
After starting the backend server:
|
||||
```bash
|
||||
./scripts/generate-api.sh
|
||||
```
|
||||
This downloads the OpenAPI schema and generates the TypeScript client in `app/src/lib/api/`
|
||||
|
||||
## Development Workflow
|
||||
|
||||
@@ -237,11 +327,30 @@ Releases are managed by maintainers:
|
||||
4. Push tag: `git push --tags`
|
||||
5. GitHub Actions builds and releases
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) for common issues and solutions.
|
||||
|
||||
**Quick fixes:**
|
||||
|
||||
- **Backend won't start:** Check Python version (3.11+), ensure venv is activated, install dependencies
|
||||
- **Tauri build fails:** Ensure Rust is installed, clean build with `cd tauri/src-tauri && cargo clean`
|
||||
- **OpenAPI client generation fails:** Ensure backend is running, check `curl http://localhost:8000/openapi.json`
|
||||
|
||||
## Questions?
|
||||
|
||||
- Open an issue for bugs or feature requests
|
||||
- Check existing issues and discussions
|
||||
- Review the codebase to understand patterns
|
||||
- See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) for common issues
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [README.md](README.md) - Project overview
|
||||
- [backend/README.md](backend/README.md) - API documentation
|
||||
- [docs/AUTOUPDATER_QUICKSTART.md](docs/AUTOUPDATER_QUICKSTART.md) - Auto-updater setup
|
||||
- [SECURITY.md](SECURITY.md) - Security policy
|
||||
- [CHANGELOG.md](CHANGELOG.md) - Version history
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ Voicebox aims to be the **one-stop shop for everything voice** — cloning, synt
|
||||
|
||||
## Development
|
||||
|
||||
See [SETUP.md](SETUP.md) for detailed setup instructions.
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed setup and contribution guidelines.
|
||||
|
||||
### Quick Start
|
||||
|
||||
|
||||
@@ -1,214 +0,0 @@
|
||||
# Development Setup Guide
|
||||
|
||||
This guide will help you set up the Voicebox development environment.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Bun** - Fast JavaScript runtime and package manager
|
||||
```bash
|
||||
curl -fsSL https://bun.sh/install | bash
|
||||
```
|
||||
|
||||
- **Python 3.11+** - For backend development
|
||||
```bash
|
||||
python --version # Should be 3.11 or higher
|
||||
```
|
||||
|
||||
- **Rust** - For Tauri desktop app (installed automatically by Tauri CLI)
|
||||
```bash
|
||||
rustc --version # Check if installed
|
||||
```
|
||||
|
||||
- **Node.js 18+** (optional) - Fallback if Bun is not available
|
||||
|
||||
## Initial Setup
|
||||
|
||||
### 1. Install Dependencies
|
||||
|
||||
```bash
|
||||
# Install all workspace dependencies
|
||||
bun install
|
||||
```
|
||||
|
||||
This will install dependencies for:
|
||||
- `app/` - Shared React frontend
|
||||
- `tauri/` - Tauri desktop wrapper
|
||||
- `web/` - Web deployment wrapper
|
||||
|
||||
### 2. Setup Backend
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
|
||||
# Create virtual environment
|
||||
python -m venv venv
|
||||
|
||||
# Activate virtual environment
|
||||
source venv/bin/activate # On macOS/Linux
|
||||
# or
|
||||
venv\Scripts\activate # On Windows
|
||||
|
||||
# Install Python dependencies
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 3. Initialize Database
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
python -c "from database import init_db; init_db()"
|
||||
```
|
||||
|
||||
This creates the SQLite database at `data/voicebox.db`.
|
||||
|
||||
### 4. Install Qwen3-TTS (Optional)
|
||||
|
||||
The Qwen3-TTS models are automatically downloaded from HuggingFace Hub on first use. However, you need to install the `qwen_tts` package:
|
||||
|
||||
```bash
|
||||
pip install git+https://github.com/QwenLM/Qwen3-TTS.git
|
||||
```
|
||||
|
||||
**Note:** Models (~2-4GB) will be automatically downloaded on first generation. This may take a few minutes depending on your internet connection.
|
||||
|
||||
## Development
|
||||
|
||||
### Start Backend Server
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
source venv/bin/activate # Activate venv if not already active
|
||||
uvicorn main:app --reload --port 8000
|
||||
```
|
||||
|
||||
Backend will be available at `http://localhost:8000`
|
||||
|
||||
### Start Tauri Desktop App
|
||||
|
||||
```bash
|
||||
# From project root
|
||||
bun run dev
|
||||
```
|
||||
|
||||
Or manually:
|
||||
```bash
|
||||
cd tauri
|
||||
bun run tauri dev
|
||||
```
|
||||
|
||||
This will:
|
||||
1. Start Vite dev server on port 5173
|
||||
2. Launch Tauri window pointing to localhost:5173
|
||||
3. Enable hot reload
|
||||
|
||||
### Start Web App
|
||||
|
||||
```bash
|
||||
# From project root
|
||||
bun run dev:web
|
||||
```
|
||||
|
||||
Or manually:
|
||||
```bash
|
||||
cd web
|
||||
bun run dev
|
||||
```
|
||||
|
||||
Web app will be available at `http://localhost:5174` (or next available port)
|
||||
|
||||
## Building
|
||||
|
||||
### Build Python Server Binary
|
||||
|
||||
```bash
|
||||
./scripts/build-server.sh
|
||||
```
|
||||
|
||||
This creates a platform-specific binary in `tauri/src-tauri/binaries/`
|
||||
|
||||
### Build Tauri Desktop App
|
||||
|
||||
```bash
|
||||
cd tauri
|
||||
bun run tauri build
|
||||
```
|
||||
|
||||
Creates platform-specific installers:
|
||||
- macOS: `.app`, `.dmg`
|
||||
- Windows: `.exe`, `.msi`
|
||||
- Linux: `.deb`, `.AppImage`
|
||||
|
||||
### Build Web App
|
||||
|
||||
```bash
|
||||
cd web
|
||||
bun run build
|
||||
```
|
||||
|
||||
Output in `web/dist/`
|
||||
|
||||
## Generate OpenAPI Client
|
||||
|
||||
After starting the backend server:
|
||||
|
||||
```bash
|
||||
./scripts/generate-api.sh
|
||||
```
|
||||
|
||||
This will:
|
||||
1. Download OpenAPI schema from backend
|
||||
2. Generate TypeScript client in `app/src/lib/api/`
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
voicebox/
|
||||
├── app/ # Shared React frontend
|
||||
├── tauri/ # Tauri desktop wrapper
|
||||
├── web/ # Web deployment wrapper
|
||||
├── backend/ # Python FastAPI server
|
||||
├── scripts/ # Build and utility scripts
|
||||
├── data/ # User data (gitignored)
|
||||
└── docs/ # Documentation
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) for common issues and solutions.
|
||||
|
||||
### Quick Fixes
|
||||
|
||||
**Backend won't start:**
|
||||
- Check Python version: `python --version` (needs 3.11+)
|
||||
- Ensure virtual environment is activated
|
||||
- Install dependencies: `pip install -r requirements.txt`
|
||||
|
||||
**Tauri build fails:**
|
||||
- Ensure Rust is installed: `rustc --version`
|
||||
- Install Tauri CLI: `bunx @tauri-apps/cli install`
|
||||
- Clean build: `cd tauri/src-tauri && cargo clean`
|
||||
|
||||
**OpenAPI client generation fails:**
|
||||
- Ensure backend is running on port 8000
|
||||
- Check `curl http://localhost:8000/openapi.json` returns valid JSON
|
||||
|
||||
## Model Downloads
|
||||
|
||||
Models are automatically downloaded from HuggingFace Hub on first use:
|
||||
- **Whisper** (transcription): Auto-downloads on first transcription
|
||||
- **Qwen3-TTS** (voice cloning): Auto-downloads on first generation
|
||||
|
||||
First-time usage will be slower due to model downloads, but subsequent runs will use cached models.
|
||||
|
||||
## Next Steps
|
||||
|
||||
- Read [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines
|
||||
- Check [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) if you encounter issues
|
||||
- Review [backend/README.md](backend/README.md) for API documentation
|
||||
- See [README.md](README.md) for project overview
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [Auto-Updater Setup](docs/AUTOUPDATER_QUICKSTART.md) - Configure automatic updates
|
||||
- [Security Policy](SECURITY.md) - Security reporting and best practices
|
||||
- [Changelog](CHANGELOG.md) - Version history and changes
|
||||
@@ -1 +0,0 @@
|
||||
# Generation history components
|
||||
@@ -80,22 +80,15 @@ export function HistoryTable() {
|
||||
{history.map((gen) => {
|
||||
const isCurrentlyPlaying = currentAudioId === gen.id && isPlaying;
|
||||
return (
|
||||
<div
|
||||
<button
|
||||
key={gen.id}
|
||||
type="button"
|
||||
className={cn(
|
||||
'flex items-stretch gap-4 h-24 border rounded-md p-3 bg-card hover:bg-muted/70 transition-colors cursor-pointer',
|
||||
'flex items-stretch gap-4 h-24 border rounded-md p-3 bg-card hover:bg-muted/70 transition-colors cursor-pointer text-left w-full',
|
||||
isCurrentlyPlaying && 'bg-muted/70',
|
||||
)}
|
||||
onClick={() => handlePlay(gen.id, gen.text)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
e.preventDefault();
|
||||
handlePlay(gen.id, gen.text);
|
||||
}
|
||||
}}
|
||||
tabIndex={0}
|
||||
role="button"
|
||||
aria-label="Play audio"
|
||||
aria-label={`Play audio: ${gen.text.substring(0, 50)}`}
|
||||
>
|
||||
{/* Waveform icon */}
|
||||
<div className="flex items-center shrink-0">
|
||||
@@ -129,10 +122,7 @@ export function HistoryTable() {
|
||||
</div>
|
||||
|
||||
{/* Far right - Ellipsis actions */}
|
||||
<div
|
||||
className="w-10 shrink-0 flex justify-end"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<div className="w-10 shrink-0 flex justify-end">
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
@@ -140,6 +130,7 @@ export function HistoryTable() {
|
||||
size="icon"
|
||||
className="h-8 w-8"
|
||||
aria-label="Actions"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<MoreHorizontal className="h-4 w-4" />
|
||||
</Button>
|
||||
@@ -164,7 +155,7 @@ export function HistoryTable() {
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@import "tailwindcss/preflight";
|
||||
@import "tailwindcss";
|
||||
|
||||
@layer base {
|
||||
:root {
|
||||
|
||||
@@ -199,6 +199,7 @@ export default function Home() {
|
||||
</h2>
|
||||
<div className="flex justify-center">
|
||||
<div className="w-full max-w-5xl">
|
||||
{/** biome-ignore lint/a11y/useMediaCaption: not generating captions for this, ya damn linter */}
|
||||
<video
|
||||
className="w-full h-auto rounded-lg shadow-lg"
|
||||
controls
|
||||
@@ -206,7 +207,11 @@ export default function Home() {
|
||||
preload="metadata"
|
||||
poster="/VoiceBoxAppScreenshot.webp"
|
||||
>
|
||||
<source src="/voicebox-demo.webm" type="video/webm" />
|
||||
<source
|
||||
src="/voicebox-demo.webm"
|
||||
type="video/webm"
|
||||
aria-label="Voicebox Demo Video"
|
||||
/>
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
</div>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user