Vibe Documentation

repository·main·Indexed 27 days ago

https://github.com/thewh1teagle/vibe

A cross-platform desktop application built with Tauri, React, and TypeScript for private, offline audio and video transcription. Vibe utilizes local AI models such as Whisper, Nemotron 3.5, and Parakeet TDT v3 to provide transcription, speaker diarization, and translation. It supports various input sources including local files, system audio, and URLs, and exports to formats like SRT, VTT, TXT, and PDF. The project includes a CLI, an HTTP API with Swagger documentation, and GPU optimization for macOS, Windows, and Linux.

Tokens
38.8K
Snippets
102
Records
254
Agent score
93%

What's inside Vibe

  1. Overview of Vibe transcription features

    main

    Vibe is a privacy-focused, offline transcription tool for audio and video that runs locally on your device. It supports multiple AI models and provides advanced features for transcription and analysis.

    Key Capabilities:

    • Transcription: Supports almost every language, batch processing, and real-time previews.
    • Input Sources: Local audio/video files, system audio, microphone input, and URLs from popular websites (YouTube, Vimeo, Facebook, Twitter, etc.).
    • Supported Models: Whisper, Nemotron 3.5, and Parakeet TDT v3.
    • Output Formats: SRT, VTT, TXT, HTML, PDF, JSON, and DOCX.
    • AI Analysis: Summarize transcripts using the Claude API or local AI via Ollama support.
    • Advanced Features: Speaker diarization, stable timestamps mode (VAD-backed), translation to English, and GPU optimization (Vulkan/CoreML) for macOS, Windows, and Linux.
  2. Understand the Vibe Architecture

    main

    Vibe is a desktop transcription application composed of three primary components:

    1. Desktop App (desktop/): A Tauri-based application using a TypeScript/React frontend and a Rust backend. It manages the UI, file management, settings, and analytics. It communicates with the Sona runner via local HTTP.
    2. Sona Runner (sona/): A standalone Rust process (using whisper.cpp bindings) responsible for audio transcription, model loading, streaming, and diarization. It is bundled as a Tauri sidecar.
    3. FFmpeg Helper: Bundled with macOS and Windows builds to assist with media processing. The path to this binary is passed to Sona via the SONA_FFMPEG_PATH environment variable.
  3. Speed up development builds with Cranelift

    main

    On Windows (and Unix), you can speed up development builds by using the cranelift codegen backend with a nightly Rust toolchain.

    1. Install Nightly and Cranelift:

      rustup nightly install
      rustup component add rustc-codegen-cranelift-preview --toolchain nightly
    2. Build with Cranelift: Unix:

      CARGO_PROFILE_DEV_CODEGEN_BACKEND="cranelift" cargo +nightly build -Zcodegen-backend

      PowerShell:

      $env:CARGO_PROFILE_DEV_CODEGEN_BACKEND = "cranelift" ; cargo +nightly build -Zcodegen-backend
    # Unix
    CARGO_PROFILE_DEV_CODEGEN_BACKEND="cranelift" cargo +nightly build -Zcodegen-backend
    
    # Powershell
    $env:CARGO_PROFILE_DEV_CODEGEN_BACKEND = "cranelift" ; cargo +nightly build -Zcodegen-backend
  4. System Requirements for Vibe

    main

    Ensure your environment meets the following requirements:

    • Windows: Version 8 or greater.
    • macOS: Version 13.3 or greater.
    • Linux: Tested on ubuntu-22.04+. Note that listening for audio files is currently not supported on Linux.
    • Hardware: No special requirements; resource usage can be customized via advanced settings in the main window.

    Linux Environment Variable: You may need to set the following environment variable before starting the application:

    export WEBKIT_DISABLE_COMPOSITING_MODE=1
  5. Verify Sona Diarization integration

    main

    Follow these steps to verify the integration is working correctly:

    1. Download Binaries: Run uv run scripts/pre_build.py to ensure both sona and sona-diarize are downloaded to desktop/src-tauri/binaries/.
    2. Run App: Use pnpm exec tauri dev to build and launch the application.
    3. Test UI: Navigate to More Options $\rightarrow$ Diarization and enable the toggle. You should be prompted to download the model (~25MB).
    4. Test Transcription: Transcribe audio with diarization enabled; segments should display speaker labels.
    5. Test Fallback: Disable diarization; transcription should proceed normally without speaker labels. If the sona-diarize binary is missing, diarization should be silently skipped without breaking the transcription process.
  6. Configure Windows Code Signing

    main

    To sign Windows binaries, follow these steps:

    1. Install Windows SDK:

      winget install -e --id Microsoft.WindowsSDK.10.0.26100
    2. Generate Certificate: Generate a self-signed certificate and export it to a .pfx file:

      openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3650 -nodes -subj "/CN=Vibe" -addext "extendedKeyUsage=codeSigning"
      openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem -password pass:YOUR_PASSWORD
    3. Setup GitHub Secrets: Convert the .pfx to base64 and add the output to GitHub Secrets:

      • WINDOWS_CERTIFICATE: The base64 output of the .pfx file.
      • WINDOWS_CERTIFICATE_PASSWORD: The password used during the openssl pkcs12 step.
    4. Cleanup:

      rm key.pem cert.pem cert.pfx
    base64 -i cert.pfx
  7. Regenerate the DMG background PNG from SVG

    main

    If you need to regenerate the DMG background PNG from a source SVG (design/dmg_background.svg), use rsvg-convert to set the dimensions to 1440x652 and sips to set the DPI to 144. This ensures the image is a 2x retina asset suitable for a 720x340 window.

    rsvg-convert -w 1440 -h 652 design/dmg_background.svg -o design/dmg_background.png
    sips -s dpiWidth 144 -s dpiHeight 144 design/dmg_background.png
  8. Migrate react-hot-toast to shadcn/ui Sonner

    main

    Replace react-hot-toast with shadcn's Sonner integration.

    1. Install:
      pnpm remove react-hot-toast
      pnpm dlx shadcn@latest add sonner
    2. Setup: Add <Toaster /> from sonner to your App.tsx.
    3. Usage: Replace toast() calls with the toast() function from sonner. The API for toast.promise() is compatible. For progress-based toasts, use toast.loading() with description updates.
    pnpm remove react-hot-toast
    pnpm dlx shadcn@latest add sonner
  9. Guidelines for AI-Assisted (Vibe Coding) PRs

    main

    AI-generated contributions are welcome but must meet the same standards as manual contributions:

    • Focus: Submit one clear change per PR. Avoid including drive-by refactors, formatting noise, or your own local build scripts/helper tools.
    • Context: Ensure your AI agent reads the project documentation and follows existing conventions before generating code.
    • Responsibility: You are responsible for reviewing and verifying all AI-generated code.
    • Alignment: For large or wide-reaching changes, open an issue first to align with maintainers before investing time.
    • Quality: AI-generated code must be clean, tested, and minimal.