A Node.js WhatsApp Bot to automatically transcribe voice messages using whisper.cpp.
This project uses:
-
whatsapp-web.js: A WhatsApp API client that connects through the WhatsApp Web browser app using Puppeteer.
-
smart-whisper: A Node.js wrapper for whisper.cpp.
-
Download and install FFmpeg.
-
Clone this repository, install dependencies and build the application
git clone https://github.com/lucaboy/whatsapp-audio-transcriber.git && cd whatsapp-audio-transcriber && npm install && npm run build
. -
Download the OpenAI's Whisper model converted to ggml format from here.
-
Rename the
.env.example
file to.env
and edit it with your configuration (make sure to edit theWHISPER_LOCAL_MODEL_PATH
parameter with the path of the downloaded Whisper model). -
Start the application:
npm start
. -
Open the following URL in your browser: http://localhost:8080.
-
Scan the QR code using the WhatsApp mobile app to authenticate.
-
Test the application by reacting with "🤖" to a voice message and check the transcribed text.