--- title: "Building" description: "Build Voicebox for production" --- ## Overview Voicebox uses a multi-step build process to create platform-specific installers. ## Quick Build ```bash # Build for your current platform make build # Or manually cd tauri && bun run tauri build ``` ## Build Steps ### 1. Build Server Binary The Python backend must be compiled into a standalone executable first: ```bash ./scripts/build-server.sh ``` This uses PyInstaller to create a binary in `tauri/src-tauri/binaries/`. **Platform-specific binaries:** - macOS: `voicebox-server-aarch64-apple-darwin` or `voicebox-server-x86_64-apple-darwin` - Windows: `voicebox-server-x86_64-pc-windows-msvc.exe` - Linux: `voicebox-server-x86_64-unknown-linux-gnu` The build script automatically detects your platform and creates the appropriate binary. ### 2. Build Tauri App ```bash cd tauri bun run tauri build ``` This will: 1. Build the React frontend (Vite) 2. Compile the Rust backend 3. Bundle the server binary as a sidecar 4. Create platform-specific installers ### 3. Output Installers are created in `tauri/src-tauri/target/release/bundle/`: **macOS:** - `dmg/` - Disk image installer - `macos/` - App bundle **Windows:** - `msi/` - MSI installer - `nsis/` - NSIS installer **Linux:** - `deb/` - Debian package - `appimage/` - AppImage ## Advanced Options ### Building for Specific Platform ```bash # Build for macOS (Apple Silicon) bun run tauri build -- --target aarch64-apple-darwin # Build for macOS (Intel) bun run tauri build -- --target x86_64-apple-darwin # Build for Windows bun run tauri build -- --target x86_64-pc-windows-msvc # Build for Linux bun run tauri build -- --target x86_64-unknown-linux-gnu ``` ### Using Local Qwen3-TTS If you're developing Qwen3-TTS locally: ```bash export QWEN_TTS_PATH=~/path/to/Qwen3-TTS ./scripts/build-server.sh ``` This makes PyInstaller use your local version instead of the pip package. ### Debug Build ```bash cd tauri bun run tauri build --debug ``` Creates a debug build with symbols and logging. ## Build Configuration ### Tauri Config Edit `tauri/src-tauri/tauri.conf.json`: ```json { "bundle": { "identifier": "com.voicebox.app", "icon": [ "icons/32x32.png", "icons/128x128.png", "icons/icon.icns", "icons/icon.ico" ] } } ``` ### Sidecar Configuration The Python server is bundled as a sidecar: ```json { "tauri": { "bundle": { "externalBin": [ "binaries/voicebox-server" ] } } } ``` ## Code Signing ### macOS To sign the app for distribution: ```bash # Set signing identity export APPLE_SIGNING_IDENTITY="Developer ID Application: Your Name" # Build with signing bun run tauri build ``` For notarization: ```bash # Set credentials export APPLE_ID="your@email.com" export APPLE_PASSWORD="app-specific-password" # Build and notarize bun run tauri build ``` ### Windows For Windows code signing: ```bash # Set certificate export WINDOWS_CERTIFICATE_PATH="/path/to/cert.pfx" export WINDOWS_CERTIFICATE_PASSWORD="password" # Build with signing bun run tauri build ``` ## Release Process The full release process is automated: ```bash # 1. Bump version bumpversion patch # or minor/major # 2. Build all platforms (CI/CD handles this) git push --tags # 3. GitHub Actions creates releases ``` See [CONTRIBUTING.md](/development/contributing) for the full release workflow. ## Troubleshooting **Common issues:** - Missing Python dependencies: `pip install -r requirements.txt` - PyInstaller not found: `pip install pyinstaller` - Qwen3-TTS not installed: `pip install git+https://github.com/QwenLM/Qwen3-TTS.git` **Solution:** ```bash cd backend source venv/bin/activate pip install -r requirements.txt pip install pyinstaller ``` **Common issues:** - Rust not installed: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` - Server binary missing: Run `./scripts/build-server.sh` first - Node modules outdated: `bun install` **Solution:** ```bash # Clean and rebuild cd tauri/src-tauri cargo clean cd ../.. ./scripts/build-server.sh bun run tauri build ``` **Check:** - Server binary has execute permissions - All dependencies are bundled - Check logs in the app's data directory **macOS:** ```bash tail -f ~/Library/Application\ Support/com.voicebox.app/logs/server.log ``` **Windows:** ```bash type %APPDATA%\com.voicebox.app\logs\server.log ``` ## CI/CD GitHub Actions automatically builds releases when tags are pushed: ```yaml # .github/workflows/release.yml on: push: tags: - 'v*' ``` See the [repository](https://github.com/jamiepine/voicebox) for the full CI/CD configuration.