Skip to content

NoxxOP/ShrutixMusic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

22 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ShrutixMusic Bot Logo

๐ŸŽต ShrutixMusic Bot ๐ŸŽต

Ultimate Telegram Music Bot with Superior Audio Quality & Advanced Music Features

Support Channel Support Group Owner

GitHub Forks GitHub Stars GitHub Contributors GitHub Issues

๐ŸŒŸ Quick Deploy

Deploy to Heroku

๐Ÿš€ Deploy to Render (Free Hosting)

Deploy to Render

โ˜๏ธ Deploy to Railway

Deploy on Railway

โœจ Music Features

๐ŸŽต High-Quality Audio Streaming

  • Crystal Clear Sound: 320kbps premium audio quality
  • Zero Lag Streaming: Optimized for smooth playback
  • Multiple Audio Sources: YouTube, Spotify, SoundCloud, Apple Music, Deezer
  • Live Stream Support: Radio stations and live music streams
  • Local File Support: Upload and play your own music files

๐ŸŽ›๏ธ Advanced Music Controls

  • Smart Queue Management: Add, remove, and reorder songs
  • Playlist Creation: Save your favorite tracks
  • Shuffle & Repeat: Various playback modes
  • Volume Control: Precise volume adjustment (1-200%)
  • Seek Function: Jump to any part of the song
  • Speed Control: Playback speed from 0.5x to 2x

๐ŸŽง Audio Enhancement

  • Audio Filters: Bass boost, treble, echo, reverb effects
  • Equalizer: Custom sound profiles
  • Noise Reduction: Clear audio in noisy environments
  • Auto-Quality: Adapts to network conditions
  • Crossfade: Smooth transitions between songs

๐ŸŽช Interactive Features

  • Lyrics Display: Real-time synchronized lyrics
  • Song Recognition: Identify playing songs
  • Music Search: Advanced search with filters
  • Trending Music: Discover popular tracks
  • Genre-Based Playlists: Curated music collections

๐Ÿ“Š Repository Statistics

Repo Size Issues Pull Requests Forks Stars LICENSE Last Commit

๐ŸŽฏ Bot Commands

Bot mein sabhi commands ka detailed information /help command se mil jayega. Bot ke andar hi comprehensive help section available hai jo sabhi features aur commands explain karta hai.

๐Ÿš€ VPS Deployment Guide

๐Ÿ”ง System Requirements

  • OS: Ubuntu 20.04+ / Debian 11+ / CentOS 8+
  • RAM: Minimum 1GB (Recommended 2GB+ for better performance)
  • Storage: 5GB+ free space for music cache
  • Network: Stable internet connection (10+ Mbps recommended)
  • Python: 3.8+ required

๐Ÿ“ฆ Step-by-Step Installation

1. Update System & Install Dependencies

# Update system packages
sudo apt-get update && sudo apt-get upgrade -y

# Install required packages
sudo apt-get install -y python3 python3-pip python3-venv git wget curl ffmpeg screen

# Install Node.js (for better audio processing)
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs

# Install additional audio libraries
sudo apt-get install -y libopus0 opus-tools libavcodec-extra

2. Clone Repository

# Clone the ShrutixMusic repository
git clone https://github.com/NoxxOP/ShrutixMusic
cd ShrutixMusic

# Make scripts executable
chmod +x start

3. Setup Python Environment

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Upgrade pip and install dependencies
pip3 install --upgrade pip setuptools wheel
pip3 install -r requirements.txt

4. Configure Environment Variables

# Edit the .env file with your details
nano .env

Required Configuration:

# Telegram API Credentials (Get from my.telegram.org)
API_ID=12345678
API_HASH=your_api_hash_here

# Bot Token (Get from @BotFather)
BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrSTUvwxYZ

# Bot Information
BOT_NAME=ShrutixMusic
BOT_USERNAME=YourBotUsername

# Database (MongoDB Atlas - Free tier available)
MONGO_DB_URI=mongodb+srv://username:password@cluster.mongodb.net/ShrutixMusic

# Owner Details
OWNER_ID=your_telegram_user_id
OWNER_USERNAME=your_username

# Pyrogram Session String (Generate using @ShrutiSessionBot)
STRING1=your_session_string_here

# Optional: Additional Assistant Accounts
STRING2=
STRING3=
STRING4=
STRING5=

# Logging
LOG_GROUP_ID=-100xxxxxxxxx
LOG_CHANNEL_ID=-100xxxxxxxxx

# Support Links
SUPPORT_GROUP=https://t.me/ShrutiBotSupport
SUPPORT_CHANNEL=https://t.me/ShrutiBots

# Music Settings
DURATION_LIMIT_MIN=1440
AUTO_LEAVING_ASSISTANT=True
AUTO_LEAVE_ASSISTANT_TIME=3600

# Spotify Integration (Optional)
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret

# Additional Settings
START_IMG_URL=https://telegra.ph/file/your-image.jpg
UPSTREAM_REPO=https://github.com/NoxxOP/ShrutixMusic
UPSTREAM_BRANCH=main
GIT_TOKEN=your_github_token

5. Running the Bot

Option A: Using Screen (Recommended for VPS)

# Create a new screen session
screen -S shrutixmusic

# Start the bot
python3 -m ShrutixMusic

# Detach from screen: Press Ctrl+A then D
# To reattach later: screen -r shrutixmusic

Option B: Direct Execution

# Run directly (will stop when terminal closes)
python3 -m ShrutixMusic

Option C: Using the Start Script

# Use the provided start script
./start

Option D: Background Service (Advanced)

# Create systemd service
sudo nano /etc/systemd/system/shrutixmusic.service

Add this content:

[Unit]
Description=ShrutixMusic Telegram Bot
After=network.target

[Service]
Type=simple
User=your_username
WorkingDirectory=/path/to/ShrutixMusic
Environment=PATH=/path/to/ShrutixMusic/venv/bin
ExecStart=/path/to/ShrutixMusic/venv/bin/python -m ShrutixMusic
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
# Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable shrutixmusic
sudo systemctl start shrutixmusic

# Check status
sudo systemctl status shrutixmusic

# View logs
journalctl -u shrutixmusic -f

๐Ÿ”‘ Session String Generation

Method 1: Telegram Bot (Easiest)

  1. Start @ShrutiSessionBot
  2. Send your phone number with country code
  3. Enter the OTP you receive
  4. Copy the generated session string

Method 2: Online Generator

Visit: Session Generator

  1. Enter your API_ID and API_HASH
  2. Provide phone number and OTP
  3. Get your session string

Method 3: Manual Generation

# Install pyrogram if not installed
pip3 install pyrogram tgcrypto

# Create session generator script
nano generate_session.py

Add this code:

from pyrogram import Client

API_ID = int(input("Enter your API_ID: "))
API_HASH = input("Enter your API_HASH: ")

with Client("my_account", API_ID, API_HASH) as app:
    print(f"Session String: {app.export_session_string()}")
# Run the generator
python3 generate_session.py

๐Ÿ› ๏ธ Troubleshooting

Common Issues & Solutions

๐ŸŽต Music Not Playing

# Check FFmpeg installation
ffmpeg -version

# Reinstall FFmpeg if needed
sudo apt-get remove ffmpeg
sudo apt-get install ffmpeg

# Check bot permissions in voice chat
# Make sure bot is admin with voice chat permissions

๐Ÿ”Š Audio Quality Issues

# Install additional audio codecs
sudo apt-get install ubuntu-restricted-extras

# For better opus support
sudo apt-get install libopus-dev opus-tools

๐Ÿ“ฑ Bot Not Responding

# Check if bot is running
ps aux | grep python

# Check logs
tail -f logs/ShrutixMusic.log

# Restart bot
screen -r shrutixmusic
# Press Ctrl+C to stop, then restart with python3 -m ShrutixMusic

๐Ÿ—„๏ธ Database Connection Issues

  • Verify MongoDB URI is correct
  • Check if your IP is whitelisted in MongoDB Atlas
  • Ensure database user has read/write permissions

๐ŸŽค Voice Chat Issues

  • Ensure bot has admin rights in the group
  • Check if voice chat permissions are enabled
  • Verify the bot can join voice chats

Performance Optimization

๐Ÿš€ Server Performance

# Increase system limits
echo "fs.file-max = 65536" | sudo tee -a /etc/sysctl.conf
echo "net.core.somaxconn = 65536" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

# Monitor resource usage
htop
# or
top

๐ŸŽต Music Performance

  • Use SSD storage for faster audio processing
  • Allocate at least 2GB RAM for smooth streaming
  • Ensure stable internet (10+ Mbps for high quality)
  • Close unnecessary applications to free up resources

๐Ÿ”„ Updates & Maintenance

Updating the Bot

# Stop the bot first
screen -r shrutixmusic
# Press Ctrl+C to stop

# Pull latest changes
git pull origin main

# Update dependencies
source venv/bin/activate
pip3 install -r requirements.txt --upgrade

# Restart bot
python3 -m ShrutixMusic

Automated Updates (Optional)

# Create update script
nano update.sh
#!/bin/bash
cd /path/to/ShrutixMusic
git pull origin main
source venv/bin/activate
pip3 install -r requirements.txt --upgrade
sudo systemctl restart shrutixmusic
echo "ShrutixMusic updated successfully!"
# Make executable and run
chmod +x update.sh
./update.sh

๐ŸŽต Music Sources & Compatibility

Supported Platforms

  • ๐ŸŽต YouTube: Songs, playlists, live streams
  • ๐ŸŽง Spotify: Tracks, albums, playlists (requires API)
  • โ˜๏ธ SoundCloud: Independent artists and tracks
  • ๐ŸŽ Apple Music: Track information and search
  • ๐ŸŽถ Deezer: High-quality music streaming
  • ๐Ÿ“ป Radio Stations: Live radio streams
  • ๐Ÿ“ Local Files: Upload and play personal music

Audio Formats Supported

  • MP3: Standard quality, widely compatible
  • FLAC: Lossless audio, premium quality
  • OGG/Opus: Optimized for Telegram
  • M4A/AAC: High quality, smaller file size
  • WAV: Uncompressed, studio quality

Quality Options

  • Low: 96kbps (data saving mode)
  • Medium: 128kbps (balanced quality)
  • High: 320kbps (premium quality)
  • Ultra: FLAC/Lossless (maximum quality)

๐ŸŒ Multi-Language Support

ShrutixMusic supports multiple languages:

  • ๐Ÿ‡บ๐Ÿ‡ธ English (Default)
  • ๐Ÿ‡ฎ๐Ÿ‡ณ Hindi - /language hindi
  • ๐Ÿ‡ช๐Ÿ‡ธ Spanish - /language spanish
  • ๐Ÿ‡ซ๐Ÿ‡ท French - /language french
  • ๐Ÿ‡ฉ๐Ÿ‡ช German - /language german
  • ๐Ÿ‡ท๐Ÿ‡บ Russian - /language russian
  • ๐Ÿ‡ฏ๐Ÿ‡ต Japanese - /language japanese
  • ๐Ÿ‡ฐ๐Ÿ‡ท Korean - /language korean
  • ๐Ÿ‡จ๐Ÿ‡ณ Chinese - /language chinese
  • ๐Ÿ‡ง๐Ÿ‡ท Portuguese - /language portuguese

๐Ÿ“ˆ Analytics & Statistics

Track your bot's performance with built-in analytics:

  • Total Users: Active users count
  • Music Played: Total songs played
  • Popular Tracks: Most requested songs
  • Usage Patterns: Peak usage times
  • Server Performance: Resource utilization

Access statistics with /stats command (admin only).

๐Ÿค Contributing

We welcome contributions! Here's how you can help:

๐Ÿ› Bug Reports

  • Use GitHub Issues to report bugs
  • Include detailed steps to reproduce
  • Provide system information and logs

โœจ Feature Requests

  • Suggest new music features
  • Explain the use case and benefits
  • Check existing issues first

๐Ÿ’ป Code Contributions

  • Fork the repository
  • Create feature branch
  • Submit pull request with clear description

๐Ÿ“ Documentation

  • Improve README and guides
  • Add usage examples
  • Translate to other languages

๐Ÿ™ Credits & Acknowledgments

Main Developer

Special Thanks

  • Pyrogram - Telegram MTProto API Framework
  • PyTgCalls - Voice chat integration
  • YouTube-DL - Media extraction
  • FFmpeg - Audio/Video processing
  • All contributors and testers

Open Source Libraries

  • pyrogram, pytgcalls, youtube-dl, ffmpeg-python
  • aiohttp, aiofiles, motor, pymongo
  • And many more amazing libraries!

๐Ÿ“„ License

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

License Summary

  • โœ… Commercial use allowed
  • โœ… Modification allowed
  • โœ… Distribution allowed
  • โœ… Private use allowed
  • โŒ Liability protection
  • โŒ Warranty provided

๐Ÿ”— Important Links

Support & Community

Developer Resources


Made with love

๐ŸŽต Experience Premium Music with ShrutixMusic Bot! ๐ŸŽต

Star โญ this repository if you found it helpful!

About

๐ŸŽถ ๐—™๐—ฎ๐˜€๐˜ & ๐—™๐—ผ๐—ฐ๐˜‚๐˜€๐—ฒ๐—ฑ ๐—ง๐—ฒ๐—น๐—ฒ๐—ด๐—ฟ๐—ฎ๐—บ ๐— ๐˜‚๐˜€๐—ถ๐—ฐ ๐—•๐—ผ๐˜ ๐ŸŽง

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages