Skip to content
erec2smithPublic

About

A Telegram bot that extracts audio directly from video files sent in Telegram.

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

DeepSound Bot 🎧

A Telegram bot that extracts audio from video files and converts it into your preferred audio format (MP3, WAV, OGG, M4A, or FLAC).

Send a video, pick a format, and get your audio file back — ready to download.

DeepSound Bot


✨ Features

  • 🎬 Extracts audio directly from video files sent in Telegram
  • 🔄 Converts audio to MP3, WAV, OGG, M4A, or FLAC
  • ⏱ Validates video duration (must be under 5 minutes)
  • 📦 Validates file size (must be under 300 MB)
  • ⚡ Fast processing powered by FFmpeg
  • 🧹 Automatic cleanup of temporary files after each conversion

🛠 Tech Stack


📋 Prerequisites

Before running the bot, make sure you have:

  1. Python 3.10 or higher installed
  2. FFmpeg installed and available in your system's PATH
  3. A Telegram Bot Token (get one from @BotFather)

Installing FFmpeg

Ubuntu / Debian

sudo apt update
sudo apt install ffmpeg

macOS (Homebrew)

brew install ffmpeg

Windows Download from ffmpeg.org and add it to your PATH.


🚀 Installation

  1. Clone the repository

    git clone https://github.com/erec2smith/DeepSound.git
    cd DeepSound
  2. Create a virtual environment (recommended)

    python -m venv venv
    source venv/bin/activate      # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Set your bot token

    Open deepsound.py and replace the placeholder with your actual token:

    BOT_TOKEN = "YOUR_BOT_TOKEN_HERE"

    💡 For production use, it's recommended to load the token from an environment variable instead of hardcoding it.

  5. Run the bot

    python deepsound_bot.py

💬 Usage

  1. Start a chat with your bot on Telegram and send /start
  2. Send a video file (as a video or document)
  3. The bot validates its duration and size
  4. Choose your desired audio format from the inline buttons
  5. Receive your converted audio file, ready to download

⚙️ Configuration

Setting Default Description
MAX_DURATION_SECONDS 300s Maximum allowed video duration
MAX_FILE_SIZE_BYTES 300 MB Maximum allowed video file size
FORMATS mp3, wav, ogg, m4a, flac Supported output formats

These constants can be adjusted directly in deepsound.py.


📁 Project Structure

deepsound-bot/
├── deepsound.py     # Main bot logic
├── images/          
└── README.md

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page or open a pull request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License.


👤 Author

Adem Mzoughi Software Developer


⭐ If you find this project useful, consider giving it a star on GitHub!

About

A Telegram bot that extracts audio directly from video files sent in Telegram.

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages