Remove not necessary include
[kdeaccessibility.git] / kttsd / kspeak / basic.txt
blob772a7eb36c2da1bdaac4c69280c9604d842813bb
1 @ This script demonstrates the basic capabilities of kspeak.
2 @ Let's turn on command echo so all commands are shown.
3 @ set echo on
4 set echo on
6 @ Display the D-Bus replies that KTTSD returns.
8 set replies on
10 @ Display the D-Bus signals that KTTSD sends.
12 set signals on
14 @ Speak something.
16 say "Hello.  This is the k speak utility speaking." 0
18 @ Pause 3 seconds.
20 @ pause 3000
22 pause 3000
24 @ Turn replies and signals displays off.
26 set replies off
27 set signals off
29 @ Fill a buffer with multiple lines of text.
31 bufferbegin
32 The quality of mercy is not strained.
33 It droppeth as the gentle rain from heaven.
34 Upon the place beneath. It is twice blest.
35 It blesseth him that gives and him that takes.
36 bufferend
38 @ Set a timeout for WAITs of 20 seconds.
40 set wtimeout 20000
42 @ Turn command echo off.
44 set echo off
46 @ Send the buffer to KTTSD.
47 @ jn = say "$(_BUF)" 0
49 jn = say "$(_BUF)" 0
51 @ Wait for KTTSD to signal that the job has finished (state = 6).
52 @ Here we use the built-in variable _APPID for the AppID of kspeak.
54 @ wait jobStateChanged $(_APPID) $(jn) 6
56 wait jobStateChanged $(_APPID) $(jn) 6
58 @ Send the buffer to KTTSD again, wait for the second
59 @ sentence to be spoken, (markerType = 1),
60 @ then cancel the job by deleting it.
62 @ jn = say "$(_BUF)" 0
63 @ wait marker $(_APPID) $(jn) 1 2
64 @ removeJob $(jn)
66 jn = say "$(_BUF)" 0
67 wait marker $(_APPID) $(jn) 1 2
68 removeJob $(jn)
70 @ End of test.
72 @ quit
74 quit