-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME.txt
277 lines (183 loc) · 10.7 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# TTS Alerts And Chat
TTS Alerts And Chat is a Streamlabs Chatbot script that provides text-to-speech capabilities for Streamlabs alerts, chat messages, and a customizable command.
The text-to-speech uses your computer's narrator voice and has some customization for voice, volume, and speech rate.
Feel free to reach out to me in the [Streamlabs Chatbot discord](https://discord.gg/xFcsxft) (@Kruiser8) or on Twitter ([@Kruiser8](https://twitter.com/kruiser8)) with any questions or feedback.
***
# Credits
Thanks to [Ocgineer](https://github.com/ocgineer) for his [Streamlabs Event Receiver](https://github.com/ocgineer/Streamlabs-Events-Receiver) that allows events to be caught in a Streamlabs Chatbot script.
***
# Installation
For chatbot script installation help, please view this guide:
https://github.com/StreamlabsSupport/Streamlabs-Chatbot/wiki/Prepare-&-Import-Scripts
For setting up the text-to-speech overlay:
https://github.com/StreamlabsSupport/Streamlabs-Chatbot/wiki/Script-overlays
***
# Usage
Before the alert text-to-speech will work, you'll need to add a Streamlabs Socket API token.
- In Streamlabs Chatbot, open the *Scripts* tab
- Click the *TTS Alerts And Chat* script in order to open the settings sidebar
- At the bottom, select the **Streamlabs Token** dropdown
- Click the *Get Socket Token* button or go to https://streamlabs.com/dashboard#/settings/api-settings in a browser.
- In the browser, click the **API Tokens** tab
- Copy the **Your Socket API Token**
- Paste this value into the **Streamlabs Socket Token** setting in the chatbot
- Click the *Save Settings* button at the bottom of the script settings
***
# Setting Information
All settings have extra information if you hover over the field in the chatbot. Below is a summarized list of settings.
## Text-To-Speech Settings
All TTS Voice settings are in this section.
### Voice Name
Set the narrator voice to use. This is a list of the narrator voices on your computer.
### Volume
Set the volume of the narrator.
### Speaking Rate
Set the pace of how fast the narrator should speak.
### Maximum Characters
Set the maximum number of characters in a TTS message. This only applies to text-to-speech triggered by the command or chat message. This does not apply to alert messages.
Use 0 for no limit on characters.
### Maximum Characters Message
Message to send to viewers when a TTS message is too long.
***
## TTS Command
In this section, you can customize a command that uses text-to-speech.
### Command Name
Set the command to use for text-to-speech.
### Permission level
Set the viewer rank/role required to use the TTS command.
### Permission level info
Set the user, rank, or tier for permission. Only used with certain permission levels: User_Specific, Min_Rank, Min_Points, Min_Hours.
### Cost (Points)
The number of points required to use the TTS command.
### TTS Message Format
Customize the message read by the narrator. The following variables will get replaced.
- *{user}* will be replaced with the viewer's username
- *{message}* will be replaced with the chat message
***
## TTS Command Usage
In this section, you can customize the usage for the TTS Command that uses text-to-speech.
### Usage
Determine how viewer's can use the TTS command. Options allow support for messages through discord and whispers.
### Send Usage Reply
Enable this to send a message to a viewer when they attempt to trigger the command from an invalid location. For example, this applies when the **Usage** is *Stream Chat* and a viewer attempts to trigger the command via Discord.
### Usage Reply Message
This is the message to send to a viewer who triggers the command from an invalid location.
***
## TTS Command Cooldown
In this section, you can customize a cooldown for the TTS Command that uses text-to-speech.
### Use Cooldown Message
Enable this to send a message when the command is on cooldown.
### Caster ignores cooldown
Enables the Caster to ignore the cooldown.
### Cooldown in seconds
Set the number of seconds before the TTS command can be used again.
### Cooldown Response
The message that the bot will display when the command is on cooldown.
- *{user}* will be replaced with the viewer's username
- *{cooldown}* will be replaced with the time remaining
### User cooldown in seconds
Set the number of seconds before a user can use the TTS command again.
### User Cooldown Response
The message that the bot will display when the command is on user cooldown
- *{user}* will be replaced with the viewer's username
- *{cooldown}* will be replaced with the time remaining
***
## TTS Chat Messages
In this section, you can toggle text-to-speech for ALL chat messages
### TTS All Chat Messages
Enable Text-To-Speech for all messages
### Exclude Reading Commands
Exclude reading messages that start with an exclamation point (!).
### TTS Message Format
Customize the message read by the narrator. The following variables will get replaced.
- *{user}* will be replaced with the viewer's username
- *{message}* will be replaced with the chat message
***
## TTS Chat Messages Usage
In this section, you can customize the usage for triggering text-to-speech via a message.
### Usage
Determine how viewer's can trigger text-to-speech. Options allow support for messages through discord and whispers.
### Send Usage Reply
Enable this to send a message to a viewer when they attempt to trigger the command from an invalid location. For example, this applies when the **Usage** is *Stream Chat* and a viewer attempts to trigger the command via Discord.
### Usage Reply Message
This is the message to send to a viewer who triggers the command from an invalid location.
***
## TTS Overlay
Text-to-speech messages can be displayed on a customizable overlay.
### Exclude Alerts from Overlay
Enable this to not display alert text-to-speech messages on the overlay.
### Overlay Message Format
Use this to format the message displayed on the overlay when triggered via command, chat messages, or messages included with alerts.
**Note:** This format will not apply to alert responses but WILL apply for messages included with alerts.
### Font Color, Font Outline, Font Shadow, Font Size, Font Family
Customize how the font looks on the overlay. Font family must be an available font on your computer.
### Background Color
Set the background color of the overlay.
### Border Color
Set the border color of the overlay.
### Horizontal/Vertical Align
Control the positioning of the overlay within the browser source by aligning the overlay to the left, center, or right and top, center, or bottom.
### Animate In/Out
Choose which animate.css animations to use when displaying the overlay.
***
## Alert Types
There are alert types across Mixer, Streamlabs, Twitch, and Youtube that are customizable. To save space, below is a summary of setting types.
### Enabled
Enable TTS for the given alert.
### Delay (seconds)
Delay in seconds to read the alert after receiving it. If two alerts are received simultaneously, the second's delay may be lost.
This setting is an attempt to delay TTS until after alert sfx is finished. Unfortunately, the script receives alerts *instantly* as opposed to through the queue that Streamlabs provides.
### Alert Message
The format of the alert to be read by text-to-speech. There are a number of variables available per alert type. Hover over the message in the settings for a detailed list for that alert.
- *{name}* will be replaced with the username
- *{amount}* will be replaced with a number for that alert (viewers, raiders, bits, etc.)
- *{isPlural}* is sometimes used to provide an 's' when amount > 1
- *{tier}* is the Twitch subscription tier
- *{months}* is the number of months of a subscription
- *{gifter}* is the gifter of a Twitch sub
- *{recipients}* is the comma-delimited list of viewers that are gifted subs when more than 1 sub is gifted to the channel
***
## Banned Users
### Banned Users Command Name, Permission, and Permission Info
Use these to customize the command used to ban users. The command is used as follows:
`!banuser kruiser8` - to ban/unban the user named kruiser8
`!banuser kruiser8 300` - to ban/unban the user named kruiser8 for 300 seconds
### Open users.txt
Edit this file to control and view which users are banned from TTS.
### User Banned Response
The message sent in chat when a user is banned from using TTS.
- *{user}* will be replaced with the user who used the !banuser command
- *{banned}* will be replaced with a user that was banned
### User Unbanned Response
The message sent in chat when a user is unbanned from using TTS.
- *{user}* will be replaced with the user who used the !banuser command
- *{banned}* will be replaced with a user that was unbanned
***
## Banned Words
### Banned Word Command Name, Permission, and Permission Info
Use these to customize the command used to ban words and phrases. The command is used as follows:
`!banword toy` - to ban/unban the word `toy`
### Banned Words Setting
Choose whether to skip messages with banned words or replace the words.
### Match Whole Words Only
Enable this to match words in the banned.txt file exactly. If disabled (unchecked), partial words will be matched. As an example, if **fu** is a banned word and the message contains **fudge**, the message will get blocked if this setting is unchecked. This helps avoid trolls that combine words together.
### Banned Word Replacement
This field is used to replace banned words when found in messages if *Replace Banned Words* was selected as the **Banned Words Setting**.
### Open banned.txt
Edit this file to control what words or phrases are banned from TTS. Each banned word or phrase should be on its own line.
### Word Banned Response
The message sent in chat when a word is banned from use in TTS.
- *{user}* will be replaced with the user who used the !banword command
- *{word}* will be replaced with a word that was banned
### Word Unbanned Response
The message sent in chat when a word is unbanned from use in TTS.
- *{user}* will be replaced with the user who used the !banword command
- *{word}* will be replaced with the word that was unbanned
***
## Streamlabs Token
### Streamlabs Socket Token
**Your Socket API Token** from https://streamlabs.com/dashboard#/settings/api-settings. See the *Usage* section for details.
***
# Copyright
This script was made by **Kruiser8** (https://twitch.tv/kruiser8) and is licensed under the *Creative Commmons Attribution 4.0 International License (CC BY 4.0)*
For License information, visit https://creativecommons.org/licenses/by/4.0/