Text to Speech [TTS] for Chat


#62

I changed it to speech.voice = voices.filter(function(voice) { return voice.name == 'Microsoft Zira Mobile - English (United States)'; })[0]; and the voice still sounds female but from GB?! It’s like nothing changed from your code above. Sorry to keep bothering about this. Just trying to understand what is happening. Thank you.


#63

and you have it set to speech.lang = 'en-US'; right?


#64

Yes. I took that code directly from what you posted above. Not sure why it isn’t seeing that line speech.lang = 'en-US'; //Also added as for some reason android devices used for testing loaded spanish language


#65

ok so i have worked it out… the first voice will be the male then after that it will be the voice you have selected

so the first time you load the page and the voice runs it will use your computers default voice then after that it will then use the voice selected in the script

i have also edited my post with the code to make it easier to edit too


#66

Alright! All is well now. Thank you for fixing that. It works great using Chrome on Windows 10. :clap::clap::clap:


#67

Hey guys.
I was trying to set the tts stuff up but it just didn’t work.

Distro: Linux Mint 19 Tara
Browser: Google Chome 71.0.3578.98 (newest version, stable)
PhantomBot Version: 2.4.2

I copied all files in the right locations and edited the index.js. (Editing the file broke my existing gif alerts but I still tried to set it up)
When I start PhantomBot, the console says that the module is up and running, I can see the !tts command in the default commands but it isn’t working when for example triggering !tts Hello in chat.

I changed the language because I’m German two times.
The first time to:
var voiceSelect = 'Microsoft Hedda Desktop - German (de-DE)';
as reported on my windows machine

and to:
var voiceSelect = 'German (de)';
as reported from the Linux machine PB is running on but none of that worked.

Is there anything that I’m missing because I use Linux or did I misread something?

Any help is appreciated.

~Fabi | eZ_KrieG3R


#68

Did a new update to work with OBS no longer using windows speech synthesis we are now using responsiveVoice LANGUAGES

Alerts Files:

Script Files:


#69

I was trying to use it but I get this message in the console two times in a row after opening the alerts page:

[ERROR] [handleFile()@HTTPServerCommon.java:572] HTTP Server: handleFile(): ./web/cdn-cgi/apps/head/CiKxy_WscsghWXlYFYXrfbeqcfk.js (Datei oder Verzeichnis nicht gefunden)

(Datei oder Verzeichnis nicht gefunden) means something like “No such file or directory”.

PB tts core-error log.txt (23,8 KB)


#70

Try this and unzip it seems like the forum adds some wierd line to html files so zipped it up for you index.zip (1.0 KB)


#71

welp…
No errors this time but I still don’t have a !tts command. :confused:


#72

Did you add the other 2 scripts in the right folders and reboot the bot??


#73

yup

And the module gets loaded successfully
[01-29-2019 @ 01:59:47.035 GMT] Loaded module: custom/system/speakSystem.js (Enabled)


#74

I already tried it by myself, but I didn’t get it to work:

I want that the Sub-Message will be read out with with script. But currently PhantomBot isn’t even getting this information…


#75

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


#76

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


#77

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


#78

if you edit the script you code make it work


#79

Doesn’t work either. Check out this little video I made:
https://youtu.be/WphiYrCuOR4


#80

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


#81

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