How nerveband/whatsapp_voice_transcription works
Main Components
a. Client Layer:
• WhatsApp Client (using @whiskeysockets/baileys)
• QR Code Authentication Interface
b. Application Core:
• Voice Note Handler
• Transcription Service Manager
• Summary Generation Manager
• Message Response Handler
c. External Services:
• WhatsApp Web API
• OpenAI Services (Whisper API & GPT)
• Deepgram API
• Anthropic Claude API
┌─────────────────────────────────────────────────────────────┐
• Client Layer │
• ┘
• ↕
┌─────────────────────────────────────────────────────────────┐
• Application Core │
• ┘
• ↕
┌─────────────────────────────────────────────────────────────┐
• External Services │
• ┘
Key Flows to Highlight
a. Authentication Flow:
• QR Code Generation → WhatsApp Web Authentication → Session Storage
b. Voice Note Processing Flow:
• Voice Note Reception → Transcription Service Selection → Text Generation → Summary Creation → Response Delivery
Important Elements
a. Storage Components:
• .wwebjs_auth (Session storage)
• .wwebjs_cache (Cache storage)
• Environment Variables (.env)
b. Integration Points:
• WhatsApp Web API Connection
• AI Service API Endpoints
• Authentication Handlers
a. Modularity:
• Separate services for transcription (Whisper/Deepgram)
• Separate services for summarization (GPT/Claude)
• Independent authentication handling
b. Data Flow:
• Voice note input path
• Transcription processing path
• Summary generation path
• Response delivery path
Specific connections
WhatsApp Client ↔ Session Manager ↔ Voice Note Handler
• ↕
• Transcription Service Manager
• ↕
• Summary Generation Manager
• ↕
• Message Response Handler
Technical Details to Note
• Error handling paths
• Async operations
• Security boundaries
• Configuration points
Implementation Notes
• Version information for major components
• Scalability points
• Error handling mechanisms
• Configuration dependencies