A high-performance Discord TTS bot powered by FastAPI and gTTS.
- FastAPI Backend: Fast and efficient API to trigger TTS.
- Discord Integration: Joins voice channels and plays high-quality TTS audio.
- Docker Support: Easy deployment using Docker and Docker Compose.
- Robust Audio Handling: Uses locks to prevent overlapping audio and ensures proper file cleanup.
- Docker and Docker Compose
- A Discord Bot Token (from the Discord Developer Portal)
-
Clone the repository:
git clone https://github.com/Axiom3D-YT/vexotts.git cd vexotts -
Create a
.envfile from the example:cp .env.example .env
Edit
.envand paste yourDISCORD_TOKEN. -
Start the bot with Docker Compose:
docker-compose up -d
The bot exposes a POST endpoint to trigger TTS:
Endpoint: POST /speak
Payload:
{
"guild_id": 123456789,
"channel_id": 987654321,
"message": "Hello from VexoTTS!",
"voice": "en",
"slow": false
}If you don't want to build the image locally, you can pull the pre-built AMD64 image from the GitHub Container Registry:
-
Authenticate with GHCR (if the repository is private):
echo $GITHUB_TOKEN | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
-
Pull the latest image:
docker pull ghcr.io/axiom3d-yt/vexotts:latest
-
Update your
docker-compose.ymlto use the image and run:docker-compose up -d