Text to Speech [TTS] for Chat

then do !tts well on the localhost:25000/alerts page open replace localhost with the ip if on a server

this is a tts command not a variable to use in other places sorry

Yes, caught it would be easy to reuse this, cause it’s also in the alert page

if you edit the script you code make it work

Doesn’t work either. Check out this little video I made:

Press F12 on the browser and check the console tab for errors? also copy reconnectingWS.min.js into PhantomBot\web\common\reconnecting-websocket as thats where it should be read from

Console looks good and there’s already a “reconnectingWS.min.js” in that folder

no errors in the console when you do !tts though? you could also message me @Dakoda#0001 on discord if its easyer to type back and forth

Nope. Screenshot was made after I typed “!tts test” in chat

All sorted out @eZ_KrieG3R spelt the folders wrong for the location of speakSystem.js

1 Like

@Dakoda tried new tts files and I’m not getting any output either. Where do we look for errors using the console?

I got this working with v3.0.0 after a little troubleshooting. Not sure if anyone else made the same mistakes, but:

  • Make sure you put speakSystem.js in the scripts\custom\systems\ folder, and double check that it’s in the right place.
  • Use the second (zipped) index.html that @Dakoda provided, as the first one doesn’t work.
  • If you have any script blocking in your browser, make sure to allow responsivevoice.org

Otherwise, works great for me! Thanks for all your hard work guys and gals.

To reiterate, these are the specific files you need:

  • index.zip - extract to: <PhantomBot>\web\alerts\index.html
  • index.js - move to: <PhantomBot>\web\alerts\js\index.js
  • speakSystem.js - move to: <PhantomBot>\scripts\custom\systems\speakSystem.js
1 Like

Shouldn’t be an issue soon as i’m putting this into the main build

Just wanted to clarify, but this is getting added to phantombot or as part of the custom module?

Will be hoping to work on updating this system soon :slight_smile:

Is there a more current example of text to speech implementation anywhere? I’m running PhantomBot on a google cloud platform vm which has the text to speech api running on it and am trying to make a simple tts plugin.

If someone could point me in the right direction I would greatly appreciate it. It seems Rhino javascript doesnt support the http POST request I’d need to directly communicate with the api, however elsewhere someone implied that all of java was fair game for custom scripts. Is there a way to implement the sample functions for java listed here: Samples & tutorials  |  Cloud Text-to-Speech API  |  Google Cloud into the bot somehow? I have no experience with java or javascript but I have programmed in C++ and even a bit of assembly language, and right now I’m leaning towards coding an entirely separate chatbot in python just to accomplish the functionality I want as I’ve found many more online resources to that end. So… thoughts?

any update ??

what update? It works as it should.

@Dakoda how do you turn off the senders name??