WhisperX Transcription
Set up local, accurate speech-to-text for TomoriBot using the bundled WhisperX server. WhisperX provides fast audio transcription with word-level alignment.
Run these commands from the TomoriBot repository root:
cd servers/sttpython -m venv .venv.\.venv\Scripts\Activate.ps1python -m pip install --upgrade pippip install -r requirements.txtpython whisperx_server.pyEnsure ffmpeg is available on your PATH. For NVIDIA GPU acceleration, CUDA 12 cuBLAS and cuDNN DLLs must also be on your PATH.
cd servers/sttpython3 -m venv .venvsource .venv/bin/activatepython -m pip install --upgrade pippython -m pip install -r requirements.txtpython whisperx_server.pyEnsure ffmpeg is installed (sudo apt-get install ffmpeg on Debian/Ubuntu). On systems with an NVIDIA GPU, CUDA 12 runtime libraries enable GPU transcription.
cd servers/sttpython3 -m venv .venvsource .venv/bin/activatepython -m pip install --upgrade pippython -m pip install -r requirements.txtpython whisperx_server.pyEnsure ffmpeg is installed (brew install ffmpeg). Because servers/stt/requirements.txt references --extra-index-url https://download.pytorch.org/whl/cu124 (Linux/Windows CUDA only), pip falls back to standard PyPI wheels on Mac. CTranslate2 does not use Apple MPS, so transcription runs on the CPU (int8 by default, or set WHISPERX_COMPUTE_TYPE=float32 if needed).
Keep that terminal open while TomoriBot is using WhisperX. The default endpoint URL is http://127.0.0.1:8021. On Windows, use 127.0.0.1 instead of localhost.
Choose a model
Section titled “Choose a model”Set WHISPERX_MODEL before starting the server:
$env:WHISPERX_MODEL = "large-v3-turbo"python servers\stt\whisperx_server.pyWHISPERX_MODEL=large-v3-turbo python servers/stt/whisperx_server.pyWHISPERX_MODEL=large-v3-turbo python servers/stt/whisperx_server.pyWHISPERX_MODEL | Size | Use |
|---|---|---|
large-v3 | 1.55B | Best multilingual accuracy; about 0.6 GiB more VRAM than turbo |
large-v3-turbo | 809M | Multilingual, faster decoder; slightly worse Japanese |
kotoba-tech/kotoba-whisper-v2.0-faster | 756M | Japanese only; more accurate than turbo on Japanese test clips, at the same speed |
On short clips the encoder dominates, so all three run at similar speed. Pick by language and memory. small and base lose too much Japanese accuracy to recommend. Whisper models can still invent text on very short or near-silent clips.
GPU and device behavior
Section titled “GPU and device behavior”The server uses an NVIDIA GPU automatically when CUDA and CTranslate2 are usable. Check http://127.0.0.1:8021/health: device reads cuda on GPU setups or cpu on CPU and Mac setups.
On Windows, speech recognition needs the CUDA 12 cuBLAS and cuDNN DLLs on your PATH. Without them the server prints GPU found but unusable at startup and falls back to CPU, which is much slower: install them and restart the server. If you set WHISPERX_DEVICE=cuda, the server stops at startup instead of falling back.
On Mac, CTranslate2 transcribes on the CPU; WHISPERX_DEVICE=cuda fails there.
Register in TomoriBot
Section titled “Register in TomoriBot”Run /providers, choose Add New Custom Endpoint, and use the transcription API compatibility:
- API Compatibility:
openai-compatible-transcription endpoint_url:http://127.0.0.1:8021
After saving the connection, select it and use its model dropdown to add the exact value of WHISPERX_MODEL (large-v3 by default, or the full repo ID such as kotoba-tech/kotoba-whisper-v2.0-faster) as a Transcription model.
Use /providers for endpoint registration and model setup. Then open /config > Models > Switch Models to select and activate the registered endpoint.
Use transcripts
Section titled “Use transcripts”After registration, TomoriBot transcribes audio attachments in the background and adds the text to chat context. Use /config > Behavior > Notice Behavior only if you also want transcripts posted visibly in chat.