Add local Whisper speech-to-text to AstrBot
Install openai-whisper and FFmpeg in AstrBot's environment, add a Whisper (Local) provider, choose a model size from tiny to turbo, and enable voice input for your bot.
Verification
- Test environment
- Unknown
- Tested on
- Unknown
- Last updated
- 2026-11-20
Whisper is OpenAI's open-source speech-recognition model, widely used for subtitles. With a local Whisper provider, AstrBot turns a voice message into text before passing it to your chat model: you send a voice note → Whisper transcribes it → the text goes to the model. Running it locally avoids a per-minute transcription bill, though it uses your own hardware.
1. Install Whisper
Either use the AstrBot dashboard (Platform logs → Install pip package, enter openai-whisper), or install it in the Python environment that runs AstrBot:
pip install -U openai-whisper
Whisper also needs FFmpeg. On Debian or Ubuntu:
sudo apt update
sudo apt install ffmpeg
The first install and model download can take a while, depending on your server's connection.
2. Add the provider
Go to Model providers → Speech-to-text → Whisper (Local), add it and edit it. Use an ID such as whisper_selfhost and pick a model:
| Model | Notes |
|---|---|
| tiny | Smallest and fastest; the practical choice on CPU-only machines or when many users share the bot |
| base / small / medium | Progressively more accurate, needing more memory and compute |
| large | Most accurate; on the same hardware roughly ten times slower than tiny in OpenAI's comparison |
| turbo | Optimised large-v3: much faster than large with a small accuracy trade-off; not meant for translating speech into English |
Pick according to your GPU (small to large if you have one). Speed and accuracy also depend on language and audio quality.
3. Turn on voice input
Save the provider, then in the bot's general settings enable speech-to-text and select it. Send a short voice message and compare the transcript with what you said.
If you'd rather not host it, OpenAI also offers Whisper as an API; the original post quoted $0.006 per minute for whisper-1, so check current pricing before relying on it.
Adapted from the XMLans blog: Add Local Whisper Speech-to-Text to AstrBot (Chinese original: 如何将Astrbot接入Whisper实现语音转文字).
Sources
- 如何将Astrbot接入Whisper实现语音转文字(星梦博客)www
.xmlans .com (opens in a new tab) · checked 2026-11-20 - Add Local Whisper Speech-to-Text to AstrBot (XMLans blog)en
.xmlans .com (opens in a new tab) · checked 2026-11-20 - openai/whisper (GitHub)github
.com (opens in a new tab) · checked 2026-11-20