a discord bot that gives a voice to the voiceless. because listening is better than reading, and sounding human is better than sounding like a microwave.
current version: v2.5.6 (official release)
note: expect outages for maintenance, bug fixes, or unexpected hiccups. you have been warned.
- supertonic tts: powered by the supertonic engine to provide high-quality, human-sounding voices. it's like magic, but with actual code.
- localization: fully translated across 25 languages (excluding English GB and US).
- multilingual tts: natively supports 31 languages via the supertonic 3 engine.
- voice customization: change the voice model, speed, and language to fit your vibe.
- persistent settings: remembers your preferences per server via sqlite, because nobody likes repeating themselves.
- worker pool & concurrency: scales with your needs! supports spawning multiple workers for parallel processing, and queues are properly isolated per-server.
- crash resilience: it tries heavily not to crash. emphasize on "tries". auto-restarts individual workers if they trip over their own shoelaces.
- memory management: watches memory usage like a hawk. a hawk that occasionally panics and restarts things to stay fresh.
if you're wondering why this isn't just another google-tts wrapper, here is the breakdown:
ostinato doesn't just play a file; it manages a stream. the flow looks like this:
user input discord.js event worker pool supertonic engine ffmpeg discord voice channel.
to ensure low latency, the bot pipes raw audio data directly through ffmpeg, transcoding it into the Opus format required by discord's voice servers in real-time.
the supertonic engine is heavy and can be blocking. to prevent the entire bot from freezing while one person is reading a novel, the bot implements a worker pool.
- the main process handles the discord api and event routing.
- tasks are dispatched to a pool of child processes (workers).
- each worker handles its own instance of the engine, allowing for true parallel processing across different servers.
- this architecture prevents "head-of-line blocking," meaning a long request in one server won't stall the queue for others.
because the engine can be resource-intensive, the bot monitors the RSS (resident set size) of each child process. if a worker exceeds its memory limit or becomes unstable, the manager automatically kills it and spawns a fresh one without dropping the main bot connection.
instead of a bloated database, the bot uses better-sqlite3. it's fast, file-based, and perfect for storing per-guild configuration (voice, speed, language) without adding unnecessary network latency.
the bot manages a localization layer that maps inputs across 25 discord locales. it ensures that the correct voice models and linguistic parameters are passed to the engine based on the server's current settings.
if you want 100% uptime and total control, host it yourself. you'll get access to customizable settings like speed (zoom zoom), volume, and performance tweaks.
- node.js: v22.12.0 or higher (required by discord.js v14).
- git: for cloning the repos.
- ram & cpu: the engine is hungry. expect ~300mb to ~500mb of ram per worker. be warned: it can get really heavy on the cpu as that is how the audio is generated, and overall resource usage scales directly with the number of workers set in your config. don't try running this on a toaster.
- clone ostinato and navigate inside:
git clone https://github.com/derpeloper/ostinato cd ostinato - clone the supertonic engine and download its voice assets:
note: make sure you end up back in the ostinato root directory when you're done.
git clone https://github.com/supertone-inc/supertonic.git cd supertonic git clone https://huggingface.co/Supertone/supertonic-3 assets cd ..
- configure your bot before launching, otherwise it'll just scream into the void (or not launch at all):
- in
src/env.json, replacetokenwith your actual discord bot token. - in
src/config.js, replaceclientIdwith your bot's client id. - optional: set
guildIdinsrc/config.jsif you only want the bot in one server.
- in
we have shiny setup scripts now to handle dependency installation and launch in one go. choose your poison:
- linux/macos:
chmod +x setup.sh ./setup.sh
- windows:
.\setup.ps1
ensure your bot has priority speaker, connect, read message history, and speak in your discord server. otherwise, it'll just be a silent observer.
edit src/config.js to tweak the engine:
ttsSpeed: base speed of the speech. zoom zoom.ttsVolume: volume of the speech. can you hear me now?ttsQuality: 1 to 50. the trade-off between audio fidelity and processing speed.defaultLang: fallback language if detection fails (supports all 31 languages — seeconfig.jsfor full list).maxConcurrency: how many messages can process at once per server. prevents one active server from lagging others.workerMemoryLimit: memory cap for a worker before it restarts. keeps the ram gremlins at bay.workerCount: how many parallel workers to spin up. use with caution—each worker takes ~300mb-400mb ram!
more settings are available in src/config.js. check it out if you want to see the rest.
found a bug? have a suggestion? bot exploded? feel free to open an issue and let me know.
you are also welcome to fork this repository for your own use. explore, experiment, break things. it's open source for a reason.
may contain traces of nuts and bolts. the hosted version will not have 24/7 uptime due to maintenance and bug fixes. use at your own risk. if it breaks, you get to keep the pieces.
- Supertonic 3 by Supertone — the high-quality tts engine doing the heavy lifting.
all base translations were automatically generated via Gemini 3.5 Flash and may not be fully accurate.
note: contributors who helped verify locales may be listed by their alias rather than their Discord username.
| contributor | language locale |
|---|---|
| 9am1n_ | Hindi |
| croi | Lithuanian |
| Daniel | Korean |
| dash | Ukrainian |
| dash exskrime |
Russian |
| malios71 | French |
| marac | Dutch |
| michael | Spanish |
| orbital | Turkish |
| p | Vietnamese |
| rascage | Portuguese |
| salty | Croatian |
| sentry | Polish |
| cat lover steff |
Romanian |
the following languages have been cross-checked for consistency using independent, isolated Gemini 3.5 Flash sessions (one dedicated session per language). however, they have not yet been reviewed by a human:
Bulgarian, Chinese (China), Chinese (Taiwan), Czech, Danish, Finnish, German, Greek, Hungarian, Italian, Japanese, Norwegian, Swedish, Thai.
want to help? if you speak any of these languages and notice something off, please open an issue with the label
locale feedbackso we can move it up to the verified list.
disclaimer: these locales were verified for previous versions of the bot. translations for newer features or modified strings may not be fully accurate.
| Contributor | Language Locale | Last Verified |
|---|