Skip to content

ninjaultrazero/whatsapp-transcriber-bot

Repository files navigation

WhatsApp Transcriber Bot

A bot for automatic transcription of WhatsApp audio messages using whatsapp-web.js, whisper.cpp, and faster-whisper.

The bot allows you to transcribe voice messages by replying with the command:

!t

quoting a voice message.

The transcription will be printed in the console.


🚀 Features

  • WhatsApp Web integration via whatsapp-web.js
  • Audio transcription using Whisper (whisper.cpp + faster-whisper)
  • GPU support (CUDA / Vulkan / automatic CPU fallback)
  • Quick command !t to transcribe replied voice messages
  • Console output (easy to integrate with logs or automation)

📦 Installation

1. Clone the repository

git clone git@github.com:ninjaultrazero/whatsapp-transcriber-bot.git --recurse-submodule
cd whatsapp-transcriber-bot

2. Automatic installation

./install.sh

The script will:

  • Detect distro (Arch / Debian-based)
  • Detect GPU (NVIDIA → CUDA, otherwise Vulkan)
  • Install dependencies
  • Build whisper.cpp
  • Set up Python and Node.js environments

▶️ Run the bot

If everything completes successfully:

./run.sh


💬 Usage

  1. Open WhatsApp
  2. Send or receive a voice message
  3. Reply to the voice message with:

!t

  1. The bot will:
    • Download the audio file
    • Transcribe it
    • Print the result in the console

🧠 Architecture

  • Node.js → WhatsApp Web event handling
  • Python → transcription pipeline
  • whisper.cpp → fast inference (GPU or CPU)
  • faster-whisper → fallback / secondary support

⚡ GPU Support

GPU Backend
NVIDIA CUDA
AMD / Intel Vulkan
Apple Silicon Metal (macOS only, if adapted)
No GPU CPU fallback

📁 Project Structure

whatsapp-transcriber-bot/
├── index.js
├── transcribe.py
├── install.sh
├── run.sh
├── venv/
├── whisper.cpp/
│   ├── build/
│   └── models/
└── README.md

🛠 Requirements

  • Node.js >= 18
  • Python >= 3.10
  • ffmpeg
  • git
  • chromium
  • cmake + build tools
  • Optional GPU (CUDA / Vulkan)

🧪 Notes

  • The bot uses WhatsApp Web automation and may break if WhatsApp updates its UI
  • Do not use a primary WhatsApp account for heavy testing
  • Performance depends heavily on the selected Whisper model

📜 License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors