Skip to content

SharabhojI/discord-TTS-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom TTS Discord Bot

This is a custom Discord text-to-speech (TTS) bot that allows for users to set a specific channel for TTS, adjust language, speed, and pitch settings, while ensuring the bot remains active only when needed through an inactivity disconnect feature.

Features

  • Text-to-Speech: Reads aloud messages posted in a designated channel.
  • Multi-Language Support: Supports multiple languages for TTS, adjustable per user.
  • Speed and Pitch Adjustment: Users can customize the speed and pitch of the TTS voice.
  • Automatic Disconnection: Automatically disconnects from voice channels after a period of inactivity to conserve resources.
  • Dynamic Configuration: Server administrators can dynamically set the text channel used for TTS and adjust the inactivity timer.

Setup and Installation

Prerequisites

  • Docker installed on your system
  • A Discord Bot Token from the Discord Developer Portal

Configuration

  1. Environment Setup: Place your bot token in a .env file in the root directory of your project: BOT_TOKEN=your_discord_bot_token_here
  2. Build the Docker image:
docker build -t tts-bot .
  1. Run the container:
docker run -d --env-file .env tts-bot

Usage

Commands

  • /join: Join a voice channel and activate TTS in the designated channel.
  • /leave: Leave the voice channel and stop TTS.
  • /setchannel [channel]: Set the specific text channel for TTS.
  • /setinactivetimer [minutes]: Set the inactivity timer for auto-disconnect.
  • /setlang [language]: Set the preferred language for TTS.
  • /setspeed [speed]: Set the speech speed for TTS.
  • /setpitch [pitch]: Set the speech pitch for TTS.
  • /listlang: List the available languages for gTTS.
  • /clearqueue: Clear the current TTS queue.

Setting Up the TTS Channel

To designate a channel for TTS, use the /setchannel command followed by the channel name.

About

Repository containing source code for a custom Text-To-Speech Discord bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published