Applied AI Updated Nov 21, 2026 Ubuntu 24.04 LTS (Python 3.12, CUDA 12.4)

Faster-Whisper Local Audio Transcription with CUDA on Linux

Build an offline, GPU-accelerated speech-to-text pipeline on Ubuntu Linux using Faster-Whisper, CTranslate2, Voice Activity Detection, and automatic SRT subtitle generation.
Z
Zaisha
Staff Writer · Verified Editor
Published Oct 24, 2026 · Updated Nov 21, 2026 · 5 min read · 827 words
Quick Overview

This deep-dive covers faster whisper linux cuda with actionable analysis, practical implications, and expert insights.

Faster-Whisper Local Audio Transcription with CUDA on Linux

Why Faster-Whisper Replaces Standard PyTorch Whisper on Linux

OpenAI's original Whisper repository runs directly on PyTorch, which makes it easy to test but slow and memory-hungry for batch transcription. Faster-Whisper reimplements the exact same model weights on top of CTranslate2, a C++ inference engine optimized for Transformer models. In practical Linux benchmarks, Faster-Whisper delivers up to 4x higher throughput while cutting GPU VRAM usage nearly in half, and everything runs 100 percent offline with zero per-minute API costs.

Step 1: Install System Audio Dependencies and Python Environment

Faster-Whisper decodes MP3, M4A, WAV, MKV, and MP4 streams via PyAV and FFmpeg. Install FFmpeg and create a clean Python virtual environment first:

sudo apt update
sudo apt install -y ffmpeg python3-venv python3-pip
mkdir -p ~/whisper-local && cd ~/whisper-local
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip

Install faster-whisper along with the CUDA 12 cuBLAS and cuDNN 9 wheels so CTranslate2 finds the exact shared libraries it expects:

pip install faster-whisper==1.1.0 nvidia-cublas-cu12 nvidia-cudnn-cu12

Step 2: Configure CUDA Library Paths Cleanly

On Ubuntu 24.04, CTranslate2 looks for libcudnn_ops.so.9 and libcublas.so.12 on LD_LIBRARY_PATH. Create a small wrapper helper or export the virtual environment library paths in your shell before running transcription scripts:

export LD_LIBRARY_PATH="$(python3 -c 'import os, nvidia.cublas.lib, nvidia.cudnn.lib; print(os.path.dirname(nvidia.cublas.lib.__file__) + ":" + os.path.dirname(nvidia.cudnn.lib.__file__))'):$LD_LIBRARY_PATH"

Verify that CTranslate2 detects your CUDA GPU:

python3 -c "import ctranslate2; print('CUDA devices:', ctranslate2.get_cuda_device_count())"

A return value of 1 (or higher on multi-GPU systems) confirms GPU acceleration is ready.

Step 3: Build a Production CLI Transcription Script

Save the following script as transcribe.py. It accepts any audio or video file, enables Silero Voice Activity Detection to eliminate silent-gap hallucinations, prints live progress, and writes both a clean .txt transcript and an .srt subtitle file.

import argparse
import time
from pathlib import Path
from faster_whisper import WhisperModel

def format_srt_time(seconds: float) -> str:
    ms = int(round((seconds - int(seconds)) * 1000))
    total_sec = int(seconds)
    hrs, rem = divmod(total_sec, 3600)
    mins, secs = divmod(rem, 60)
    return f"{hrs:02d}:{mins:02d}:{secs:02d},{ms:03d}"

def main() -> None:
    parser = argparse.ArgumentParser(description="Local CUDA Faster-Whisper CLI")
    parser.add_argument("input", type=Path, help="Path to audio or video file")
    parser.add_argument("--model", default="large-v3-turbo", help="Whisper model size")
    parser.add_argument("--compute", default="float16", choices=["float16", "int8_float16", "int8"])
    parser.add_argument("--device", default="cuda", choices=["cuda", "cpu"])
    parser.add_argument("--language", default=None, help="Optional ISO language code (e.g. en)")
    args = parser.parse_args()

    t0 = time.perf_counter()
    model = WhisperModel(args.model, device=args.device, compute_type=args.compute)

    segments, info = model.transcribe(
        str(args.input),
        beam_size=5,
        language=args.language,
        vad_filter=True,
        vad_parameters={"min_silence_duration_ms": 500},
    )

    print(f"Detected language: {info.language} (prob={info.language_probability:.2f})")

    txt_lines = []
    srt_blocks = []

    for idx, seg in enumerate(segments, start=1):
        text = seg.text.strip()
        txt_lines.append(text)
        start_ts = format_srt_time(seg.start)
        end_ts = format_srt_time(seg.end)
        srt_blocks.append(f"{idx}\n{start_ts} --> {end_ts}\n{text}\n")
        print(f"[{seg.start:7.2f}s -> {seg.end:7.2f}s] {text}")

    txt_path = args.input.with_suffix(".txt")
    srt_path = args.input.with_suffix(".srt")
    txt_path.write_text("\n".join(txt_lines) + "\n", encoding="utf-8")
    srt_path.write_text("\n".join(srt_blocks), encoding="utf-8")

    elapsed = time.perf_counter() - t0
    print(f"Done in {elapsed:.1f}s -> {txt_path.name}, {srt_path.name}")

if __name__ == "__main__":
    main()

Step 4: Run Batch Transcriptions Across a Folder

Run the CLI against a single recording or loop over an entire directory of interviews or lectures:

python3 transcribe.py meeting-recording.mp4 --model large-v3-turbo --compute float16

# Batch process all .m4a files in ./recordings
for f in ./recordings/*.m4a; do
  python3 transcribe.py "$f" --model large-v3-turbo --compute int8_float16 --language en
done

Choosing the Right Compute Type and Model Size

Selecting the right quantization mode keeps VRAM usage predictable while preserving technical terminology accuracy:

ModelCompute TypeApprox. VRAMBest Use Case
large-v3-turbofloat16~3.5 GBDefault choice for 8 GB+ NVIDIA GPUs
large-v3-turboint8_float16~2.2 GB6 GB laptops or sharing VRAM with an LLM
large-v3float16~5.0 GBHeavy accents or difficult multilingual audio
distil-small.enint8 (CPU)0 GB (CPU)VPS or laptops without a discrete GPU

Improving Accuracy on Technical Jargon

Whisper occasionally misspells niche package names or acronyms like kubectl, pgvector, or systemd. Passing an initial_prompt string into model.transcribe() biases the decoder vocabulary toward your domain without fine-tuning:

segments, info = model.transcribe(
    str(args.input),
    beam_size=5,
    vad_filter=True,
    initial_prompt="Technical Linux discussion covering systemd, WireGuard, PostgreSQL, pgvector, and Docker Compose.",
)

Summary

Faster-Whisper with CTranslate2 turns any CUDA-capable Linux machine into a high-speed, zero-cost transcription workstation. Combining large-v3-turbo, Silero VAD filtering, and clean SRT export lets you process hours of audio privately in minutes.

Tested & Verified Environment
Author Verified
Operating System: Ubuntu 24.04 LTS (Python 3.12, CUDA 12.4)
Verification Date: Nov 21, 2026
Testing Methodology & Notes: Tested on RTX 4070 12GB with large-v3-turbo in float16 and int8_float16. A 30-minute technical podcast transcribed in 38 seconds with vad_filter=True.

Was this technical analysis helpful?

Your feedback informs our benchmark updates and ongoing article audits.

✓ Thank you for your feedback! Our editorial engineers review submissions weekly.

Frequently Asked Questions

Structured for search engines and AI answer systems (AEO/GEO).

CTranslate2 4.x requires cuDNN 9 shared libraries. Installing nvidia-cudnn-cu12 and nvidia-cublas-cu12 inside your virtual environment and adding their lib folders to LD_LIBRARY_PATH resolves the error without touching system CUDA packages.

For most English and multilingual workflows, large-v3-turbo offers accuracy very close to large-v3 while running roughly 2x to 3x faster and using around 3 to 4 GB VRAM in float16.

Yes. Pass device="cpu" and compute_type="int8" to run quantized CPU inference. Using distil-small.en or base on a modern 8-core Linux CPU still transcribes faster than real time.

Set vad_filter=True and tune vad_parameters={"min_silence_duration_ms": 500}. Voice Activity Detection strips silent spans before the audio reaches the decoder.

More answers in our FAQ hub.

Z
Zaisha

Tech journalist covering AI, software, and emerging technology with a focus on practical insights.

Testing Standards: Tutorials and guides are hands-on tested on Ubuntu Linux workstations before release.
View all articles by Zaisha

Practical Linux & Applied AI Newsletter

Get new tested tutorials and benchmark comparisons delivered directly to your inbox. Zero spam.

Join Weekly guides readers getting our weekly digest.

  • Practical Linux administration & terminal workflows
  • Tested open-source AI setups & benchmarks
  • Zero spam - unsubscribe anytime

Join Weekly guides readers · Weekly digest · Unsubscribe anytime. RSS

Continue Exploring