-
Notifications
You must be signed in to change notification settings - Fork 0
/
JOY.yml
361 lines (329 loc) · 10.8 KB
/
JOY.yml
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# These variables get assigned their respective value at startup
StartingVariables:
Name: joy
UserName: User
SpeechClipsDir: T:/Media/Audio Clips/JOY Speech Clips/
TheMinuteHourDir: T:/Media/Music/tmh archive/
BrowserExePath: C:/Program Files/Mozilla Firefox/firefox.exe
SteamExePath: C:/Program Files (x86)/Steam/Steam.exe
SpotifyCLIExePath: C:/Python39/Scripts/spotify.exe
VPNCLIExePath: C:/Program Files/Private Internet Access/piactl.exe
SearchURL: https://duckduckgo.com/
PwshExePath: C:/Program Files (x86)/PowerShell/7/pwsh.exe
# List of Command names (pulled from Commands) that are to be executed at startup. They will be executed with an empty speech input.
StartupCommands:
# List of Commands, including name, regex, and subsequent actions to be executed
Commands:
Good Morning:
Regex: "^good morning {Name}$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Hello.mp3"
Volume: 30
WaitForFinish: true
Open Email:
Regex: "^({Name} )?open email$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{BrowserExePath}"
Arguments: ["https://mail.google.com/mail/u/0/#inbox"]
Open Plex:
Regex: "^({Name} )?open (media server|plex)$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{BrowserExePath}"
Arguments: [http://127.0.0.1:32400/web/index.html#!/]
Open Youtube:
Regex: "^({Name} )?open you( )?tube$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{BrowserExePath}"
Arguments: [https://www.youtube.com/]
Open Netflix:
Regex: "^({Name} )?open netflix$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{BrowserExePath}"
Arguments: [https://www.netflix.com/]
Open Search:
Regex: "^({Name} )?open search$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{BrowserExePath}"
Arguments: ["{SearchURL}"]
Open Steam:
Regex: "^({Name} )?open steam$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{SteamExePath}"
Is Steam Down:
Regex: "^({Name} )?is steam( currently)? down$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{BrowserExePath}"
Arguments: [https://steamstat.us/]
Play Chess:
Regex: "^({Name} )?would you like to play a game of chess$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{BrowserExePath}"
Arguments: [https://www.chess.com/play/computer]
Open/Close Spotify:
Regex: "^({Name} )?(open|close) (spotify|spot (a fi|if i)|music)$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: If
ConditionSets:
- Conditions:
- Type: Equals
LeftOperand: "{CMD:1}"
RightOperand: open
TrueActions:
- Type: RunApplication
Executable: "C:/Users/{ENV:USERNAME}/AppData/Roaming/Spotify/Spotify.exe"
FalseActions:
- Type: CloseApplication
Application: spotify.exe
Play/Pause Spotify:
Regex: "^({Name} )?(play|pause) (song|music)$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{SpotifyCLIExePath}"
Arguments: ["{CMD:1}"]
Play Next Song:
Regex: "^({Name} )?(play next|skip (this|the)) song$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{SpotifyCLIExePath}"
Arguments: [next]
Play Previous Song:
Regex: "^({Name} )?play (previous|last) song$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{SpotifyCLIExePath}"
Arguments: [previous]
Say Current Song:
Regex: "^({Name} )?what( i|')s the current song$"
Actions:
- Type: RunApplication
Executable: "{SpotifyCLIExePath}"
WaitForFinish: true
StdOutVariable: currentSpotifySong
Arguments: [status]
- Type: TextRemovePrefix
Text: "{currentSpotifySong}"
Prefix: "Paused: "
OutputVariable: currentSpotifySong
- Type: TextRemovePrefix
Text: "{currentSpotifySong}"
Prefix: "Playing: "
OutputVariable: currentSpotifySong
- Type: SayText
Text: "{UserName} the current song is {currentSpotifySong}"
Set Music Volume:
Regex: "^({Name} )?(set|that) (music|song) volume ((.+)( .+)?)( percent)?$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: TextRemoveSuffix
Text: "{CMD:3}"
Suffix: " percent"
OutputVariable: musicVolume
- Type: TextParseNumber
Text: "{musicVolume}"
OutputVariable: musicVolume
- Type: RunApplication
Executable: "{SpotifyCLIExePath}"
Arguments: [volume, to, "{musicVolume}"]
Stop All Sounds:
Regex: "^({Name} )?stop all sound(s)?$"
Actions:
- Type: StopAllSounds
Say Current Time:
Regex: "^({Name} )?(what( i|')s the (current )?time|what time is it)$"
Actions:
- Type: SayText
Text: "{UserName} the current time is {TIME:%I:%M %p}"
Toggle Lights:
Regex: "^({Name} )?(ch|t)urn (on|off) (the )?(office|off the|authors|home|bedroom) (white|(s)?light|like)(s)?$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: If
ConditionSets:
- Conditions:
- Type: Equals
LeftOperand: "{CMD:2}"
RightOperand: "on"
TrueActions:
- Type: SetVariable
Value: "true"
OutputVariable: turnLightsOn
FalseActions:
- Type: SetVariable
Value: "false"
OutputVariable: turnLightsOn
- Type: SetVariable
Value: "{CMD:4}"
OutputVariable: lightsGroup
- Type: If
ConditionSets:
- Conditions:
- Type: Equals
LeftOperand: "{lightsGroup}"
RightOperand: "off the"
- Conditions:
- Type: Equals
LeftOperand: "{lightsGroup}"
RightOperand: "authors"
TrueActions:
- Type: SetVariable
Value: office
OutputVariable: lightsGroup
- Type: RunApplication
Executable: C:/Python39/python.exe
WorkingDirectory: T:/src/hue_lights
Arguments: [./hue_lights.py, -g, "{lightsGroup}", --on, "{turnLightsOn}"]
Say Current Weather:
Regex: "^({Name} )?what( i|')s the (current )?weather$"
Actions:
- Type: RunApplication
Executable: "{PwshExePath}"
Arguments: [-NoProfile, -ExecutionPolicy, Unrestricted, -Command, T:/src/Weather/Weather.ps1]
WaitForFinish: true
StdOutVariable: currentWeather
- Type: SayText
Text: "It is currently {currentWeather}"
Bring Back Disco:
Regex: "^{Name} bring back disco$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: C:/Python39/python.exe
WorkingDirectory: T:/src/hue_lights
Arguments: [./hue_lights.py, -g, "office", --effect, "colorloop"]
Set System Volume:
Regex: "^({Name} )?(set|that) system volume ((.+)( .+)?)( percent)?$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: TextRemoveSuffix
Text: "{CMD:3}"
Suffix: " percent"
OutputVariable: systemVolume
- Type: TextParseNumber
Text: "{systemVolume}"
OutputVariable: systemVolume
- Type: SetSystemVolume
Volume: "{systemVolume}"
Say VPN State:
Regex: "^({Name} )?what('| i)s the current vpn (state|satus)$"
Actions:
- Type: RunApplication
Executable: "{VPNCLIExePath}"
Arguments: [get, connectionstate]
WaitForFinish: true
StdOutVariable: vpnConnectionState
- Type: SayText
Text: "{UserName} the VPN is currently {vpnConnectionState}"
Toggle VPN:
Regex: "^{Name} (connect|disconnect) (the )?vpn$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: RunApplication
Executable: "{VPNCLIExePath}"
Arguments: ["{CMD:0}"]
Create Timer:
Regex: "^({Name} )?(create|set|the|that) (the |a |an )?(countdown|timer|alarm) for (.+) (second|minute|hour)(s)?$"
Actions:
- Type: SayText
Text: "Yes {UserName}, creating {CMD:4} {CMD:5} timer"
- Type: Timer
Offset: "{CMD:4}"
Unit: "{CMD:5}"
AudioFile: "{TheMinuteHourDir}/textringtone/mouth sounds.mp3"
Volume: 30
List All Timers:
Regex: "^({Name} )?list all (alarms|timers)$"
Actions:
- Type: SayText
Text: "{UserName} there are currently {NUMALARMS} timers. {ALARMS}"
Cancel Timers:
Regex: "^({Name} )?(clear|cancel) all (timers|alarms)$"
Actions:
- Type: PlayAudio
AudioFile: "{SpeechClipsDir}/Yes User.mp3"
Volume: 30
- Type: CancelTimers
Nice Grill!:
Regex: "^({Name} )?that( i|')s a real nice grill (you(r)?|ya|yeah) got there$"
Actions:
- Type: PlayAudio
AudioFile: "{TheMinuteHourDir}/5 - Relay/Bits/That's a Nice Grill.mp3"
Sweet Little Kevin:
Regex: "^({Name} )?tell me a story about sweet little kevin$"
Actions:
- Type: PlayAudio
AudioFile: "{TheMinuteHourDir}/3 - Trials/Bits/Sweet Little Kevin.mp3"
Test Binding:
Regex: "^simulate keyboard$"
Actions:
- Type: SendKeys
Keys: "c"
Test RunCommand:
Regex: "^test run command$"
Actions:
- Type: RunCommand
CommandName: "Say Current Time"
Test Respone:
Regex: "^try response$"
Actions:
- Type: SayText
Text: "Loser says what?"
- Type: GetUserSpeech
WaitTime: 2.5
OutputVariableName: "TestResponse"
- Type: SayText
Text: "Loser says {TestResponse}. Haha, got you sucker!"