Discord TTS bot powered by Amazon Polly.
- Node.js 18+
- AWS account with Polly access
- Discord bot token
Note: An AWS account is required to use this bot. If you find a way to use TTS without AWS, or want to add support for another provider, feel free to open an Issue.
git clone https://github.com/Akryst/Textalk
cd Textalk
npm install
cp .env.example .env
# Fill in your credentials in .env
node deploy-commands.js
npm startDISCORD_TOKEN=your_discord_bot_token
CLIENT_ID=your_discord_application_client_id
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
| Command | Permission | Description |
|---|---|---|
/set-channel |
Manage Guild | Sets the current channel as the TTS channel. Every message sent here will be read aloud when the author is in a voice channel. |
/set-channel action:Disable TTS |
Manage Guild | Disables TTS for the server. |
/voices |
Everyone | Lists all available Amazon Polly voices. |
/voices set:<voice-id> |
Everyone | Sets the server voice (e.g. /voices set:Joanna). |
| ID | Language | Gender |
|---|---|---|
| Joanna | English (US) | Female |
| Matthew | English (US) | Male |
| Amy | English (UK) | Female |
| Brian | English (UK) | Male |
| Lupe | Spanish (US) | Female |
| Pedro | Spanish (US) | Male |
| Lucia | Spanish (ES) | Female |
| Enrique | Spanish (ES) | Male |
| Mia | Spanish (MX) | Female |
- Admin runs
/set-channelin a text channel - Users join a voice channel
- Users send messages in the configured channel
- Bot joins the voice channel and reads the message aloud via Amazon Polly
- Bot disconnects automatically after 5 minutes of inactivity
index.js entry point
deploy-commands.js register slash commands with Discord
config/config.js all configuration and voice list
commands/
set-channel.js
voices.js
events/
ready.js
interactionCreate.js
messageCreate.js
utils/
tts.js Amazon Polly synthesis
audio.js voice connection, queue, inactivity timer
database.js guild settings persisted to data/guild_settings.json
- Go to IAM → Users → Create user
- Attach policy:
AmazonPollyFullAccess - Security credentials → Create access key → Application outside AWS
- Copy the
Access key IDandSecret access keyto your.env
MIT