Skip to content
eliwarePublic

About

Discord text-to-speech bot using OpenAI TTS

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

eliware.org

@eliware/ttsbot License CI

Discord text-to-speech bot using OpenAI TTS

Table of Contents

Features

ttsbot reads messages from one linked Discord text channel and speaks them in a voice channel with OpenAI text-to-speech.

Requirements

Use Node.js 26 or later. Create a Discord application. Request an OpenAI API key. Enable the Message Content privileged intent.

Setup

Copy .env.example to .env. Set the required credentials. Install dependencies with npm ci. Run npm start.

Usage

Invite the bot with the bot and applications.commands scopes. Use /join from a voice channel to link it to the current text channel. Read the user guide for setup, configuration, commands, and operation. Read release notes for version history.

Development

Read AGENTS.md before changing repository files. Find user documents in docs/README.md. Read maintained rules in specs/README.md.

Testing

Run npm test for aggregate validation. Run npm run lint, npm run audit, or npm run format:check for focused checks.

Troubleshooting

Check the user guide troubleshooting section for configuration, Discord, audio, and health problems.

Security

Keep DISCORD_TOKEN and OPENAI_API_KEY out of Git. The health server has no authentication. Direct Node startup listens on loopback. Docker listens inside its container. Map published host ports to loopback. Use network rules to control wider access.

Configuration

Set DISCORD_CLIENT_ID, DISCORD_TOKEN, and OPENAI_API_KEY before startup. The user guide lists all environment variables, defaults, and valid ranges.

Operations

Build the container with docker build -t ttsbot:local .. Read the Docker instructions and systemd instructions. The GHCR package is public, so anyone can pull its version tags. The workflow builds for its runner's default architecture and publishes after validation. Publication does not deploy. Record the image digest before deployment.

Commands

Use /help, /join, /leave, /voice, /skip, and /stop. Read command descriptions for behavior and options.

Events

The bot handles Discord client readiness, slash command interactions, and server messages. It ignores bot messages and messages outside the linked text channel.

Intents and permissions

Enable the Guilds, Guild Messages, Message Content, and Guild Voice States intents. Grant View Channels and Send Messages in the text channel. Grant Connect and Speak in the voice channel.

Support

For help, questions, or to chat with the author and community, visit:

Discordeliware.org

eliware.org on Discord

Links

License

MIT © Eliware

About

Discord text-to-speech bot using OpenAI TTS

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages