What is Whisper API?
Whisper API wraps the blazing-fast whisper.cpp engine (custom fork with native video input) with both a Deepgram-compatible (/v1/listen REST & WebSocket) and an OpenAI-compatible (/v1/audio/transcriptions & /v1/audio/translations) interface. Deploy it on your own infrastructure — your audio never leaves your servers.
It handles everything from pre-recorded audio/video uploads and URL ingestion to real-time microphone streaming, with word-level timestamps (-ojf), Silero VAD filtering, translation to English, speaker diarization, and subtitle export (SRT/VTT).
Core Capabilities
Dual Industry-Standard APIs
Drop-in replacement for Deepgram (/v1/listen) and OpenAI Audio (/v1/audio/transcriptions, /v1/audio/translations) with whisper-1 aliasing and official SDK support.
Real-Time Streaming
WebSocket endpoint for live transcription. Supports PCM, WebM, OGG, FLAC, auto-detection, and cumulative container decoding.
Cross-Platform Acceleration
Native setup scripts for macOS (Metal/Accelerate/CoreML), Linux (x86_64/ARM64/CUDA), and Windows (MSVC/MinGW/CUDA) with zero cloud dependency.
Offline Key & Model CLI
Create/revoke API keys and download GGML models (large-v3-turbo, quantized models, Silero VAD) directly via python -m app.cli.
Architecture
The server sits between your clients and the whisper-cli binary, handling audio/video conversion, authentication, concurrency limiting, and response formatting.
Client (cURL / Python / JS / OpenAI SDK / Deepgram SDK)
│
▼ HTTP POST or WebSocket
FastAPI Server (:7860)
├── /v1/listen POST → Transcribe audio/video file or URL (Deepgram format)
├── /v1/listen WS → Real-time streaming transcription
├── /v1/audio/transcriptions POST → Transcribe audio/video (OpenAI format)
├── /v1/audio/translations POST → Translate speech to English (OpenAI format)
├── /v1/models GET → List installed & registered GGML models (no auth)
└── /v1/auth/test-token POST → Mint API key (dev only; disabled by default)
│
▼ subprocess (-ojf full JSON + optional Silero VAD)
whisper-cli (compiled from innovatorved/whisper.cpp)
│
▼ reads
models/ggml-*.bin (GGML quantized Whisper & Silero VAD models)
Quick Links
Installation
Clone, install dependencies, build the binary on macOS/Linux/Windows, and start the server.
REST Reference
Parameters, headers, response schemas, and error codes for Deepgram and OpenAI endpoints.
WebSocket Streaming
Connection protocol, audio formats, control messages, and example scripts.
Docker
Production deployment with Docker, Docker Compose, and NVIDIA CUDA.
Stack
| Layer | Technology |
|---|---|
| Runtime | Python 3.11+ / FastAPI |
| Transcription | whisper.cpp (C++ binary via subprocess with -ojf word timestamps) |
| Models | GGML Whisper models (large-v3-turbo, small.en, tiny.en, etc.) + Silero VAD v6.2.0 |
| Database | SQLite (or PostgreSQL) via SQLAlchemy 2.x |
| Streaming | Native FastAPI WebSocket |
| Container | Docker (python:3.12-slim-bookworm) |
| License | MIT |