forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
/
spkguide.txt
1620 lines (1324 loc) · 69 KB
/
spkguide.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
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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
The Speakup User's Guide
For Speakup 3.1.2 and Later
By Gene Collins
Updated by others
Last modified on Mon Sep 27 14:26:31 2010
Document version 1.3
Copyright (c) 2005 Gene Collins
Copyright (c) 2008 Samuel Thibault
Copyright (c) 2009, 2010 the Speakup Team
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License".
Preface
The purpose of this document is to familiarize users with the user
interface to Speakup, a Linux Screen Reader. If you need instructions
for installing or obtaining Speakup, visit the web site at
http://linux-speakup.org/. Speakup is a set of patches to the standard
Linux kernel source tree. It can be built as a series of modules, or as
a part of a monolithic kernel. These details are beyond the scope of
this manual, but the user may need to be aware of the module
capabilities, depending on how your system administrator has installed
Speakup. If Speakup is built as a part of a monolithic kernel, and the
user is using a hardware synthesizer, then Speakup will be able to
provide speech access from the time the kernel is loaded, until the time
the system is shutdown. This means that if you have obtained Linux
installation media for a distribution which includes Speakup as a part
of its kernel, you will be able, as a blind person, to install Linux
with speech access unaided by a sighted person. Again, these details
are beyond the scope of this manual, but the user should be aware of
them. See the web site mentioned above for further details.
1. Starting Speakup
If your system administrator has installed Speakup to work with your
specific synthesizer by default, then all you need to do to use Speakup
is to boot your system, and Speakup should come up talking. This
assumes of course that your synthesizer is a supported hardware
synthesizer, and that it is either installed in or connected to your
system, and is if necessary powered on.
It is possible, however, that Speakup may have been compiled into the
kernel with no default synthesizer. It is even possible that your
kernel has been compiled with support for some of the supported
synthesizers and not others. If you find that this is the case, and
your synthesizer is supported but not available, complain to the person
who compiled and installed your kernel. Or better yet, go to the web
site, and learn how to patch Speakup into your own kernel source, and
build and install your own kernel.
If your kernel has been compiled with Speakup, and has no default
synthesizer set, or you would like to use a different synthesizer than
the default one, then you may issue the following command at the boot
prompt of your boot loader.
linux speakup.synth=ltlk
This command would tell Speakup to look for and use a LiteTalk or
DoubleTalk LT at boot up. You may replace the ltlk synthesizer keyword
with the keyword for whatever synthesizer you wish to use. The
speakup.synth parameter will accept the following keywords, provided
that support for the related synthesizers has been built into the
kernel.
acntsa -- Accent SA
acntpc -- Accent PC
apollo -- Apollo
audptr -- Audapter
bns -- Braille 'n Speak
dectlk -- DecTalk Express (old and new, db9 serial only)
decext -- DecTalk (old) External
dtlk -- DoubleTalk PC
keypc -- Keynote Gold PC
ltlk -- DoubleTalk LT, LiteTalk, or external Tripletalk (db9 serial only)
spkout -- Speak Out
txprt -- Transport
dummy -- Plain text terminal
Note: Speakup does * NOT * support usb connections! Speakup also does *
NOT * support the internal Tripletalk!
Speakup does support two other synthesizers, but because they work in
conjunction with other software, they must be loaded as modules after
their related software is loaded, and so are not available at boot up.
These are as follows:
decpc -- DecTalk PC (not available at boot up)
soft -- One of several software synthesizers (not available at boot up)
See the sections on loading modules and software synthesizers later in
this manual for further details. It should be noted here that the
speakup.synth boot parameter will have no effect if Speakup has been
compiled as modules. In order for Speakup modules to be loaded during
the boot process, such action must be configured by your system
administrator. This will mean that you will hear some, but not all, of
the bootup messages.
2. Basic operation
Once you have booted the system, and if necessary, have supplied the
proper bootup parameter for your synthesizer, Speakup will begin
talking as soon as the kernel is loaded. In fact, it will talk a lot!
It will speak all the boot up messages that the kernel prints on the
screen during the boot process. This is because Speakup is not a
separate screen reader, but is actually built into the operating
system. Since almost all console applications must print text on the
screen using the kernel, and must get their keyboard input through the
kernel, they are automatically handled properly by Speakup. There are a
few exceptions, but we'll come to those later.
Note: In this guide I will refer to the numeric keypad as the keypad.
This is done because the speakupmap.map file referred to later in this
manual uses the term keypad instead of numeric keypad. Also I'm lazy
and would rather only type one word. So keypad it is. Got it? Good.
Most of the Speakup review keys are located on the keypad at the far
right of the keyboard. The numlock key should be off, in order for these
to work. If you toggle the numlock on, the keypad will produce numbers,
which is exactly what you want for spreadsheets and such. For the
purposes of this guide, you should have the numlock turned off, which is
its default state at bootup.
You probably won't want to listen to all the bootup messages every time
you start your system, though it's a good idea to listen to them at
least once, just so you'll know what kind of information is available to
you during the boot process. You can always review these messages after
bootup with the command:
dmesg | more
In order to speed the boot process, and to silence the speaking of the
bootup messages, just press the keypad enter key. This key is located
in the bottom right corner of the keypad. Speakup will shut up and stay
that way, until you press another key.
You can check to see if the boot process has completed by pressing the 8
key on the keypad, which reads the current line. This also has the
effect of starting Speakup talking again, so you can press keypad enter
to silence it again if the boot process has not completed.
When the boot process is complete, you will arrive at a "login" prompt.
At this point, you'll need to type in your user id and password, as
provided by your system administrator. You will hear Speakup speak the
letters of your user id as you type it, but not the password. This is
because the password is not displayed on the screen for security
reasons. This has nothing to do with Speakup, it's a Linux security
feature.
Once you've logged in, you can run any Linux command or program which is
allowed by your user id. Normal users will not be able to run programs
which require root privileges.
When you are running a program or command, Speakup will automatically
speak new text as it arrives on the screen. You can at any time silence
the speech with keypad enter, or use any of the Speakup review keys.
Here are some basic Speakup review keys, and a short description of what
they do.
keypad 1 -- read previous character
keypad 2 -- read current character (pressing keypad 2 twice rapidly will speak
the current character phonetically)
keypad 3 -- read next character
keypad 4 -- read previous word
keypad 5 -- read current word (press twice rapidly to spell the current word)
keypad 6 -- read next word
keypad 7 -- read previous line
keypad 8 -- read current line (press twice rapidly to hear how much the
text on the current line is indented)
keypad 9 -- read next line
keypad period -- speak current cursor position and announce current
virtual console
It's also worth noting that the insert key on the keypad is mapped
as the speakup key. Instead of pressing and releasing this key, as you
do under DOS or Windows, you hold it like a shift key, and press other
keys in combination with it. For example, repeatedly holding keypad
insert, from now on called speakup, and keypad enter will toggle the
speaking of new text on the screen on and off. This is not the same as
just pressing keypad enter by itself, which just silences the speech
until you hit another key. When you hit speakup plus keypad enter,
Speakup will say, "You turned me off.", or "Hey, that's better." When
Speakup is turned off, no new text on the screen will be spoken. You
can still use the reading controls to review the screen however.
3. Using the Speakup Help System
In order to enter the Speakup help system, press and hold the speakup
key (remember that this is the keypad insert key), and press the f1 key.
You will hear the message:
"Press space to leave help, cursor up or down to scroll, or a letter to
go to commands in list."
When you press the spacebar to leave the help system, you will hear:
"Leaving help."
While you are in the Speakup help system, you can scroll up or down
through the list of available commands using the cursor keys. The list
of commands is arranged in alphabetical order. If you wish to jump to
commands in a specific part of the alphabet, you may press the letter of
the alphabet you wish to jump to.
You can also just explore by typing keyboard keys. Pressing keys will
cause Speakup to speak the command associated with that key. For
example, if you press the keypad 8 key, you will hear:
"Keypad 8 is line, say current."
You'll notice that some commands do not have keys assigned to them.
This is because they are very infrequently used commands, and are also
accessible through the sys system. We'll discuss the sys system later
in this manual.
You'll also notice that some commands have two keys assigned to them.
This is because Speakup has a built in set of alternative key bindings
for laptop users. The alternate speakup key is the caps lock key. You
can press and hold the caps lock key, while pressing an alternate
speakup command key to activate the command. On most laptops, the
numeric keypad is defined as the keys in the j k l area of the keyboard.
There is usually a function key which turns this keypad function on and
off, and some other key which controls the numlock state. Toggling the
keypad functionality on and off can become a royal pain. So, Speakup
gives you a simple way to get at an alternative set of key mappings for
your laptop. These are also available by default on desktop systems,
because Speakup does not know whether it is running on a desktop or
laptop. So you may choose which set of Speakup keys to use. Some
system administrators may have chosen to compile Speakup for a desktop
system without this set of alternate key bindings, but these details are
beyond the scope of this manual. To use the caps lock for its normal
purpose, hold the shift key while toggling the caps lock on and off. We
should note here, that holding the caps lock key and pressing the z key
will toggle the alternate j k l keypad on and off.
4. Keys and Their Assigned Commands
In this section, we'll go through a list of all the speakup keys and
commands. You can also get a list of commands and assigned keys from
the help system.
The following list was taken from the speakupmap.map file. Key
assignments are on the left of the equal sign, and the associated
Speakup commands are on the right. The designation "spk" means to press
and hold the speakup key, a.k.a. keypad insert, a.k.a. caps lock, while
pressing the other specified key.
spk key_f9 = punc_level_dec
spk key_f10 = punc_level_inc
spk key_f11 = reading_punc_dec
spk key_f12 = reading_punc_inc
spk key_1 = vol_dec
spk key_2 = vol_inc
spk key_3 = pitch_dec
spk key_4 = pitch_inc
spk key_5 = rate_dec
spk key_6 = rate_inc
key_kpasterisk = toggle_cursoring
spk key_kpasterisk = speakup_goto
spk key_f1 = speakup_help
spk key_f2 = set_win
spk key_f3 = clear_win
spk key_f4 = enable_win
spk key_f5 = edit_some
spk key_f6 = edit_most
spk key_f7 = edit_delim
spk key_f8 = edit_repeat
shift spk key_f9 = edit_exnum
key_kp7 = say_prev_line
spk key_kp7 = left_edge
key_kp8 = say_line
double key_kp8 = say_line_indent
spk key_kp8 = say_from_top
key_kp9 = say_next_line
spk key_kp9 = top_edge
key_kpminus = speakup_parked
spk key_kpminus = say_char_num
key_kp4 = say_prev_word
spk key_kp4 = say_from_left
key_kp5 = say_word
double key_kp5 = spell_word
spk key_kp5 = spell_phonetic
key_kp6 = say_next_word
spk key_kp6 = say_to_right
key_kpplus = say_screen
spk key_kpplus = say_win
key_kp1 = say_prev_char
spk key_kp1 = right_edge
key_kp2 = say_char
spk key_kp2 = say_to_bottom
double key_kp2 = say_phonetic_char
key_kp3 = say_next_char
spk key_kp3 = bottom_edge
key_kp0 = spk_key
key_kpdot = say_position
spk key_kpdot = say_attributes
key_kpenter = speakup_quiet
spk key_kpenter = speakup_off
key_sysrq = speech_kill
key_kpslash = speakup_cut
spk key_kpslash = speakup_paste
spk key_pageup = say_first_char
spk key_pagedown = say_last_char
key_capslock = spk_key
spk key_z = spk_lock
key_leftmeta = spk_key
ctrl spk key_0 = speakup_goto
spk key_u = say_prev_line
spk key_i = say_line
double spk key_i = say_line_indent
spk key_o = say_next_line
spk key_minus = speakup_parked
shift spk key_minus = say_char_num
spk key_j = say_prev_word
spk key_k = say_word
double spk key_k = spell_word
spk key_l = say_next_word
spk key_m = say_prev_char
spk key_comma = say_char
double spk key_comma = say_phonetic_char
spk key_dot = say_next_char
spk key_n = say_position
ctrl spk key_m = left_edge
ctrl spk key_y = top_edge
ctrl spk key_dot = right_edge
ctrl spk key_p = bottom_edge
spk key_apostrophe = say_screen
spk key_h = say_from_left
spk key_y = say_from_top
spk key_semicolon = say_to_right
spk key_p = say_to_bottom
spk key_slash = say_attributes
spk key_enter = speakup_quiet
ctrl spk key_enter = speakup_off
spk key_9 = speakup_cut
spk key_8 = speakup_paste
shift spk key_m = say_first_char
ctrl spk key_semicolon = say_last_char
spk key_r = read_all_doc
5. The Speakup Sys System
The Speakup screen reader also creates a speakup subdirectory as a part
of the sys system.
As a convenience, run as root
ln -s /sys/accessibility/speakup /speakup
to directly access speakup parameters from /speakup.
You can see these entries by typing the command:
ls -1 /speakup/*
If you issue the above ls command, you will get back something like
this:
/speakup/attrib_bleep
/speakup/bell_pos
/speakup/bleep_time
/speakup/bleeps
/speakup/cursor_time
/speakup/delimiters
/speakup/ex_num
/speakup/key_echo
/speakup/keymap
/speakup/no_interrupt
/speakup/punc_all
/speakup/punc_level
/speakup/punc_most
/speakup/punc_some
/speakup/reading_punc
/speakup/repeats
/speakup/say_control
/speakup/say_word_ctl
/speakup/silent
/speakup/spell_delay
/speakup/synth
/speakup/synth_direct
/speakup/version
/speakup/i18n:
announcements
characters
chartab
colors
ctl_keys
formatted
function_names
key_names
states
/speakup/soft:
caps_start
caps_stop
delay_time
direct
freq
full_time
jiffy_delta
pitch
inflection
punct
rate
tone
trigger_time
voice
vol
Notice the two subdirectories of /speakup: /speakup/i18n and
/speakup/soft.
The i18n subdirectory is described in a later section.
The files under /speakup/soft represent settings that are specific to the
driver for the software synthesizer. If you use the LiteTalk, your
synthesizer-specific settings would be found in /speakup/ltlk. In other words,
a subdirectory named /speakup/KWD is created to hold parameters specific
to the device whose keyword is KWD.
These parameters include volume, rate, pitch, and others.
In addition to using the Speakup hot keys to change such things as
volume, pitch, and rate, you can also echo values to the appropriate
entry in the /speakup directory. This is very useful, since it
lets you control Speakup parameters from within a script. How you
would write such scripts is somewhat beyond the scope of this manual,
but I will include a couple of simple examples here to give you a
general idea of what such scripts can do.
Suppose for example, that you wanted to control both the punctuation
level and the reading punctuation level at the same time. For
simplicity, we'll call them punc0, punc1, punc2, and punc3. The scripts
might look something like this:
#!/bin/bash
# punc0
# set punc and reading punc levels to 0
echo 0 >/speakup/punc_level
echo 0 >/speakup/reading_punc
echo Punctuation level set to 0.
#!/bin/bash
# punc1
# set punc and reading punc levels to 1
echo 1 >/speakup/punc_level
echo 1 >/speakup/reading_punc
echo Punctuation level set to 1.
#!/bin/bash
# punc2
# set punc and reading punc levels to 2
echo 2 >/speakup/punc_level
echo 2 >/speakup/reading_punc
echo Punctuation level set to 2.
#!/bin/bash
# punc3
# set punc and reading punc levels to 3
echo 3 >/speakup/punc_level
echo 3 >/speakup/reading_punc
echo Punctuation level set to 3.
If you were to store these four small scripts in a directory in your
path, perhaps /usr/local/bin, and set the permissions to 755 with the
chmod command, then you could change the default reading punc and
punctuation levels at the same time by issuing just one command. For
example, if you were to execute the punc3 command at your shell prompt,
then the reading punc and punc level would both get set to 3.
I should note that the above scripts were written to work with bash, but
regardless of which shell you use, you should be able to do something
similar.
The Speakup sys system also has another interesting use. You can echo
Speakup parameters into the sys system in a script during system
startup, and speakup will return to your preferred parameters every time
the system is rebooted.
Most of the Speakup sys parameters can be manipulated by a regular user
on the system. However, there are a few parameters that are dangerous
enough that they should only be manipulated by the root user on your
system. There are even some parameters that are read only, and cannot
be written to at all. For example, the version entry in the Speakup
sys system is read only. This is because there is no reason for a user
to tamper with the version number which is reported by Speakup. Doing
an ls -l on /speakup/version will return this:
-r--r--r-- 1 root root 0 Mar 21 13:46 /speakup/version
As you can see, the version entry in the Speakup sys system is read
only, is owned by root, and belongs to the root group. Doing a cat of
/speakup/version will display the Speakup version number, like
this:
cat /speakup/version
Speakup v-2.00 CVS: Thu Oct 21 10:38:21 EDT 2004
synth dtlk version 1.1
The display shows the Speakup version number, along with the version
number of the driver for the current synthesizer.
Looking at entries in the Speakup sys system can be useful in many
ways. For example, you might wish to know what level your volume is set
at. You could type:
cat /speakup/KWD/vol
# Replace KWD with the keyword for your synthesizer, E.G., ltlk for LiteTalk.
5
The number five which comes back is the level at which the synthesizer
volume is set at.
All the entries in the Speakup sys system are readable, some are
writable by root only, and some are writable by everyone. Unless you
know what you are doing, you should probably leave the ones that are
writable by root only alone. Most of the names are self explanatory.
Vol for controlling volume, pitch for pitch, inflection for pitch range, rate
for controlling speaking rate, etc. If you find one you aren't sure about, you
can post a query on the Speakup list.
6. Changing Synthesizers
It is possible to change to a different synthesizer while speakup is
running. In other words, it is not necessary to reboot the system
in order to use a different synthesizer. You can simply echo the
synthesizer keyword to the /speakup/synth sys entry.
Depending on your situation, you may wish to echo none to the synth
sys entry, to disable speech while one synthesizer is disconnected and
a second one is connected in its place. Then echo the keyword for the
new synthesizer into the synth sys entry in order to start speech
with the newly connected synthesizer. See the list of synthesizer
keywords in section 1 to find the keyword which matches your synth.
7. Loading modules
As mentioned earlier, Speakup can either be completely compiled into the
kernel, with the exception of the help module, or it can be compiled as
a series of modules. When compiled as modules, Speakup will only be
able to speak some of the bootup messages if your system administrator
has configured the system to load the modules at boot time. The modules
can be loaded after the file systems have been checked and mounted, or
from an initrd. There is a third possibility. Speakup can be compiled
with some components built into the kernel, and others as modules. As
we'll see in the next section, this is particularly useful when you are
working with software synthesizers.
If Speakup is completely compiled as modules, then you must use the
modprobe command to load Speakup. You do this by loading the module for
the synthesizer driver you wish to use. The driver modules are all
named speakup_<keyword>, where <keyword> is the keyword for the
synthesizer you want. So, in order to load the driver for the DecTalk
Express, you would type the following command:
modprobe speakup_dectlk
Issuing this command would load the DecTalk Express driver and all other
related Speakup modules necessary to get Speakup up and running.
To completely unload Speakup, again presuming that it is entirely built
as modules, you would give the command:
modprobe -r speakup_dectlk
The above command assumes you were running a DecTalk Express. If you
were using a different synth, then you would substitute its keyword in
place of dectlk.
If you have multiple drivers loaded, you need to unload all of them, in
order to completely unload Speakup.
For example, if you have loaded both the dectlk and ltlk drivers, use the
command:
modprobe -r speakup_dectlk speakup_ltlk
You cannot unload the driver for software synthesizers when a user-space
daemon is using /dev/softsynth. First, kill the daemon. Next, remove
the driver with the command:
modprobe -r speakup_soft
Now, suppose we have a situation where the main Speakup component
is built into the kernel, and some or all of the drivers are built as
modules. Since the main part of Speakup is compiled into the kernel, a
partial Speakup sys system has been created which we can take advantage
of by simply echoing the synthesizer keyword into the
/speakup/synth sys entry. This will cause the kernel to
automatically load the appropriate driver module, and start Speakup
talking. To switch to another synth, just echo a new keyword to the
synth sys entry. For example, to load the DoubleTalk LT driver,
you would type:
echo ltlk >/speakup/synth
You can use the modprobe -r command to unload driver modules, regardless
of whether the main part of Speakup has been built into the kernel or
not.
8. Using Software Synthesizers
Using a software synthesizer requires that some other software be
installed and running on your system. For this reason, software
synthesizers are not available for use at bootup, or during a system
installation process.
There are two freely-available solutions for software speech: Espeakup and
Speech Dispatcher.
These are described in subsections 8.1 and 8.2, respectively.
During the rest of this section, we assume that speakup_soft is either
built in to your kernel, or loaded as a module.
If your system does not have udev installed , before you can use a
software synthesizer, you must have created the /dev/softsynth device.
If you have not already done so, issue the following commands as root:
cd /dev
mknod softsynth c 10 26
While we are at it, we might just as well create the /dev/synth device,
which can be used to let user space programs send information to your
synthesizer. To create /dev/synth, change to the /dev directory, and
issue the following command as root:
mknod synth c 10 25
of both.
8.1. Espeakup
Espeakup is a connector between Speakup and the eSpeak software synthesizer.
Espeakup may already be available as a package for your distribution
of Linux. If it is not packaged, you need to install it manually.
You can find it in the contrib/ subdirectory of the Speakup sources.
The filename is espeakup-$VERSION.tar.bz2, where $VERSION
depends on the current release of Espeakup. The Speakup 3.1.2 source
ships with version 0.71 of Espeakup.
The README file included with the Espeakup sources describes the process
of manual installation.
Assuming that Espeakup is installed, either by the user or by the distributor,
follow these steps to use it.
Tell Speakup to use the "soft driver:
echo soft > /speakup/synth
Finally, start the espeakup program. There are two ways to do it.
Both require root privileges.
If Espeakup was installed as a package for your Linux distribution,
you probably have a distribution-specific script that controls the operation
of the daemon. Look for a file named espeakup under /etc/init.d or
/etc/rc.d. Execute the following command with root privileges:
/etc/init.d/espeakup start
Replace init.d with rc.d, if your distribution uses scripts located under
/etc/rc.d.
Your distribution will also have a procedure for starting daemons at
boot-time, so it is possible to have software speech as soon as user-space
daemons are started by the bootup scripts.
These procedures are not described in this document.
If you built Espeakup manually, the "make install" step placed the binary
under /usr/bin.
Run the following command as root:
/usr/bin/espeakup
Espeakup should start speaking.
8.2. Speech Dispatcher
For this option, you must have a package called
Speech Dispatcher running on your system, and it must be configured to
work with one of its supported software synthesizers.
Two open source synthesizers you might use are Flite and Festival. You
might also choose to purchase the Software DecTalk from Fonix Sales Inc.
If you run a google search for Fonix, you'll find their web site.
You can obtain a copy of Speech Dispatcher from free(b)soft at
http://www.freebsoft.org/. Follow the installation instructions that
come with Speech Dispatcher in order to install and configure Speech
Dispatcher. You can check out the web site for your Linux distribution
in order to get a copy of either Flite or Festival. Your Linux
distribution may also have a precompiled Speech Dispatcher package.
Once you've installed, configured, and tested Speech Dispatcher with your
chosen software synthesizer, you still need one more piece of software
in order to make things work. You need a package called speechd-up.
You get it from the free(b)soft web site mentioned above. After you've
compiled and installed speechd-up, you are almost ready to begin using
your software synthesizer.
Now you can begin using your software synthesizer. In order to do so,
echo the soft keyword to the synth sys entry like this:
echo soft >/speakup/synth
Next run the speechd_up command like this:
speechd_up &
Your synth should now start talking, and you should be able to adjust
the pitch, rate, etc.
9. Using The DecTalk PC Card
The DecTalk PC card is an ISA card that is inserted into one of the ISA
slots in your computer. It requires that the DecTalk PC software be
installed on your computer, and that the software be loaded onto the
Dectalk PC card before it can be used.
You can get the dec_pc.tgz file from the linux-speakup.org site. The
dec_pc.tgz file is in the ~ftp/pub/linux/speakup directory.
After you have downloaded the dec_pc.tgz file, untar it in your home
directory, and read the Readme file in the newly created dec_pc
directory.
The easiest way to get the software working is to copy the entire dec_pc
directory into /user/local/lib. To do this, su to root in your home
directory, and issue the command:
cp dec_pc /usr/local/lib
You will need to copy the dtload command from the dec_pc directory to a
directory in your path. Either /usr/bin or /usr/local/bin is a good
choice.
You can now run the dtload command in order to load the DecTalk PC
software onto the card. After you have done this, echo the decpc
keyword to the synth entry in the sys system like this:
echo decpc >/speakup/synth
Your DecTalk PC should start talking, and then you can adjust the pitch,
rate, volume, voice, etc. The voice entry in the Speakup sys system
will accept a number from 0 through 7 for the DecTalk PC synthesizer,
which will give you access to some of the DecTalk voices.
10. Using Cursor Tracking
In Speakup version 2.0 and later, cursor tracking is turned on by
default. This means that when you are using an editor, Speakup will
automatically speak characters as you move left and right with the
cursor keys, and lines as you move up and down with the cursor keys.
This is the traditional sort of cursor tracking.
Recent versions of Speakup provide two additional ways to control the
text that is spoken when the cursor is moved:
"highlight tracking" and "read window."
They are described later in this section.
Sometimes, these modes get in your way, so you can disable cursor tracking
altogether.
You may select among the various forms of cursor tracking using the keypad
asterisk key.
Each time you press this key, a new mode is selected, and Speakup speaks
the name of the new mode. The names for the four possible states of cursor
tracking are: "cursoring on", "highlight tracking", "read window",
and "cursoring off." The keypad asterisk key moves through the list of
modes in a circular fashion.
If highlight tracking is enabled, Speakup tracks highlighted text,
rather than the cursor itself. When you move the cursor with the arrow keys,
Speakup speaks the currently highlighted information.
This is useful when moving through various menus and dialog boxes.
If cursor tracking isn't helping you while navigating a menu,
try highlight tracking.
With the "read window" variety of cursor tracking, you can limit the text
that Speakup speaks by specifying a window of interest on the screen.
See section 15 for a description of the process of defining windows.
When you move the cursor via the arrow keys, Speakup only speaks
the contents of the window. This is especially helpful when you are hearing
superfluous speech. Consider the following example.
Suppose that you are at a shell prompt. You use bash, and you want to
explore your command history using the up and down arrow keys. If you
have enabled cursor tracking, you will hear two pieces of information.
Speakup speaks both your shell prompt and the current entry from the
command history. You may not want to hear the prompt repeated
each time you move, so you can silence it by specifying a window. Find
the last line of text on the screen. Clear the current window by pressing
the key combination speakup f3. Use the review cursor to find the first
character that follows your shell prompt. Press speakup + f2 twice, to
define a one-line window. The boundaries of the window are the
character following the shell prompt and the end of the line. Now, cycle
through the cursor tracking modes using keypad asterisk, until Speakup
says "read window." Move through your history using your arrow keys.
You will notice that Speakup no longer speaks the redundant prompt.
Some folks like to turn cursor tracking off while they are using the
lynx web browser. You definitely want to turn cursor tracking off when
you are using the alsamixer application. Otherwise, you won't be able
to hear your mixer settings while you are using the arrow keys.
11. Cut and Paste
One of Speakup's more useful features is the ability to cut and paste
text on the screen. This means that you can capture information from a
program, and paste that captured text into a different place in the
program, or into an entirely different program, which may even be
running on a different console.
For example, in this manual, we have made references to several web
sites. It would be nice if you could cut and paste these urls into your
web browser. Speakup does this quite nicely. Suppose you wanted to
past the following url into your browser:
http://linux-speakup.org/
Use the speakup review keys to position the reading cursor on the first
character of the above url. When the reading cursor is in position,
press the keypad slash key once. Speakup will say, "mark". Next,
position the reading cursor on the rightmost character of the above
url. Press the keypad slash key once again to actually cut the text
from the screen. Speakup will say, "cut". Although we call this
cutting, Speakup does not actually delete the cut text from the screen.
It makes a copy of the text in a special buffer for later pasting.
Now that you have the url cut from the screen, you can paste it into
your browser, or even paste the url on a command line as an argument to
your browser.
Suppose you want to start lynx and go to the Speakup site.
You can switch to a different console with the alt left and right
arrows, or you can switch to a specific console by typing alt and a
function key. These are not Speakup commands, just standard Linux
console capabilities.
Once you've changed to an appropriate console, and are at a shell prompt,
type the word lynx, followed by a space. Now press and hold the speakup
key, while you type the keypad slash character. The url will be pasted
onto the command line, just as though you had typed it in. Press the
enter key to execute the command.
The paste buffer will continue to hold the cut information, until a new
mark and cut operation is carried out. This means you can paste the cut
information as many times as you like before doing another cut
operation.
You are not limited to cutting and pasting only one line on the screen.
You can also cut and paste rectangular regions of the screen. Just
position the reading cursor at the top left corner of the text to be
cut, mark it with the keypad slash key, then position the reading cursor
at the bottom right corner of the region to be cut, and cut it with the
keypad slash key.
12. Changing the Pronunciation of Characters
Through the /speakup/i18n/characters sys entry, Speakup gives you the
ability to change how Speakup pronounces a given character. You could,
for example, change how some punctuation characters are spoken. You can
even change how Speakup will pronounce certain letters.
You may, for example, wish to change how Speakup pronounces the z
character. The author of Speakup, Kirk Reiser, is Canadian, and thus
believes that the z should be pronounced zed. If you are an American,
you might wish to use the zee pronunciation instead of zed. You can
change the pronunciation of both the upper and lower case z with the
following two commands:
echo 90 zee >/speakup/characters
echo 122 zee >/speakup/characters
Let's examine the parts of the two previous commands. They are issued
at the shell prompt, and could be placed in a startup script.
The word echo tells the shell that you want to have it display the
string of characters that follow the word echo. If you were to just
type:
echo hello.
You would get the word hello printed on your screen as soon as you
pressed the enter key. In this case, we are echoing strings that we
want to be redirected into the sys system.
The numbers 90 and 122 in the above echo commands are the ascii numeric
values for the upper and lower case z, the characters we wish to change.
The string zee is the pronunciation that we want Speakup to use for the
upper and lower case z.
The > symbol redirects the output of the echo command to a file, just
like in DOS, or at the Windows command prompt.
And finally, /speakup/i18n/characters is the file entry in the sys system
where we want the output to be directed. Speakup looks at the numeric
value of the character we want to change, and inserts the pronunciation
string into an internal table.
You can look at the whole table with the following command:
cat /speakup/i18n/characters
Speakup will then print out the entire character pronunciation table. I
won't display it here, but leave you to look at it at your convenience.
13. Mapping Keys
Speakup has the capability of allowing you to assign or "map" keys to
internal Speakup commands. This section necessarily assumes you have a
Linux kernel source tree installed, and that it has been patched and
configured with Speakup. How you do this is beyond the scope of this
manual. For this information, visit the Speakup web site at
http://linux-speakup.org/. The reason you'll need the kernel source
tree patched with Speakup is that the genmap utility you'll need for
processing keymaps is in the
/usr/src/linux-<version_number>/drivers/char/speakup directory. The
<version_number> in the above directory path is the version number of
the Linux source tree you are working with.
So ok, you've gone off and gotten your kernel source tree, and patched
and configured it. Now you can start manipulating keymaps.
You can either use the
/usr/src/linux-<version_number>/drivers/char/speakup/speakupmap.map file
included with the Speakup source, or you can cut and paste the copy in
section 4 into a separate file. If you use the one in the Speakup
source tree, make sure you make a backup of it before you start making
changes. You have been warned!
Suppose that you want to swap the key assignments for the Speakup
say_last_char and the Speakup say_first_char commands. The
speakupmap.map lists the key mappings for these two commands as follows:
spk key_pageup = say_first_char
spk key_pagedown = say_last_char
You can edit your copy of the speakupmap.map file and swap the command
names on the right side of the = (equals) sign. You did make a backup,
right? The new keymap lines would look like this:
spk key_pageup = say_last_char
spk key_pagedown = say_first_char
After you edit your copy of the speakupmap.map file, save it under a new
file name, perhaps newmap.map. Then exit your editor and return to the
shell prompt.
You are now ready to load your keymap with your swapped key assignments.
Assuming that you saved your new keymap as the file newmap.map, you
would load your keymap into the sys system like this:
/usr/src/linux-<version_number>/drivers/char/speakup/genmap newmap.map
>/speakup/keymap
Remember to substitute your kernel version number for the
<version_number> in the above command. Also note that although the
above command wrapped onto two lines in this document, you should type
it all on one line.
Your say first and say last characters should now be swapped. Pressing
speakup pagedown should read you the first non-whitespace character on
the line your reading cursor is in, and pressing speakup pageup should
read you the last character on the line your reading cursor is in.
You should note that these new mappings will only stay in effect until
you reboot, or until you load another keymap.
One final warning. If you try to load a partial map, you will quickly
find that all the mappings you didn't include in your file got deleted
from the working map. Be extremely careful, and always make a backup!
You have been warned!
14. Internationalizing Speakup
Speakup indicates various conditions to the user by speaking messages.
For instance, when you move to the left edge of the screen with the
review keys, Speakup says, "left."
Prior to version 3.1.0 of Speakup, all of these messages were in English,
and they could not be changed. If you used a non-English synthesizer,
you still heard English messages, such as "left" and "cursoring on."
In version 3.1.0 or higher, one may load translations for the various
messages via the /sys filesystem.
The directory /speakup/i18n contains several collections of messages.
Each group of messages is stored in its own file.
The following section lists all of these files, along with a brief description
of each.
14.1. Files Under the i18n Subdirectory
* announcements:
This file contains various general announcements, most of which cannot
be categorized. You will find messages such as "You killed Speakup",
"I'm alive", "leaving help", "parked", "unparked", and others.
You will also find the names of the screen edges and cursor tracking modes
here.
* characters:
See section 12 for a description of this file.
* chartab:
See section 12. Unlike the rest of the files in the i18n subdirectory,
this one does not contain messages to be spoken.
* colors: