Chatty is a simple, open-source Text-to-Speech (TTS) bot for Discord, designed to bring your server's voice channels to life. Built with Node.js, it's configurable and easy to set up.
- High-Quality TTS: Utilizes Google Cloud Text-to-Speech for natural-sounding voices.
- Multi-language Support: Configurable to work with different languages.
- Easy to Use: Simple commands to join/leave voice channels and manage the bot.
- Configurable: Customize the bot's behavior, TTS voice, and more through simple JSON configuration files.
- Node.js version 22.12.0 or higher
- Build Tools for sodium
-
Windows user can install dependencies by this command:
npm install --global --production --add-python-to-path windows-build-tools
-
macOS/Linux needs packages below:
makegccwith C++ supportlibtool
-
-
Clone the repository
git clone https://github.com/AnthonyKwon/chattybot.git -b 4.0.0 cd chattybot -
Install dependencies
npm install
-
Configure the bot
Please refer Configuration section to do it.
-
Build the application
npm run build
-
Register slash commands
npm run register
Chatty is configured through three files in the configs/ directory:
general.json: For general bot settings, such as your Discord bot token and default locale.tts.json: For Text-to-Speech settings, like voice gender, speed, and pitch.gcp-credentials.json: Your Google Cloud Platform credentials file.
Please refer CONFIGURATION.md for more details.
You can authenticate with Google Cloud TTS in two ways:
-
Workload Identity Federation (Recommended): Set the
GOOGLE_APPLICATION_CREDENTIALSenvironment variable to the path of your credentials file:export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/credentials -
Service Account Keys: Place your service account key file in the
configs/directory and name itgcp-credentials.json.
There are two ways to run Chatty:
-
Production Mode (Recommended for most cases):
npm start
This will start the bot with minimal console logging.
-
Development Mode:
You have to register command as development mode first, with:
npm run registerDev
Then you can start as development mode with command below.
npm run dev
This will start the bot in development mode, with more verbose logging.
We also have systemd unit file and docker image for automation.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the GNU General Public License, version 2.