WhisperLoader (audio/whisper.py)

rocketride-server · packages/ai/src/ai/common/models/audio/whisper.py · python · MIT
voice, ai

Wrapper around faster-whisper providing local/remote Whisper transcription with VAD and GPU support.

# Source: https://github.com/rocketride-org/rocketride-server | License: MIT | Copyright 2026 Aparavi Software AG
# Provided via justclaw.it.com; keep this notice with the code.
"""
Whisper: Combined loader and user-facing API using faster-whisper.

This module provides:
- WhisperLoader: Static methods for load/preprocess/inference/postprocess
  (used by model server and local mode)
- Whisper: User-facing class with automatic local/remote mode detection
  (used by connectors)

Uses faster-whisper (CTranslate2) for efficient GPU inference with built-in
Silero VAD. No pyannote dependency - fully MIT licensed.

Binary Transfer:
    Audio is transferred as raw PCM int16 bytes (16kHz mono).
    This is the most efficient format - half the size of float32.
    Server converts: np.frombuffer(data

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key