Whisper server (local speech-to-text)
Sets up transcription that runs entirely on this machine, in two parts:
whisper-server, from whisper.cpp. It keeps the Whisper model loaded and listens on127.0.0.1only.- The
openclaw-whisper-serverplugin. It makes that server OpenClaw's audio transcription provider, so incoming voice messages are transcribed without the agent running any commands.
Running the whisper or whisper-cli command for each message works too, but it loads the model
every time. This setup loads it once.
Rules for this skill
- Ask before you change anything. Building software, downloading a model, installing the plugin, editing OpenClaw config and creating a login item each need the user's yes. Say what the step does and roughly how large the download is.
- Check first. Run the check script before proposing any setup step, and skip steps that are already done.
- Loopback only. Never start the server on
0.0.0.0or another network address. It accepts file uploads and runsffmpeg. - No cloud fallback. If local transcription fails, report the error. Do not send the audio to another service unless the user asks.
1. Check what is already there
bash {baseDir}/scripts/check.sh
The script only reads. It reports whether the server answers, whether ffmpeg and
whisper-server are on the PATH, whether the plugin is installed, and whether OpenClaw is
configured to use it. Set WHISPER_SERVER_URL if the server is not on http://127.0.0.1:8080.
If every line says ok or info, setup is finished: go to step 6 to test. A line that says
unknown means an openclaw command failed, so that item could not be checked.
2. Build whisper.cpp with the server
The Homebrew whisper-cpp package does not include whisper-server, so build from source. This
needs git, cmake and a C++ compiler. The source takes about 60 MB on disk.
git clone --depth 1 https://github.com/ggml-org/whisper.cpp ~/whisper.cpp
cd ~/whisper.cpp
cmake -B build
cmake --build build -j --config Release
Then download a model. base.en is about 140 MB, English only, and fast. small or medium
are more accurate and slower. Use a model without .en for other languages.
sh ./models/download-ggml-model.sh base.en
The server also needs ffmpeg on the PATH to read voice notes (OGG/Opus, M4A, MP3). If the
check says it is missing, ask the user to install it with their package manager.
3. Start the server
~/whisper.cpp/build/bin/whisper-server -m ~/whisper.cpp/models/ggml-base.en.bin \
--host 127.0.0.1 --port 8080 --convert
Check it with curl -s http://127.0.0.1:8080/health. While the model loads it answers
{"status":"loading model"}. When ready it answers {"status":"ok"}.
This command stops when the terminal closes. To keep the server running, see step 5.
4. Install the plugin and select it
openclaw plugins install openclaw-whisper-server --accept-capabilities
openclaw config set tools.media.models '[{"provider":"whisper-server","capabilities":["audio"]}]'
--accept-capabilities consents to the plugin registering an audio transcription provider. If
tools.media.models already lists other providers, show the user the current value and add the
whisper-server entry to it instead of replacing the list.
5. Keep the server running (optional, only if the user asks)
This creates a login item, so the server starts on its own and restarts if it stops. Explain that to the user and get a clear yes first.
- macOS: copy
{baseDir}/templates/local.whisper-server.plistto~/Library/LaunchAgents/local.whisper-server.plist, replace each__WHISPER_DIR__with the absolute path of the whisper.cpp folder and__FFMPEG_DIR__with the folder that holdsffmpeg, then runlaunchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/local.whisper-server.plist. To stop it:launchctl bootout gui/$(id -u)/local.whisper-server. - Linux: copy
{baseDir}/templates/whisper-server.serviceto~/.config/systemd/user/whisper-server.service, replace__WHISPER_DIR__the same way, then runsystemctl --user daemon-reloadandsystemctl --user enable --now whisper-server. To stop it:systemctl --user disable --now whisper-server.
To remove the login item later, stop it as above and delete the file.
6. Test
openclaw infer audio transcribe --file /path/to/voice-note.ogg --json
The output should name whisper-server as the provider and contain the transcript.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
unreachable |
The server is not running. Start it (step 3) or check the login item (step 5). |
loading |
The model is still loading. Wait a few seconds and retry. |
| Error mentioning WAV or audio data | ffmpeg is missing or the server was started without --convert. |
not-loopback |
The plugin's baseUrl points at another machine. Only localhost, 127.0.0.0/8 and ::1 are accepted. |
queue-full |
Too many voice messages at once. The server handles one at a time; raise maxQueuedRequests in the plugin config. |
| The transcript comes from another provider | tools.media.models does not list whisper-server. Repeat step 4. |
whisper-server: command not found after brew install whisper-cpp |
The Homebrew package has no server. Build from source (step 2). |
Plugin settings (baseUrl, inferencePath, model, maxQueuedRequests, temperature) go
under plugins.entries.whisper-server.config. See the
plugin README.
