# Repository Briefing: Softcatala/whisper-ctranslate2
> Source: https://repoforai.com/repo/Softcatala/whisper-ctranslate2 (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Softcatala/whisper-ctranslate2
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A (83/100 · Maintenance 35/35 · Adoption 17/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Local AI, CLI, GPU
- **Momentum**: 1,376 ★ total (+0 24h / +2 7d) · 129 forks
- **Topics**: `openai-`, `openai-whisper`, `speech-recognition`, `speech-to-text`, `whisper`
- **When to Use**: Best for: Local transcription pipelines that already use the Whisper CLI, subtitle jobs, and offline or GPU-backed batch runs with explicit control over model and precision. Skip if: You need a managed API, a network streaming service with defined latency guarantees, translation into languages other than English, or verified speaker identities.

## Overview
```text
### Architecture & Core Mechanics
Softcatala's `whisper-ctranslate2` is an MIT-licensed Python CLI that retains the OpenAI Whisper command-line interface while moving model execution to faster-whisper and CTranslate2. CTranslate2 provides x86-64 and AArch64 CPU support and an NVIDIA GPU path. The dependency manifest lists `faster-whisper>=1.2.0`, `ctranslate2`, `numpy`, `tqdm`, and `sounddevice`, and constrains PyAV to `av>=11,<19`: faster-whisper 1.2.1 passes `metadata_errors` to `av.open()`, which PyAV 19 removed.

File transcription and live microphone capture are exposed through the same entrypoint, `whisper-ctranslate2`. Silero VAD can filter non-speech before decoding; optional `pyannote.audio` diarization adds segment-level speaker labels to output such as JSON, VTT, and SRT. For integration, plan around the CLI and its files rather than assuming a network endpoint or a service-level concurrency model.

### Key Capabilities & Differentiators
The CLI handles multilingual speech transcription and speech translation into English only. `--live_transcribe True` enables microphone input, and `--print_colors True` visualizes word confidence in the terminal. `--model_directory` accepts local Whisper models, including fine-tuned or quantized weights, once they have been converted to CTranslate2 format. Use `--device` and `--device_index` to override automatic hardware selection, and `--compute_type` to choose a precision such as `int8`, `float16`, or `float32` as appropriate for the device.

`--batched True` uses VAD and decodes segments independently, with `--batch_size` controlling how many decoding requests the model handles in parallel. Outside that choice, `--vad_filter` can be enabled explicitly and tuned with a speech threshold and minimum or maximum speech duration. Optional diarization assigns labels at segment granularity, not word granularity; labels such as `SPEAKER_00` distinguish speakers within the transcript without establishing their real-world identities.

### Trade-offs & Limitations
Compared with the original OpenAI Whisper CLI, the main migration benefit is familiar command syntax with additional controls for precision, hardware placement, and batching. Treat batching as a decoding change, not just a speed switch: it ignores `condition_on_previous_text`, `prefix`, and thresholds such as `logprob_threshold` and `no_speech_threshold`. Benchmark throughput on representative audio and compare transcripts on long recordings where context across segments matters before enabling it by default.

Compared with a hosted Whisper API, local inference can keep audio on the host and gives you direct control over model placement and precision. In return, you manage model files, CUDA compatibility, and compute capacity. Start with CPU `int8` if throughput requirements are modest, then size RAM or VRAM on the target machine using the intended model, precision, and batch size. MIT licensing applies to the repository code; separately review the terms for dependencies and model artifacts you plan to redistribute.

### Hardware & Deployment Guide
Install the Python package with `pip install whisper-ctranslate2`, or use `ghcr.io/softcatala/whisper-ctranslate2:latest`. The Dockerfile uses `nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04`, preloads `small`, `medium`, and `large-v2`, and sets `whisper-ctranslate2` as the entrypoint. The container example mounts files at `/srv/files/` and exposes GPU 0 with `--gpus "device=0"`; omit that flag for CPU execution. Native NVIDIA GPU execution requires CUDA 12 cuBLAS and cuDNN 9.

For disconnected transcription, preload the chosen model or mount it from a persistent volume and select it with `--model_directory`. Diarization has a separate setup path: install `pyannote.audio==4.0`, accept the conditions for `pyannote/speaker-diarization-community-1`, and provide a Hugging Face token with `--hf_token`. Keep that token out of shared scripts and logs. No tagged release milestone is available for version selection here; for reproducible deployments, record the tested package and dependency versions or pin the container digest rather than relying on `latest`.
```

## Key Capabilities
```text
- Inference stack: Python CLI routes Whisper inference through `faster-whisper>=1.2.0` and CTranslate2.
- Batch decoding: `--batched True` decodes VAD-derived segments independently, with `--batch_size` controlling decoding parallelism.
- Hardware control: `--device`, `--device_index`, and `--compute_type` select placement and precision; CPU `int8` is available.
- Custom models: `--model_directory` loads fine-tuned or quantized Whisper weights in CTranslate2 format.
- Audio workflows: File and microphone input, optional Silero VAD, confidence-colored terminal text, and segment-level speaker labels via `pyannote.audio`.
- Container packaging: `ghcr.io/softcatala/whisper-ctranslate2:latest` preloads `small`, `medium`, and `large-v2`.
```

## Quick Start / Clone
```bash
git clone --depth 1 https://github.com/Softcatala/whisper-ctranslate2.git
cd whisper-ctranslate2
```
