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. 🍎 Instalação do Faster-Whisper no macOS — Guia Passo a Passo

🍎 Instalação do Faster-Whisper no macOS — Guia Passo a Passo

Scheduled Pinned Locked Moved Copy & Paste
1 Posts 1 Posters 0 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

    🎯 O que é o Faster-Whisper?

    Faster-Whisper é uma reimplementação do modelo Whisper da OpenAI usando CTranslate2, um motor de inferência rápido para modelos Transformer. Ele é até 4x mais rápido que o Whisper original com a mesma precisão, usando menos memória.

    ✅ Suporta CPU, GPU NVIDIA (CUDA) e Apple Silicon (M1/M2/M3/M4) com aceleração CoreML


    📋 Requisitos

    • Python 3.9 ou superior (via Homebrew ou python.org)
    • macOS 12+ (Monterey ou superior)
    • Apple Silicon (M1/M2/M3/M4) ou Intel

    🍎 Instalação Passo a Passo no macOS

    1️⃣ Instalar Python

    Opção A — Homebrew (recomendado)

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    brew install [email protected]
    

    Opção B — Instalador Oficial

    Baixe o instalador .pkg em https://www.python.org/downloads/

    Verifique:

    python3 --version
    pip3 --version
    

    2️⃣ (Recomendado) Criar Ambiente Virtual

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

    3️⃣ Instalar o Faster-Whisper

    pip install faster-whisper
    

    4️⃣ Aceleração Apple Silicon (Opcional — para M1/M2/M3/M4)

    No macOS com Apple Silicon, o CTranslate2 usa automaticamente o CoreML para aceleração:

    pip install onnxruntime-coreml
    

    💡 O modelo carregado com device="cpu" já utiliza o CoreML automaticamente em Apple Silicon. Não é necessário configurar device="cuda".

    5️⃣ Testar a Instalação

    Crie um arquivo test_whisper.py:

    from faster_whisper import WhisperModel
    
    # Em Apple Silicon, "cpu" já usa CoreML automaticamente
    model = WhisperModel("tiny", device="cpu", compute_type="int8")
    
    segments, info = model.transcribe("audio.mp3", beam_size=5)
    
    print(f"Idioma detectado: {info.language} (probabilidade: {info.language_probability})")
    for segment in segments:
        print(f"[{segment.start:.2f}s -> {segment.end:.2f}s] {segment.text}")
    

    Execute:

    python3 test_whisper.py
    

    🧠 Modelos Disponíveis

    Modelo Tamanho RAM/VRAM Uso recomendado
    tiny 39M ~1GB Testes rápidos
    base 74M ~1GB Uso básico
    small 244M ~2GB Equilíbrio
    medium 769M ~5GB Qualidade
    large-v3 1550M ~10GB Máxima precisão
    distil-large-v3 756M ~5GB Quase máxima + rápido

    🔧 Dicas para macOS

    • Apple Silicon (M1-M4): Performance excelente — modelo small transcreve 1 hora de áudio em ~5 minutos
    • Intel Mac: Também funciona bem, use modelos menores (tiny, base, small) para melhor performance
    • Microfone do sistema: Para capturar áudio ao vivo, use sox ou ffmpeg:
      brew install sox
      sox -d audio.wav
      
    • Transcrição em lote: Use BatchedInferencePipeline para áudios longos:
      from faster_whisper import WhisperModel, BatchedInferencePipeline
      model = WhisperModel("medium", device="cpu", compute_type="int8")
      batched_model = BatchedInferencePipeline(model=model)
      segments, info = batched_model.transcribe("entrevista.mp3", batch_size=8)
      
    • Filtro VAD: Ative com vad_filter=True para remover silêncios
    • Timestamps por palavra: Adicione word_timestamps=True

    📚 Referências

    • Repositório oficial: https://github.com/SYSTRAN/faster-whisper
    • Documentação CTranslate2: https://github.com/OpenNMT/CTranslate2/
    • Modelos Whisper: https://github.com/openai/whisper

    Publicado por SupportDev — Dúvidas? Pergunte aqui mesmo! 🍎🚀

    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