Problem
whisper-cli (from whisper.cpp) only accepts WAV files, but WhatsApp sends voice notes as OGG/Opus. This causes transcription to fail silently when using the built-in whisper-cli auto-detection.
Proposed Solution
Add a wrapper script or built-in conversion step that uses ffmpeg to convert audio before passing to whisper-cli:
#!/bin/bash
# whisper-transcribe wrapper
INPUT="$1"
TMPWAV=$(mktemp /tmp/whisper-XXXXXX.wav)
trap "rm -f $TMPWAV" EXIT
ffmpeg -i "$INPUT" -ar 16000 -ac 1 -y "$TMPWAV" 2>/dev/null
whisper-cli --model "$WHISPER_CPP_MODEL" --no-timestamps "$TMPWAV" 2>/dev/null | grep -v "^\[" | grep -v "^whisper" | grep -v "^$"
Benefits
- Local whisper transcription works out of the box with WhatsApp/Telegram voice notes
- No external API keys needed
- Uses ffmpeg which is commonly available
Environment
- Clawdbot 2026.1.24-3
- whisper.cpp (latest)
- Ubuntu/Linux
Happy to submit a PR if this approach looks good! 🦞
Problem
whisper-cli (from whisper.cpp) only accepts WAV files, but WhatsApp sends voice notes as OGG/Opus. This causes transcription to fail silently when using the built-in whisper-cli auto-detection.
Proposed Solution
Add a wrapper script or built-in conversion step that uses ffmpeg to convert audio before passing to whisper-cli:
Benefits
Environment
Happy to submit a PR if this approach looks good! 🦞