| name | whatsapp-voice-talk |
| description | Real-time WhatsApp voice message processing. Transcribe voice notes to text via Whisper, detect intent, execute handlers, and send responses. Use when building conversational voice interfaces for WhatsApp. Supports English and Hindi, customizable intents (weather, status, commands), automatic language detection, and streaming responses via TTS. |
WhatsApp Voice Talk
Turn WhatsApp voice messages into real-time conversations. This skill provides a complete pipeline: voice → transcription → intent detection → response generation → text-to-speech.
Perfect for:
- Voice assistants on WhatsApp
- Hands-free command interfaces
- Multi-lingual chatbots
- IoT voice control (drones, smart home, etc.)
Quick Start
1. Install Dependencies
pip install openai-whisper soundfile numpy
2. Process a Voice Message
const { processVoiceNote } = require('./scripts/voice-processor');
const fs = require('fs');
const buffer = fs.readFileSync('voice-message.ogg');
const result = await processVoiceNote(buffer);
console.log(result);
3. Run Auto-Listener
For automatic processing of incoming WhatsApp voice messages:
node scripts/voice-listener-daemon.js
This watches ~/.clawdbot/media/inbound/ every 5 seconds and processes new voice files.
How It Works
Incoming Voice Message
↓
Transcribe (Whisper API)
↓
"What's the weather?"
↓
Detect Language & Intent
↓
Match against INTENTS
↓
Execute Handler
↓
Generate Response
↓
Convert to TTS
↓
Send back via WhatsApp
Key Features
✅ Zero Setup Complexity - No FFmpeg, no complex dependencies. Uses soundfile + Whisper.
✅ Multi-Language - Automatic English/Hindi detection. Extend easily.
✅ Intent-Driven - Define custom intents with keywords and handlers.
✅ Real-Time Processing - 5-10 seconds per message (after first model load).
✅ Customizable - Add weather, status, commands, or anything else.
✅ Production Ready - Built from real usage in Clawdbot.
Common Use Cases
Weather Bot
Smart Home Control
Task Manager
Status Checker
Customization
Add a Custom Intent
Edit voice-processor.js:
- Add to INTENTS map:
const INTENTS = {
'shopping': {
keywords: ['shopping', 'list', 'buy', 'खरीद'],
handler: 'handleShopping'
}
};
- Add handler:
const handlers = {
async handleShopping(language = 'en') {
return {
status: 'success',
response: language === 'en'
? "What would you like to add to your shopping list?"
: "आप अपनी शॉपिंग लिस्ट में क्या जोड़ना चाहते हैं?"
};
}
};
Support More Languages
- Update
detectLanguage() for your language's Unicode:
const urduChars = /[\u0600-\u06FF]/g;
- Add language code to returns:
return language === 'ur' ? 'Urdu response' : 'English response';
- Set language in
transcribe.py:
result = model.transcribe(data, language="ur")
Change Transcription Model
In transcribe.py:
model = whisper.load_model("tiny")
model = whisper.load_model("base")
model = whisper.load_model("small")
model = whisper.load_model("medium")
Architecture
Scripts:
transcribe.py - Whisper transcription (Python)
voice-processor.js - Core logic (intent parsing, handlers)
voice-listener-daemon.js - Auto-listener watching for new messages
References:
SETUP.md - Installation and configuration
API.md - Detailed function documentation
Integration with Clawdbot
If running as a Clawdbot skill, hook into message events:
const { processVoiceNote } = require('skills/whatsapp-voice-talk/scripts/voice-processor');
message.on('voice', async (audioBuffer) => {
const result = await processVoiceNote(audioBuffer, message.from);
await message.reply(result.response);
await sendVoiceMessage(result.response);
});
Performance
- First run: ~30 seconds (downloads Whisper model, ~140MB)
- Typical: 5-10 seconds per message
- Memory: ~1.5GB (base model)
- Languages: English, Hindi (easily extended)
Supported Audio Formats
OGG (Opus), WAV, FLAC, MP3, CAF, AIFF, and more via libsndfile.
WhatsApp uses Opus-coded OGG by default — works out of the box.
Troubleshooting
"No module named 'whisper'"
pip install openai-whisper
"No module named 'soundfile'"
pip install soundfile
Voice messages not processing?
- Check:
clawdbot status (is it running?)
- Check:
~/.clawdbot/media/inbound/ (files arriving?)
- Run daemon manually:
node scripts/voice-listener-daemon.js (see logs)
Slow transcription?
Use smaller model: whisper.load_model("base") or "tiny"
Further Reading
- Setup Guide: See
references/SETUP.md for detailed installation and configuration
- API Reference: See
references/API.md for function signatures and examples
- Examples: Check
scripts/ for working code
License
MIT - Use freely, customize, contribute back!
Built for real-world use in Clawdbot. Battle-tested with multiple languages and use cases.