|
|
|
|
|
By Greyhaven
## What is Reflector? Reflector is a web application that utilizes local models to process audio content, providing: - **Real-time Transcription**: Convert speech to text using [Whisper](https://github.com/openai/whisper) (multi-language) or [Parakeet](https://huggingface.co/nvidia/parakeet-tdt-0.6b-v2) (English) models - **Speaker Diarization**: Identify and label different speakers using [Pyannote](https://github.com/pyannote/pyannote-audio) 3.1 - **Live Translation**: Translate audio content in real-time to many languages with [Facebook Seamless-M4T](https://github.com/facebookresearch/seamless_communication) - **Topic Detection & Summarization**: Extract key topics and generate concise summaries using LLMs - **Meeting Recording**: Create permanent records of meetings with searchable transcripts ## Architecture The project consists of three primary components: - **Back-End**: Python FastAPI server with async database operations and background processing, found in `server/`. - **Front-End**: Next.js 14 React application with Chakra UI, located in `www/`. - **GPU Models**: Specialized ML models for transcription, diarization, translation, and summarization. Currently, Reflector supports two input methods: - **Screenshare capture**: Real-time audio capture from your browser via WebRTC - **Audio file upload**: Upload pre-recorded audio files for processing ## Installation For full deployment instructions, see the [Self-Hosted Production Guide](docsv2/selfhosted-production.md) and the [Architecture Reference](docsv2/selfhosted-architecture.md). ### Self-Hosted Deployment The self-hosted setup script configures and launches everything on a single server: ```bash # GPU with local Ollama LLM, local S3 storage, and Caddy reverse proxy ./scripts/setup-selfhosted.sh --gpu --ollama-gpu --garage --caddy # With a custom domain (enables Let's Encrypt auto-HTTPS) ./scripts/setup-selfhosted.sh --gpu --ollama-gpu --garage --caddy --domain reflector.example.com # CPU-only mode (slower, no NVIDIA GPU required) ./scripts/setup-selfhosted.sh --cpu --ollama-cpu --garage --caddy # With password authentication ./scripts/setup-selfhosted.sh --gpu --ollama-gpu --garage --caddy --password mysecretpass ``` The script is idempotent and safe to re-run. See `./scripts/setup-selfhosted.sh --help` for all options. ### Authentication Reflector supports three authentication modes: - **Password authentication (recommended for self-hosted / single-user)**: Use the `--password` flag in the setup script. This creates an `admin@localhost` user with the provided password. Users must log in to create, edit, or delete transcripts. ```bash ./scripts/setup-selfhosted.sh --gpu --ollama-gpu --garage --caddy --password mysecretpass ``` - **Authentik OIDC**: For multi-user or enterprise deployments, Reflector supports [Authentik](https://goauthentik.io/) as an OAuth/OIDC provider. This enables SSO, LDAP/AD integration, and centralized user management. Requires configuring `AUTH_BACKEND=jwt` on the backend and `AUTH_PROVIDER=authentik` on the frontend. See the [Self-Hosted Production Guide](docsv2/selfhosted-production.md) for details. - **Public mode (default when no auth is configured)**: If neither password nor Authentik is set up, Reflector runs in public mode. In this mode, no login is required — anyone with access to the URL can use the application. Transcripts are created anonymously (not tied to any user account), which means they **cannot be edited or deleted** through the UI or API. Anonymous transcripts are automatically cleaned up after 7 days. This mode is suitable for demos or testing but not recommended for production use. ### Development Setup ```bash # Backend cd server uv sync docker compose up -d redis uv run alembic upgrade head uv run -m reflector.app --reload # In a separate terminal — start the worker cd server uv run celery -A reflector.worker.app worker --loglevel=info # Frontend cd www pnpm install cp .env_template .env pnpm dev ``` ### Modal.com GPU (Optional) Reflector also supports deploying specialized models (transcription, diarization) to [Modal.com](https://modal.com/) for serverless GPU processing. This is **not integrated into the self-hosted setup script** and must be configured manually. See [Modal.com Setup Guide](docs/docs/installation/modal-setup.md) for deployment instructions. ## Audio Processing Commands ### Process a local audio file ```bash cd server uv run python -m reflector.tools.process path/to/audio.wav ``` ### Reprocess an existing transcription Re-run the processing pipeline on a previously uploaded transcription by its UUID: ```bash cd server uv run -m reflector.tools.process_transcript