Transcribe via Faster Whisper
Overview
Free, local transcription using faster-whisper running in Docker. Extracts audio from video, sends it to the local whisper server, and produces both full text and timestamped JSON output.
Prerequisites
- Docker (for faster-whisper transcription service)
- ffmpeg (for audio extraction)
Workflow
Step 1: Set Up Transcription Service
Check if a compose.yaml exists in the project with a faster-whisper service. If not, create one:
services:
faster-whisper:
image: fedirz/faster-whisper-server:latest-cpu
container_name: faster-whisper
ports: ["8000:8000"]
volumes:
- ./hf_cache:/root/.cache/huggingface
restart: unless-stopped
Add hf_cache/ to .gitignore. Start with docker compose up -d.
Step 2: Extract Audio
Extract audio from video to reduce upload size (skip if input is already audio):
ffmpeg -i "$INPUT" -vn -acodec libmp3lame -q:a 4 /tmp/audio.mp3 -y
Step 3: Transcribe
Wait for whisper server health check:
curl -s http://localhost:8000/healthSend for transcription with timestamps:
curl -s http://localhost:8000/v1/audio/transcriptions \ -F "file=@/tmp/audio.mp3" \ -F "model=Systran/faster-whisper-small" \ -F "response_format=verbose_json" \ -o transcription.jsonSave both the full text and the timestamped JSON.
Step 4: Output
Produce two files in the output directory:
transcription.json— timestamped segments with start/end timestranscription.txt— full plain text transcript
Tips
- First run downloads the model (~500MB) — subsequent runs are fast.
- For long recordings (>1h), transcription may take several minutes.
- The
verbose_jsonformat includes per-segment timestamps, which are essential for downstream tools like video cutting. - If the server is not responding, check
docker compose logs faster-whisper.