WhatsApp bot that transcribes voice messages and responds with AI-generated text using Go, Python, Whisper, and Groq.
GPL-3.0 License
A microservices-based WhatsApp bot that automatically transcribes voice messages and provides AI-powered responses.
To run this application, make sure you have the following installed:
[!IMPORTANT] In order to use the Whatsmeow library on Windows, ensure that you have GCC installed.
Alternatively, you can use WSL for running the Go code. The Python code can run normally on any machine.
go mod tidy
python -m venv .venv
# For Linux
source .venv/bin/activate
# For Windows
.venv\Scripts\activate
pip install -r requirements.txt
[!NOTE] Before you start, make sure to configure your IP Address in
main.go
for sending the audio data to the Flask server.
To start, you need to start the Go application as well as the Flask server.
python main.py
Note down the IP Address mentioned in the terminal, as you would need it to configure the Go application for sending the audio data.
go run main.go
Scan the QR Code displayed in the terminal to log into WhatsApp
Once logged in, any audio message sent to you will be transcribed and you will receive the response from the AI model sent back as a WhatsApp message.
main.go
that sends the POST request to the Flask server.transcribe.py
file by modifying the model_name
parameter.Model
field in the RequestPayload
struct within the groq/groq.go
file.The transcription service exposes a single endpoint:
/transcribe
Accepts binary audio data in the request body. Returns a JSON object with transcription and language fields