No description
  • Python 91.8%
  • Dockerfile 8.2%
Find a file
2026-07-16 20:46:30 +03:00
.github/workflows ⬆️(python) set min to 3.12 2026-07-02 18:36:56 +02:00
app fix import 2026-07-16 20:46:30 +03:00
docs ⬆️(deps) bump whisperx from 3.3.1 to 3.8.5 2026-04-22 19:54:17 +02:00
.env.example (audio) preload alignment models and clarify model settings 2026-02-18 16:44:34 +01:00
.gitignore 📝(devex) update .gitignore for AI agent and editor files 2026-02-11 15:58:03 +01:00
.pre-commit-config.yaml chore: init 2024-10-25 15:30:09 +02:00
LICENSE Initial commit 2024-10-24 10:37:07 +02:00
logging-config.yaml ♻️(backend) switch from insanely-fast-whisper to whisperX for diarization 2025-09-05 14:37:41 +02:00
pyproject.toml listen on localhost and fix pyproject 2026-07-16 19:27:21 +03:00
README.md 📝(docs) add documentation for live testing and GPU integration tests 2026-04-22 15:29:08 +02:00
uv.lock ⬆️(python) set min to 3.12 2026-07-02 18:36:56 +02:00

Whisper OpenAI API

FastAPI-based ASR (Automatic Speech Recognition) API built on WhisperX. Provides transcription, word-level alignment, and speaker diarization with OpenAI-compatible endpoints.

Getting Started

Install uv

NB: This package uses uv for package management as a modern alternative to pip. Install instructions in this link.

API-only Development

Inference libraries (whisperx, pytorch, etc.) are heavy and may not run on all devices. We provide a dev dependency group to allow running API tests locally and IDE autocompletion. To install:

uv sync --group dev

Full Inference Development

To develop with a fully functional transcription pipeline:

uv sync --group dev --group inference

Run the server locally (port 8010 avoids conflicts with other services):

export PORT=8010
export RELOAD=true
export LOGGING_CONFIG=logging-config.yaml
python app/main.py

Testing

Tests mock actual inference and can be run locally:

cd app
python -m pytest tests/ -v

Integration tests (not run in CI)

Check the documentation to run integration tests on GPU.

Environment Variables

Variable Description Default
API_KEY API key for API access Required
HF_TOKEN Hugging Face token Required
BATCH_SIZE Transcription batch size 16
MODEL WhisperX model to load large-v2
TIMEOUT_KEEP_ALIVE Keep-alive timeout (seconds) 60
RETURN_CHAR_ALIGNMENTS Return character-level alignments false
INTERPOLATE_METHOD WhisperX interpolation method nearest
FILL_NEAREST Fill nearest gaps in alignment false
PORT Server port 8000
RELOAD Enable auto-reload false
ROOT_PATH API root path None
LOGGING_CONFIG Path to logging config file None
DEBUG Enable debug logging false

Contributing

Please follow these guidelines when contributing to this repo.