Skip to main content

Local - Faster-Whisper

Local speech-to-text via Faster-Whisper, a fast reimplementation of OpenAI's Whisper using CTranslate2.

Official Documentation


Local Setup

CPU-only:

docker run -d \
--name faster-whisper \
-p 9000:8000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
fedirz/faster-whisper-server:latest-cpu

With GPU (NVIDIA):

docker run -d \
--gpus all \
--name faster-whisper \
-p 9000:8000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
fedirz/faster-whisper-server:latest-cuda

Using Docker Compose:

curl -sO https://raw.githubusercontent.com/fedirz/faster-whisper-server/master/compose.yaml

# For GPU
docker compose up --detach faster-whisper-server-cuda

# For CPU
docker compose up --detach faster-whisper-server-cpu

Using pip

pip install faster-whisper-server
faster-whisper-server --host 0.0.0.0 --port 9000

Verify

curl http://localhost:9000/health
# Should return: {"status":"ok"}

Provider Configuration

import { FasterWhisperProvider } from '@llmrtc/llmrtc-provider-local';

const stt = new FasterWhisperProvider({
baseUrl: process.env.FASTER_WHISPER_URL || 'http://localhost:9000'
});

Environment Variables

VariableDefaultDescription
FASTER_WHISPER_URLhttp://localhost:9000Faster-Whisper server URL

Provider Options

interface FasterWhisperConfig {
baseUrl?: string; // Server URL
model?: string; // Model size: 'tiny', 'base', 'small', 'medium', 'large-v3'
language?: string; // Force language (e.g., 'en') for faster processing
}

Model Comparison

ModelSizeSpeedAccuracyVRAM
tiny75MBFastestBasic~1GB
base145MBFastGood~1GB
small500MBMediumBetter~2GB
medium1.5GBSlowerGreat~5GB
large-v33GBSlowestBest~10GB

Key Features

  • OpenAI API Compatible: Drop-in replacement for OpenAI Whisper API
  • Streaming Support: Transcription sent via SSE as audio is processed
  • Dynamic Model Loading: Specify model per request; auto-loads and offloads
  • Live Transcription: Audio sent via WebSocket for real-time transcription

Notes

  • Lower latency than cloud STT when running on GPU locally
  • Ensure the server runs with a compatible model
  • Test with a short WAV file before integrating
  • For GPU support, ensure NVIDIA Container Toolkit is installed
  • Models are cached in ~/.cache/huggingface by default