- Add GROQ_API_KEY to README env vars and authentication steps - Add Voice Transcription section to CLAUDE.md - Update setup skill with Groq voice transcription setup step - Rewrite add-voice-transcription skill for Groq-first approach
2.7 KiB
name, description
| name | description |
|---|---|
| add-voice-transcription | Add voice message transcription to NanoClaw using Groq Whisper (fast, free) with OpenAI fallback. Works on Discord and WhatsApp. |
Add Voice Transcription
This skill adds automatic voice message transcription to NanoClaw. When a voice note arrives, it is downloaded, transcribed, and delivered to the agent as [Voice message transcription]: <text>.
Provider priority: Groq Whisper (fast, free) > OpenAI Whisper (fallback).
Phase 1: Pre-flight
Discord
Voice transcription is built into src/channels/discord.ts. No code changes needed — just configure API keys (Phase 3).
Check if src/transcription.ts exists. If it does, skip to Phase 3 (Configure). The code changes are already in place.
If not, merge the skill branch:
git remote add whatsapp https://github.com/qwibitai/nanoclaw-whatsapp.git 2>/dev/null
git fetch whatsapp skill/voice-transcription
git merge whatsapp/skill/voice-transcription
npm install --legacy-peer-deps
npm run build
Phase 2: Configure
Get API key
Groq (recommended — fast + free):
- Go to https://console.groq.com
- Sign up (no credit card needed)
- Create an API key (starts with
gsk_)Free tier: 2,000 requests/day, 8 hours of audio/day. Uses
whisper-large-v3-turboat ~200x real-time speed.
OpenAI (fallback):
- Go to https://platform.openai.com/api-keys
- Create a key (starts with
sk-)Cost: ~$0.006 per minute of audio. Requires funded account.
Add to environment
Add to .env:
GROQ_API_KEY=gsk_... # Primary (fast, free)
OPENAI_API_KEY=sk-... # Fallback (optional if Groq is set)
Build and restart
npm run build
systemctl --user restart nanoclaw nanoclaw-codex # Linux
# macOS: launchctl kickstart -k gui/$(id -u)/com.nanoclaw
Phase 3: Verify
Send a voice note in any registered chat. The agent should receive it as [Voice message transcription]: <text>.
Check logs
tail -f logs/nanoclaw.log | grep -iE "transcri|audio"
Look for:
Audio transcribed + cachedwithprovider: "groq"andelapsed— successTranscription cache hit— second service read from cache (no duplicate API call)no transcription API key— neitherGROQ_API_KEYnorOPENAI_API_KEYsetgroq Whisper 4xx— check key validity
Troubleshooting
No transcription: Check GROQ_API_KEY (or OPENAI_API_KEY) is set in .env. Restart service after changes.
Slow transcription: Verify provider: "groq" in logs. If it shows openai, the Groq key may be missing or invalid.
Agent doesn't respond to voice notes: Verify the chat is registered and the agent is running. Voice transcription only runs for registered groups.