Skip to content

derpeloper/ostinato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ostinato logo

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: v1.6.7 (official release)

License: AGPL v3

add the bot to your server note: this is hosted on my personal machine. expect outages for maintenance, bug fixes, or if my power goes out. you have been warned.

features

  • 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 5 languages (english, spanish, french, portuguese, korean).
  • voice customization: change the voice model, speed, and language to fit your vibe.
  • persistent settings: remembers your preferences per server, 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.

commands

  • run /help in a server where the bot is present to see a full list of commands.
  • for a detailed breakdown of commands for both moderators/admins and the general public, refer to the src/commands folder in this repository.

self-hosting

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.

heads up on hardware

the engine is a bit hungry. on my machine, it sits between ~300mb and ~600mb of ram. your mileage may vary depending on your system, but don't try running this on a toaster.

setup

  1. clone the repo and install dependencies. if you don't know how to clone a repo, google is your best friend. this might take a while, go grab a coffee.

    git clone https://github.com/derpeloper/ostinato
    cd ostinato
    npm install
  2. edit your config files:

    • in src/env.json, replace token with your actual discord bot token.
    • in src/config.js, replace clientId with your bot's client id.
    • optional: set guildId in src/config.js to your server's id if you only want the bot in one server (and want the commands to show up instantly). otherwise, leave it as null.
  3. give the bot the right permissions: priority speaker, connect, read message history, and speak. otherwise, it'll just be a silent observer.

  4. download the engine (and maybe go get that donut now):

    git clone https://github.com/supertone-inc/supertonic.git
    cd supertonic
    git clone https://huggingface.co/Supertone/supertonic-2 assets
    cd nodejs
    npm install
  5. go back to the root folder and bring it to life:

    cd ../../
    node src/index.js

configuration (self-host only)

check src/config.js to change the internal engine settings.

  • ttsSpeed: base speed of the speech. zoom zoom.
  • ttsVolume: volume of the speech. can you hear me now?
  • ttsQuality: 1 to 50. quality vs speed trade-off.
  • defaultLang: fallback language if detection fails.
  • maxConcurrency: per-guild queue. how many messages can process at once per server to prevent 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!

issues & contributions

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.

disclaimer

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.

credits

  • Supertonic 2 by Supertone — the high-quality tts engine doing the heavy lifting.

About

giving a voice to the voiceless.

Topics

Resources

License

Stars

Watchers

Forks

Contributors