Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

GeneploreAI/tts-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An experimental Text-to-Speech Discord bot

This Discord bot was an experiment with the OpenAI TTS API, where users would be able to join voice channels and hear messages sent in specified text channel. The bot also included a few other commands related to TTS functions, like /tts [text] which would generate speech from a given prompt using the OpenAI or Google APIs.

Getting Started

  1. Create a bot at https://discord.dev/ and get a Bot Token.
  2. Install Python 3.12.2, create a venv, and install the dependencies listed at requirements.txt.
  3. Initialize a MongoDB database using either MongoDB Atlas or another suitable cloud/local platform.
  4. Get an OpenAI API key at https://platform.openai.com
  5. (optional) Get Google Cloud Application Default Credentials (ADC) and load it into your working environment. Running this bot in a Google Compute Engine VM is recommended.
  6. Create a .env file with the three secrets you have acquired listed as so:
OPENAI_API_KEY=sk-...
DISCORD_TOKEN=MTI...
MONGODB_URL==mongodb+srv://...
  1. Update the client.user.id and following IDs at line 55 to match your environment.
  2. Replace line 1239's user snowflake with your own Discord snowflake, so you can sync the bot's commands.
  3. Activate the venv and run python main.py to initialize the bot.
  4. Add the bot to your server with a provided OAuth 2 URL back at https://discord.dev
  5. DM the bot !sync to sync the command tree with the Discord API.

Developed by Geneplore AI

https://geneplore.com

Copyright (C) 2025  Geneplore AI

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

About

An experimental Text-to-Speech Discord bot developed by Geneplore AI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages