-
Notifications
You must be signed in to change notification settings - Fork 0
/
tts_NVDA.xml
102 lines (94 loc) · 1.93 KB
/
tts_NVDA.xml
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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Tuesday, December 09, 2008, 2:04 PM -->
<!-- MuClient version 4.37 -->
<!-- Plugin "tts_NVDA" generated by Plugin Wizard -->
<muclient>
<plugin
name="TTS_NVDA"
author="Tyler Spivey"
id="8ceac14882c875c8f16c2662"
language="Lua"
purpose="Plugin for the NVDA screen reader"
save_state="y"
date_written="2009-11-06 17:00:34"
requires="4.37"
version="1.0"
>
</plugin>
<aliases>
<alias
match="tts_stop"
enabled="y"
send_to="12"
sequence="100"
>
<send>nvda.stop()</send>
</alias>
<alias
match="tts_interrupt *"
enabled="y"
send_to="12"
sequence="100"
>
<send>
nvda.stop()
nvda.say("%1")</send>
</alias>
<alias
match="tts_note *"
enabled="y"
send_to="12"
sequence="100"
>
<send>nvda.say("%1")</send>
</alias>
<alias
script="TTSToggle"
match="tts"
enabled="y"
group="TTS"
omit_from_command_history="y"
omit_from_log="y"
omit_from_output="y"
sequence="100"
>
</alias>
</aliases>
<!-- Get our standard constants -->
<include name="constants.lua"/>
<script>
<![CDATA[
tts_enabled = true
function OnPluginInstall ()
assert(package.loadlib("tts_NVDA.dll", "luaopen_audio"))()
nvda.say("NVDA test plugin initialized")
end
function OnPluginScreendraw(t, log, line)
if not tts_enabled then
return
end --tts off
-- checking for an empty string, or a string composed only of spaces.
-- If we don't, NVDA says blank.
if (t == 0 or t == 1) and not line:find("^%s*$") then
nvda.say(line)
end
end --function
function TTSToggle (name, line, wc)
if tts_enabled then
tts_enabled = false
nvda.say("speech off")
else
tts_enabled = true
nvda.say("speech on")
end
end
function OnPluginTabComplete(word)
if tts_enabled then
nvda.stop()
nvda.say(word)
end
end
]]>
</script>
</muclient>