Skip to content

mcsim78/voice-transcribe-summarize-telegram-bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voice Note Transcription and Summarizer Bot for Telegram 🎙️📝

A powerful Telegram bot that transcribes and summarizes voice notes using state-of-the-art AI models. Built with Python and powered by Groq's API with Whisper and Llama 3 model for transcription and summarization.

Screenshots 📸

Transcription Example Summary Example
Image Image

Features ✨

  • Transcribe voice notes from forwarded messages
  • Handle direct voice note recordings
  • Generate accurate transcriptions using Whisper
  • Provide concise summaries of the transcribed content using Llama 3
  • Support for multiple audio formats
  • Well-formatted, easy-to-read output

Prerequisites 📋

  • Python 3.10 or higher
  • pipenv (Python package manager)
  • Telegram Bot Token (from @BotFather)
  • Groq API Key (Get it here)

Installation 🚀

  1. Clone the repository:

    git clone https://github.com/aviaryan/voice-transcribe-summarize-telegram-bot.git
    cd voice-transcribe-summarize-telegram-bot
  2. Install dependencies using pipenv:

    pipenv install
  3. Create a .env file in the root directory:

    cp .env.copy .env
  4. Fill in your environment variables in the .env file:

    TELEGRAM_BOT_TOKEN=your_telegram_bot_token
    GROQ_API_KEY=your_groq_api_key
    
  5. Configure authorized users:

    • Open bot.py and locate the AUTHORIZED_USERS array
    • Add your Telegram user ID to the array (you can get your ID by messaging @userinfobot on Telegram)
    AUTHORIZED_USERS = [your_telegram_id]  # Add more user IDs as needed

Usage 🎯

  1. Activate the virtual environment:

    pipenv shell
  2. Start the bot:

    python bot.py
  3. In Telegram:

    • Forward any message containing a voice note to the bot
    • Record and send a voice note directly to the bot
    • Wait for the bot to process and return both transcription and summary

How it Works 🔄

  1. The bot receives a voice note through Telegram
  2. Audio is processed and sent to Groq's API
  3. Whisper model transcribes the audio content
  4. Another pass through Groq's API generates a concise summary using Llama 3 model
  5. Both transcription and summary are returned to the user in a well-formatted message

Contributing 🤝

Contributions are welcome! Feel free to:

  • Open issues for bugs or feature requests
  • Submit pull requests
  • Improve documentation
  • Share feedback

License 📄

This project is licensed under the MIT License - see the LICENSE file for details.

About

Telegram bot to generate transcriptions and summarise voice notes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.7%
  • Procfile 0.3%