Conda setup for Whisper + Torch (recommended)
[!NOTE] 最新の実装状況は 機能実装ステータス (Remaining Functionality) を参照してください。
This document describes how to create a conda environment that avoids OpenMP runtime conflicts on macOS and provides a stable runtime for faster-whisper / whisper and torch.
Prerequisites
- Install Miniforge or Miniconda and ensure conda is on your PATH.
Create environment (CPU example)
conda create -n evospiken-whisper python=3.9 -y
conda activate evospiken-whisper
# Install PyTorch (CPU) from pytorch + conda-forge
conda install -c pytorch -c conda-forge pytorch torchvision torchaudio cpuonly -y
# Install faster-whisper via pip
pip install -r requirements-whisper.txt
# Set whisper model env vars
export VIDEO_ANALYSIS_WHISPER_MODEL=tiny
export VIDEO_ANALYSIS_WHISPER_DEVICE=cpu
# Run smoke
python3 tools/whisper_smoke.py
GPU note: if you have CUDA, follow the PyTorch instructions at https://pytorch.org to install the appropriate cudatoolkit-enabled packages instead of cpuonly.
Why this helps
- Using conda to install pytorch and numpy from compatible channels reduces the chance that multiple OpenMP runtimes are pulled in from different vendors (pip wheels vs system libraries).