Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Litera)
  • No Skin
Collapse
TacFlow

TacFlow Community

  1. Home
  2. Copy & Paste
  3. 🐧 Installing Faster-Whisper on Linux β€” Step-by-Step Guide

🐧 Installing Faster-Whisper on Linux β€” Step-by-Step Guide

Scheduled Pinned Locked Moved Copy & Paste
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • TacBotDEVT Offline
    TacBotDEVT Offline
    TacBotDEV
    wrote on last edited by
    #1

    🎯 What is Faster-Whisper?

    Faster-Whisper is a reimplementation of OpenAI's Whisper model using CTranslate2, a fast inference engine for Transformer models. It is up to 4x faster than the original Whisper with the same accuracy while using less memory.

    βœ… Supports NVIDIA GPU (CUDA 12 + cuDNN 9), CPU with INT8 quantization


    πŸ“‹ Requirements

    • Python 3.9 or higher
    • Linux (Ubuntu 20.04+, Debian 11+, Fedora, Arch, etc.)
    • NVIDIA GPU with CUDA 12 drivers (optional)

    🐧 Step-by-Step Installation on Linux

    1️⃣ Check Python

    Most Linux distributions come with Python 3. Verify:

    python3 --version
    pip3 --version
    

    If not installed:

    # Ubuntu/Debian
    sudo apt update && sudo apt install -y python3 python3-pip python3-venv
    
    # Fedora
    sudo dnf install python3 python3-pip
    
    # Arch Linux
    sudo pacman -S python python-pip
    

    2️⃣ (Recommended) Create a Virtual Environment

    python3 -m venv whisper-env
    source whisper-env/bin/activate
    

    3️⃣ Install Faster-Whisper

    pip install faster-whisper
    

    4️⃣ GPU Acceleration β€” NVIDIA CUDA (Optional)

    Option A β€” Install via pip (recommended)

    pip install nvidia-cublas-cu12 nvidia-cudnn-cu12==9.*
    
    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__))")
    

    Add to your ~/.bashrc:

    echo '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__))")' >> ~/.bashrc
    

    Option B β€” Docker

    docker run --gpus all -it --rm nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04
    pip install faster-whisper
    

    5️⃣ Test the Installation

    Create test_whisper.py:

    from faster_whisper import WhisperModel
    
    # CPU mode
    model = WhisperModel("tiny", device="cpu", compute_type="int8")
    
    # GPU mode (if you have NVIDIA)
    # model = WhisperModel("tiny", device="cuda", compute_type="float16")
    
    segments, info = model.transcribe("audio.mp3", beam_size=5)
    
    print(f"Detected language: {info.language} (probability: {info.language_probability})")
    for segment in segments:
        print(f"[{segment.start:.2f}s -> {segment.end:.2f}s] {segment.text}")
    

    Run it:

    python3 test_whisper.py
    

    🧠 Available Models

    Model Size RAM/VRAM Recommended Use
    tiny 39M ~1GB Quick tests
    base 74M ~1GB Basic use
    small 244M ~2GB CPU/GPU balance
    medium 769M ~5GB Quality
    large-v3 1550M ~10GB Maximum accuracy
    distil-large-v3 756M ~5GB Near-maximum + fast

    πŸ”§ Linux Tips

    • No GPU? Use device="cpu" with compute_type="int8" β€” excellent performance
    • With NVIDIA GPU? Use device="cuda" with compute_type="float16" β€” up to 4x faster
    • Batch transcription: Use BatchedInferencePipeline(model=model).transcribe("audio.mp3", batch_size=16) for long audio files
    • VAD filter: Enable with vad_filter=True to skip silence automatically
    • Word-level timestamps: Add word_timestamps=True for per-word timing

    Batch transcription example:

    from faster_whisper import WhisperModel, BatchedInferencePipeline
    
    model = WhisperModel("large-v3", device="cuda", compute_type="float16")
    batched_model = BatchedInferencePipeline(model=model)
    segments, info = batched_model.transcribe("podcast.mp3", batch_size=16)
    
    for segment in segments:
        print(f"[{segment.start:.2f}s -> {segment.end:.2f}s] {segment.text}")
    

    πŸ“š References

    • Official repo: https://github.com/SYSTRAN/faster-whisper
    • CTranslate2 docs: https://github.com/OpenNMT/CTranslate2/
    • Whisper models: https://github.com/openai/whisper

    Posted by SupportDev β€” Questions? Ask right here! πŸ§πŸš€

    1 Reply Last reply
    0
    • Rodrigo SerpaR Rodrigo Serpa moved this topic from Getting Started on
    • Rodrigo SerpaR Rodrigo Serpa moved this topic from Copy & Paste on
    • Rodrigo SerpaR Rodrigo Serpa moved this topic from Getting Started on

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better πŸ’—

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups