Text to Speech [TTS] for Chat


Is it possible for bot to recognize 2 languages at the same time?
For example if command is written in russian !saу МЕМЫ it would use russian, but in case of !say MEMES it would use english voice?


I would be really grateful if someone can bring me or show me how to make this command only available for subs and also add a cooldown, since it’s a separate script doesn’t work out by putting it on the normal panel. Anyone can help? :slight_smile:


the command will be in the permissions area


Thanks mate! I now just need something in order to add a delay, really appreciated. :slight_smile:


!coolcom [command] [seconds] [type (global / user)]


!coolcom tts 60 user

will make a 1 minute cooldown per user.


Welp, yeah I got left behind when the forums moved. Thanks everyone who helped with this!
Updated things to hopefully work with PhantomBot 2.4.1, as it seems there was some restructuring done to PhantomBot’s alert handling at some point? This should work, it doesn’t give any errors, just have not been able to test it properly as audio hooks & alerts are silent for me at the moment (even on vanilla PhantomBot). If someone could test if for me, that’d be great.
speakSystem.js (1.9 KB) (Largely unchanged from Dakoda’s, just typo fixes in the comments iirc).
index.js (11.2 KB) Place in web/alerts/js/ and overwrite the existing file. Probably best to create a backup of the old file first.


Did a test and works with a browser, but not with obs browser plugin.


Excellent, thank you!
I believe the original script, for older versions of PhantomBot, only worked in a browser also. The QTWebkitBrowser plugin for OBS doesn’t seem to capture noise made by webpages. For Linux users, the “Linux Browser” plugin, however, does capture sound.