-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathspeechd-el.texi
2127 lines (1725 loc) · 72.7 KB
/
speechd-el.texi
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
\input texinfo @c -*-texinfo-*-
@comment %**start of header
@setfilename speechd-el.info
@set VERSION 2.12
@settitle speechd-el @value{VERSION}
@syncodeindex fn cp
@syncodeindex ky cp
@syncodeindex vr cp
@comment %**end of header
@copying
This manual is for speechd-el, @value{VERSION}.
Copyright @copyright{} 2012-2025 Milan Zamazal
Copyright @copyright{} 2003-2010 Brailcom, o.p.s.
@quotation
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, with no Front-Cover Texts and no Back-Cover Texts.
A copy of the license is included in the section entitled ``GNU Free
Documentation License.''
@end quotation
You can also (at your option) distribute this manual under the GNU
General Public License:
@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
A copy of the license is included in the section entitled ``GNU
General Public License''.
@end quotation
@end copying
@dircategory Emacs
@direntry
* speechd-el: (speechd-el). Emacs interface to Speech Dispatcher and BRLTTY.
@end direntry
@titlepage
@title speechd-el
@subtitle for version @value{VERSION}
@author Milan Zamazal
@author Brailcom, o.p.s.
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage
@contents
@ifnottex
@node Top, Introduction, (dir), (dir)
@top speechd-el
@insertcopying
@end ifnottex
@menu
* Introduction:: What is speechd-el and this manual about?
* speechd-el User Manual:: Using Emacs speech output.
* speechd-el Elisp Library:: Using speechd-el in Elisp programs.
* Contact Information:: Bug reporting etc.
* Copying This Manual:: GNU Free Documentation License.
* Index:: Concept, function, variable and key index.
@end menu
@c ****************************************************************************
@node Introduction, speechd-el User Manual, Top, Top
@chapter Introduction
speechd-el is an Emacs client to speech synthesizers, Braille displays
and other alternative output interfaces. It provides full speech and
Braille output environment for Emacs.
It is aimed primarily at visually impaired users who need non-visual
communication with Emacs, but it can be used by anybody who needs
sophisticated speech or other kind of alternative output from Emacs.
speechd-el can make Emacs a completely speech and BRLTTY enabled
application suitable for visually impaired users or, depending on its
configuration, it can only speak in certain situations or when asked,
to serve needs of any Emacs user.
Programming interfaces are available both to the user interface and
for communication with the output devices.
This manual describes the speech/Braille output user interface, how to
customize and extend the interface, and the Emacs Lisp libraries.
Some degree of familiarity with Speech Dispatcher or BRLTTY on the
user level is recommended, although not absolutely necessary.
@menu
* Design Goals::
* Feature List::
* Components::
@end menu
@node Design Goals, Feature List, Introduction, Introduction
@section Design Goals
speechd-el was designed considering our experience with other free
accessibility technologies. We sometimes meet problems such as lack
of maintenance power, duplicated efforts, making technology specific
solutions instead of generally useful tools, important bugs. As other
@uref{http://www.freebsoft.org/projects,Free(b)soft projects}
speechd-el attempts to fill in an empty space in the accessibility
area, in a way oriented towards future. speechd-el tries to offer
technology that is useful, simple, supporting general accessibility
architecture models and that effectively utilizes the limited
accessibility development resources.
The particular speechd-el design goals are:
@itemize @bullet
@item
Providing advanced accessible user environment that works out of the
box and utilizes standard Emacs features wherever possible. Emacs
accessibility should work as much as possible on the general level
without necessity to implement direct support for particular Emacs
packages. speechd-el should also preferably use standard Emacs
features if possible instead of implementing its own solutions.
@item
Implementing just the necessary functionality, without duplicating
features presented in other components such as Speech Dispatcher,
speech synthesizers or Braille APIs. Emacs accessibility solutions
should share features, configuration, code, etc. with other
applications to the highest possible extent in order to make life of
both users and developers easier.
@item
Simple and clean source code that requires only minimum maintenance
and allows future extensions.
@item
As little modifications to standard Emacs environment as possible,
with the possibility to make additional customizations if needed,
either shared or private. Emacs should work the same way whether it
speaks or not. Of course optional customizations can be made and the
generally useful ones should be included as optional parts of the
distribution.
@item
Ability to work well in a multilingual environment.
@item
Completely Free Software architecture, without requiring any
proprietary component.
@end itemize
@node Feature List, Components, Design Goals, Introduction
@section Feature List
Major speechd-el features are:
@cindex features
@itemize @bullet
@item
Speech output.
@item
Braille display output and input, mostly identical to the speech
output.
@item
Both automated and explicit reading. You can let Emacs read
everything and/or you can ask it to read some parts of the text (such
as current line, current buffer, last message, etc.).
@item
Message priorities ensuring you don't miss important messages while
you needn't listen to or view unimportant messages.
@item
``Intelligent'' and customizable selection of text to be read based on
lines, text properties, buffer contents changes and other criteria.
@item
Support for changing speech parameters (such as language, voice, rate,
pitch, volume, speech synthesizer). Different speech parameters can
be used in different buffers, major modes, faces, etc.
@item
Support for events (such as sound icons).
@item
Emacs status changes reporting (such as mode, keyboard, process
changes, etc.).
@item
Multilingual environment support. speechd-el works well with
languages other than English and offers support for current language
selection based on the kind of texts, selected keyboard, etc.
@item
Reasonable immediate speech and Braille output in most Emacs packages.
@item
No significant changes of the standard Emacs behavior.
@item
Speech and Braille output can be enabled/disabled independently to
each other and they can be enabled/disabled for the whole Emacs
session or just for particular buffers.
@item
Speech synthesizer independence, you can use all speech synthesizers
supported by Speech Dispatcher (such as Festival, Flite, eSpeak, Epos,
Dectalk, IBM TTS, Cicero, etc.) and you can use multiple speech
synthesizers inside a single Emacs session.
@item
Braille displays are handled through BRLTTY drivers and APIs.
@item
Programming libraries for those who want to extend speechd-el
facilities or who just want to talk to speech synthesizers, Braille
display or other output/input devices.
@item
Special features for speechd-el developers such as silence in
debugger, debugging variables, possibility to disable speechd-el
hooks, etc.
@item
Small code size.
@end itemize
See @uref{http://www.freebsoft.org/speechd-el,speechd-el web page} if
you are interested in comparison with Emacspeak.
@node Components, , Feature List, Introduction
@section Components
speechd-el design is strictly modular. It contains several components
layered each on top of other. Lower layer functions can be used
independently of higher level features.
@cindex SSIP
@cindex BrlAPI
The lowest level components are access libraries to output devices,
especially to SSIP (the Speech Dispatcher TCP communication protocol
for speech output) and BrlAPI (interface to BRLTTY drivers for
communication with Braille displays). They can be used to talk to the
output devices directly from Elisp programs.
The next level implements common access to all the devices. Instead
of talking to each device independently one can use this layer to
output device independent messages that are processed and sent to the
output devices as defined in the user configuration. This is the
preferred way of communication with the output devices.
On the highest level there is the user interface frontend that makes
Emacs read texts and events automatically, defines the corresponding
minor modes, key bindings and most of the interactive commands.
There are some other auxiliary components, look into speechd-el source
code if interested.
@c ****************************************************************************
@node speechd-el User Manual, speechd-el Elisp Library, Introduction, Top
@chapter speechd-el User Manual
speechd-el allows you to use Emacs without looking at screen, with
speech or Braille output only. The main usage area is by blind and
visually impaired people, but generally you can use at least the
speech output for many purposes, according to your wishes and needs.
You can download the latest released version of speechd-el from
@url{http://www.freebsoft.org/pub/projects/speechd-el/}.
speechd-el uses Speech Dispatcher for the speech output, so working
Speech Dispatcher installation is necessary to produce any speech
output. Please look at @url{http://www.freebsoft.org/speechd} for
more information about Speech Dispatcher.
@cindex BRLTTY
For the Braille output BRLTTY is used through its BrlAPI interface.
To make the Braille output work, BRLTTY must be running and properly
configured. Please look at @url{http://www.mielke.cc/brltty/} for
more information about BRLTTY.
@menu
* Installation:: Installing speechd-el.
* Starting Alternative Output:: Making it speak etc.
* Commands:: Usage.
* Customization:: Basic customization.
* Advanced Customization:: Writing your own command feedbacks.
* Problems:: Strange behavior.
* Tips:: Useful Emacs tips.
* Bug Reporting:: speechd-el and Speech Dispatcher bugs.
@end menu
@node Installation, Starting Alternative Output, speechd-el User Manual, speechd-el User Manual
@section Installation
speechd-el installation consists of the following steps:
@enumerate
@item
If you use Emacs older than 23.2 then install the @samp{eieio} Elisp
library, available from @url{http://cedet.sourceforge.net/eieio.shtml}
or perhaps your favorite operating system distribution.
@item
Copy the speechd-el @file{*.el} files contained in the distribution
package somewhere to your Emacs load path.
@item
If you like, byte compile the @file{*.el} files. Byte compilation is
recommended, because it speeds up speechd-el significantly. You can
byte compile the @file{*.el} files using the command
@example
make compile
@end example
Then install the compiled files to an Emacs load path location as
well.
@item
Install the @file{speechd-log-extractor} somewhere to your shell PATH,
e.g. @file{/usr/local/bin/}. Installing this script is optional, it
is used only for bug reporting.
@item
Add the following line to your @file{~/.emacs}:
@lisp
(autoload 'speechd-speak "speechd-speak" nil t)
@end lisp
@end enumerate
@cindex Speech Dispatcher
To receive speech output, Speech Dispatcher must be installed and
running. Speech Dispatcher version 0.5 or higher is recommended.
@cindex BRLTTY
To receive Braille output, BRLTTY must be installed and running.
BRLTTY version 3.7 or higher is required.
@node Starting Alternative Output, Commands, Installation, speechd-el User Manual
@section Starting Speech and Braille Output
After installation of the @file{*.el} files and restarting Emacs, you
can set up speechd-speak using the @kbd{M-x speechd-speak} command.
If you want to happen it automatically each time Emacs is started, put
the following line to your @file{~/.emacs} after the autoload line:
@lisp
(speechd-speak)
@end lisp
@table @kbd
@item M-x speechd-speak
@findex speechd-speak
@kindex C-e C-s
Set up Emacs for alternative output and start speaking or
communicating with the Braille display.
Please don't forget Speech Dispatcher must be running in order to get
any speech output and BRLTTY must be running in order to get Braille
output!
After the initial setup, the command can be used again to restart the
speech or Braille output when needed. Especially, you must run it
again if Speech Dispatcher or BRLTTY gets restarted.
After the first invocation, the command is available under the
@kbd{C-e C-s} key.
@end table
@cindex minor modes
Once the setup is done, enabling and disabling the alternative output
is controlled by the speechd-speak and global-speechd-speak minor
modes. Usually the mode commands are not used directly, you use the
@code{speechd-speak-toggle-speaking} command (@pxref{Control
Commands}), but if you need them, they are available.
@table @kbd
@item M-x speechd-speak-mode
@findex speechd-speak-mode
Enable or disable speaking and Braille output in the current buffer.
With no argument, this command toggles the mode. Non-null prefix
argument turns on the mode. Null prefix argument turns off the mode.
@item M-x global-speechd-speak-mode
@findex global-speechd-speak-mode
Enable or disable alternative output globally. With no argument, this
command toggles the mode. With prefix argument, turn alternative
output on if and only if the argument is positive.
@end table
@node Commands, Customization, Starting Alternative Output, speechd-el User Manual
@section Commands
The basic speechd-el commands are all accessible through a common
special prefix key, which is @kbd{C-e} by default (you can change it,
@pxref{Customization}). If this prefix conflicts with a global Emacs
command, the original command is available by double pressing the
prefix key. For instance, with the default prefix, the
@code{end-of-line} command, normally available under the @kbd{C-e}
key, can be invoked as @kbd{C-e C-e}.
In the following subsections we use the term @emph{reading} to
indicate any kind of output enabled in speechd-el (such as speaking or
Braille output).
@menu
* Reading Commands:: Reading pieces of text.
* Informatory Commands:: Information about buffer, modes, etc.
* Control Commands:: Stopping, setting speech rate, etc.
* Parameter Setting Commands:: Modifying speech output.
* Spelling:: How to spell a piece of text.
* Other Commands:: Auxiliary commands.
@end menu
@node Reading Commands, Informatory Commands, Commands, Commands
@subsection Reading Commands
@table @kbd
@item C-e l
@kindex C-e l
@cindex truncate-lines
@findex speechd-speak-read-line
Read current line (@code{speechd-speak-read-line}). With the prefix
argument, read the line only from the current cursor position to the
end of line. If @code{truncate-lines} is @code{nil}, read the line
only to its visual end.
@item C-e b
@kindex C-e b
@findex speechd-speak-read-buffer
Read current buffer (@code{speechd-speak-read-buffer}).
@item C-e >
@kindex C-e >
@findex speechd-speak-read-rest-of-buffer
Read current buffer from the cursor to the buffer end
(@code{speechd-speak-read-rest-of-buffer}).
@item C-e o
@kindex C-e o
@findex speechd-speak-read-other-window
Read buffer of the other window, if any is present
(@code{speechd-speak-read-other-window}).
@item C-e r
@kindex C-e r
@findex speechd-speak-read-region
Read current region (@code{speechd-speak-read-region}).
@item C-e C-r
@kindex C-e C-r
@findex speechd-speak-read-rectangle
Read text in the rectangle-region (@code{speechd-speak-read-rectangle}).
@item C-e w
@kindex C-e w
@findex speechd-speak-read-word
Read the next word after cursor (@code{speechd-speak-read-word}).
@item C-e .
@kindex C-e .
@findex speechd-speak-read-sentence
Read current sentence (@code{speechd-speak-read-sentence}).
@item C-e @{
@kindex C-e @{
@findex speechd-speak-read-paragraph
Read the next paragraph after cursor (@code{speechd-speak-read-paragraph}).
@item C-e [
@kindex C-e [
@findex speechd-speak-read-page
Read the next page after cursor (@code{speechd-speak-read-page}).
@item C-e '
@kindex C-e '
@findex speechd-speak-read-sexp
Read the next symbolic expression after cursor
(@code{speechd-speak-read-sexp}).
@item C-e c
@kindex C-e c
@findex speechd-speak-read-char
Read the character at the cursor position (@code{speechd-speak-read-char}).
@item C-e C-n
@kindex C-e C-n
@findex speechd-speak-read-next-line
Read the next line (@code{speechd-speak-read-next-line}).
@item C-e C-p
@kindex C-e C-p
@findex speechd-speak-read-previous-line
Read the previous line (@code{speechd-speak-read-previous-line}).
@item C-e m
@kindex C-e m
@findex speechd-speak-last-message
Read last seen Emacs message (@code{speechd-speak-last-message}).
@item C-e RET
@cindex mode line
@kindex C-e RET
@findex speechd-speak-read-mode-line
Read the mode line (@code{speechd-speak-read-mode-line}). Note: This
command works only in Emacs@tie{}22 or higher.
@item C-e i
@kindex C-e i
@findex speechd-speak-last-insertions
Read last output buffer insertions
(@code{speechd-speak-last-insertions}). That is the text read in
auto-reading buffers, see @xref{Auto-Reading Buffers}.
@end table
@cindex character reading prompts
@cindex read-char
A few Emacs commands get you stuck in a character reading prompt, a
typical example is @code{ispell-word}. If you miss what was read
before you are prompted for action, you can use the following
keystrokes at the prompt to repeat the output texts:
@table @kbd
@item C-e
@findex speechd-speak-last-message
The same as the @kbd{C-e m} command above
(@code{speechd-speak-last-message}).
@item C-a
@findex speechd-speak-last-insertions
The same as the @kbd{C-e i} command above
(@code{speechd-speak-last-insertions}).
@end table
If you don't like such character reading prompt behavior, you can
disable it using the following variable:
@vtable @code
@item speechd-speak-allow-prompt-commands
If non-@code{nil}, allow the speechd-speak commands mentioned above in
read-char prompts.
@end vtable
@node Informatory Commands, Control Commands, Reading Commands, Commands
@subsection Informatory Commands
@table @kbd
@item C-e C-i b
@findex speechd-speak-buffer-info
@cindex buffer
Read information about current buffer
(@code{speechd-speak-buffer-info}).
@item C-e C-i f
@findex speechd-speak-frame-info
@cindex frame
Read information about current frame (@code{speechd-speak-frame-info}).
@item C-e C-i h
@findex speechd-speak-header-line-info
@cindex header line
Read contents of the header line
(@code{speechd-speak-header-line-info}). Note: This command works
only in Emacs@tie{}22 or higher.
@item C-e C-i m
@findex speechd-speak-mode-info
@cindex modes
Read information about current major and minor modes
(@code{speechd-speak-mode-info}).
@item C-e C-i c
@findex speechd-speak-coding-info
@cindex coding systems
Read information about current coding systems
(@code{speechd-speak-coding-info}).
@item C-e C-i i
@findex speechd-speak-input-method-info
@cindex input method
Read information about current input method
(@code{speechd-speak-input-method-info}).
@item C-e C-i p
@findex speechd-speak-process-info
@cindex process
Read status of the process associated with the current buffer
(@code{speechd-speak-process-info}).
@end table
@node Control Commands, Parameter Setting Commands, Informatory Commands, Commands
@subsection Control Commands
@table @kbd
@item C-e q
@kindex C-e q
@findex speechd-speak-toggle-speaking
@cindex shutting up
Toggle reading globally (@code{speechd-speak-toggle-speaking}). With
a prefix argument, toggle it in the current buffer only.
@item C-e s
@kindex C-e s
@findex speechd-stop
@cindex stop
Stop reading current message (@code{speechd-stop}). Other queued
messages will still be read. If the prefix argument is given, stop
reading the current message of any client, not just of the current
connection.
@item C-e x
@kindex C-e x
@findex speechd-cancel
@cindex stop
Stop reading all the queued messages of the current connection and of
the connections listed in @var{speechd-cancelable-connections}. If
the universal prefix argument is given, stop reading all the messages
of all connections. If a numeric prefix argument is given, stop all
the messages of the current Emacs session.
@item C-e p
@kindex C-e p
@findex speechd-pause
@cindex pause
Pause reading --- just be quiet for now and postpone current reading
until the resume command is invoked (@code{speechd-pause}). If the
prefix argument is given, pause reading of all clients.
@item C-e SPC
@kindex C-e SPC
@findex speechd-resume
@cindex resume
Resume paused reading (@code{speechd-resume}). If the
prefix argument is given, resume reading of all clients.
@item C-e 1
@itemx C-e 2
@itemx C-e 3
@itemx C-e 4
@itemx C-e 5
@itemx C-e 6
@itemx C-e 7
@itemx C-e 8
@itemx C-e 9
@kindex C-e 1
@kindex C-e 2
@kindex C-e 3
@kindex C-e 4
@kindex C-e 5
@kindex C-e 6
@kindex C-e 7
@kindex C-e 8
@kindex C-e 9
@findex speechd-speak-key-set-predefined-rate
@cindex rate
Set one of the predefined speech rates
(@code{speechd-speak-key-set-predefined-rate}). @kbd{C-e 1} sets the
slowest rate, @kbd{C-e 5} sets the medium rate, and @kbd{C-e 9} sets
the fastest rate.
@end table
@node Parameter Setting Commands, Spelling, Control Commands, Commands
@subsection Parameter Setting Commands
@cindex parameters
These commands set various properties of the speech output. They all
apply on the current Speech Dispatcher connection (for more
information about Speech Dispatcher connections, @pxref{Connection
Voices}), unless there are invoked with a prefix argument. With a
numeric prefix argument they apply on all speechd-el connections, with
a universal prefix argument they apply on all Speech Dispatcher
connections.
Commands affecting basic parameters of the text-to-speech process:
@table @kbd
@item C-e d l
@kindex C-e d l
@findex speechd-speak-set-language
@cindex language
Set default language of the connection. Specify it as an RFC 1766
language code (e.g. @code{en}, @code{cs}, etc.).
@item C-e d .
@kindex C-e d .
@findex speechd-set-punctuation-mode
@cindex punctuation mode
Specify how to handle punctuation, whether to read it or ignore it.
@code{all} mode reads all punctuation characters, @code{none} mode
skips them all quietly, and @code{some} mode reads a selected subset
of punctuation characters specified in the Speech Dispatcher
configuration.
@item C-e d c
@kindex C-e d c
@findex speechd-set-capital-character-mode
@cindex capital character mode
Set capital letter indication mode. @code{icon} means signal them
with a sound icon, @code{spell} means spell them using a special
spelling table, and @code{none} means no indication.
@end table
Commands affecting speech output properties:
@table @kbd
@item C-e d v
@kindex C-e d v
@findex speechd-set-voice
@cindex voice
Set default voice to be used by the synthesizer
(@code{speechd-set-voice}). You may select one from the voice set
offered by your Speech Dispatcher installation.
@item C-e d C-v
@kindex C-e d C-v
@findex speechd-set-synthesizer-voice
@cindex voice
Set default voice to be used by the synthesizer directly by its
synthesizer dependent name (@code{speechd-set-synthesizer-voice}).
You may select one from the voice set offered by the currently
selected Speech Dispatcher output module. This works only with Speech
Dispatcher 0.6.3 or higher and not all Speech Dispatcher output
modules support this function.
@item C-e d r
@kindex C-e d r
@findex speechd-set-rate
@cindex rate
Set exact speech rate, ranging from -100 (slowest) to 100 (fastest)
(@code{speechd-set-rate}). Most often you will probably want to
use the @code{speechd-speak-key-set-predefined-rate} command bound to
@kbd{C-e @var{number}} instead, see @ref{Control Commands}.
@item C-e d p
@kindex C-e d p
@findex speechd-set-pitch
@cindex pitch
Set voice pitch, ranging from -100 (lowest) to 100 (highest)
(@code{speechd-set-pitch}).
@item C-e d V
@kindex C-e d V
@findex speechd-set-volume
@cindex volume
Set voice volume, ranging from -100 (lowest) to 100 (highest)
(@code{speechd-set-volume}).
@end table
Commands affecting the speech synthesizer:
@table @kbd
@item C-e d o
@kindex C-e d o
@findex speechd-set-output-module
@cindex output module
Switch Speech Dispatcher to the given output module
(@code{speechd-set-output-module}). Give the module name when
you are prompted for the argument.
@end table
@node Spelling, Other Commands, Parameter Setting Commands, Commands
@subsection Spelling
@cindex spelling
@cindex speechd-speak-spell-mode
There are two ways to use spelling in speechd-el. The first one is
the @code{speechd-speak-spell-mode}, which is a minor mode that you
can enable for a buffer. The mode is useful if you want to spell more
of the buffer contents.
The second spelling method is using the following command:
@table @kbd
@item C-e C-l
@kindex C-e C-l
@findex speechd-speak-spell
Cause the following command to spell the text it reads
(@code{speechd-speak-spell}). For instance, if you want to spell the
word after the cursor, you can type @kbd{C-e C-l C-e w}.
@end table
@node Other Commands, , Spelling, Commands
@subsection Other Commands
@kindex C-x C-c
In case Emacs gets completely crazy and refuses to run commands
including @kbd{C-x C-c} because of a bug in speechd-el or in an
alternative output related custom definition, you can try to invoke
the following command as the last resort:
@table @kbd
@item C-e C-x
@kindex C-e C-x
@findex speechd-unspeak
@cindex recovery
Try to disable all modes, hooks and wrappers installed by
@code{speechd-speak} (@code{speechd-unspeak}).
@end table
The following commands are rarely used, mostly for diagnosing
purposes:
@table @kbd
@item C-e z
@kindex C-e z
@findex speechd-repeat
Repeat the last output text
(@code{speechd-repeat}).
@item M-x speechd-say-text
@findex speechd-say-text
Prompt for a text and read it.
@end table
@node Customization, Advanced Customization, Commands, speechd-el User Manual
@section Customization
All the customization options described below are accessible in the
customization group @samp{speechd-el} and its subgroups.
@menu
* Driver Selection:: Choosing output devices.
* Connection Setup:: Where to connect to.
* Default Priorities:: Priorities of various kinds of messages.
* Basic Speaking:: Simple options.
* Auto-Reading Buffers:: Making certain buffers speak automatically.
* Reading State:: Speaking Emacs state changes.
* Signalling:: Signalling empty lines, etc.
* Text Properties:: Handling faces and special pieces of text.
* Index marking:: Moving cursor when speaking.
* Languages:: Using multiple languages.
* Voices:: Defining different voices.
* Connection Voices:: Setting connection parameters.
* Multiple Connections:: Different parameters for some modes & buffers.
* Keys:: Customizing command keys.
* Braille Display Keys:: Binding actions to Braille display keys.
* Modes:: Minor mode hooks.
* Debugging:: Make debugger quiet.
@end menu
@node Driver Selection, Connection Setup, Customization, Customization
@subsection Selecting Drivers
By default speechd-el speaks to @code{ssip} and @code{brltty}
drivers. You can change the set of active drivers by customizing the
following variable:
@vtable @code
@item speechd-out-active-drivers
List of names of active output drivers.
@end vtable
If a driver that does not work is present in the variable (e.g. the
list contains the @code{brltty} symbol while BRLTTY is not actually
running), you receive an error message. To prevent the error message,
remove the driver from this variable.
When you want to enable or disable some driver temporarily, you can
use the following commands:
@ftable @kbd
@item M-x speechd-out-enable-driver
@findex speechd-out-enable-driver
Enable the given output driver.
@item M-x speechd-out-disable-driver
@findex speechd-out-disable-driver
Disable the given output driver.
@end ftable
@node Connection Setup, Default Priorities, Driver Selection, Customization
@subsection Speech Dispatcher Connection Configuration
Connection configuration variables allow you connect to Speech
Dispatcher or BRLTTY running on a remote host or a non-default port
and to specify other TCP connection parameters.
Speech Dispatcher connection options:
@vtable @code
@item speechd-connection-method
Connection method to Speech Dispatcher. Possible values are symbols
@code{unix-socket} for Unix domain sockets and @code{inet-socket} for
Internet sockets on a given host and port. Default is either as
specified in @code{SPEECHD_ADDRESS} environment variable if set, or
@code{unix-socket}.
@item speechd-host
@cindex host
Name of the host running Speech Dispatcher to connect to, given as a
string. Default is either as specified in @code{SPEECHD_ADDRESS}
environment variable variable if set, or @code{"localhost"}. Value of
this variable matters only when Internet sockets are used for
communication with Speech Dispatcher.
@item speechd-port
@cindex port
Port number to connect to. Default is either as specified in
@code{SPEECHD_ADDRESS} environment variable if set, or the default
Speech Dispatcher port. Value of this variable matters only when
Internet sockets are used for communication with Speech Dispatcher.
@item speechd-socket-name
@cindex socket
Name of the Unix domain socket to connect to. Default is either as
specified in @code{SPEECHD_ADDRESS} environment variable if set, or the
default Speech Dispatcher socket. Value of this variable matters only
when Unix domain sockets are used for communication with Speech
Dispatcher.
@item speechd-autospawn
If non-@code{nil}, Emacs will attempt to automatically start Speech
Dispatcher. This means that if speechd-el gets a speech request and
the Speech Dispatcher server is not running already, speechd-el will
launch it.
@item speechd-timeout
@cindex timeout
Maximum number of seconds to wait for a Speech Dispatcher answer. If
it is exceeded, speechd-el closes the connection. Normally, Speech
Dispatcher should answer protocol commands immediately, but if you
talk to a Speech Dispatcher in a strange way through a lagging
network, you may want to increase the limit.
@end vtable
BRLTTY connection options:
@vtable @code
@item brltty-default-host
Name of the host running BRLTTY to connect to, given as a string.
Default is @code{"localhost"}.
@item brltty-default-port
Port number to connect to. It can be either a single number or a list
of numbers; in the latter case the given port numbers are attempted in
the order they are given until Emacs connects to something. Default
is the list of the standard BrlAPI ports.
@item brltty-authentication-file
File containing the BrlAPI authentication key. It is important to set
the variable properly, otherwise the connection to BRLTTY gets
rejected. Default is @code{"/etc/brlapi.key"}.
@item brltty-coding
Coding in which texts should be sent to BRLTTY. Default is
@code{iso-8859-1}; if you use non-Western language, you may need to
change it to display its characters correctly on the Braille display.
@item brltty-tty
Number of the Linux console on which speechd-el runs. If this value
is not set correctly, speechd-el may not interact well with other
applications communicating with BRLTTY. speechd-el tries to find the
correct value itself, if this doesn't work, set this variable properly
or set the @code{CONTROLVT} environment variable.
@item brltty-timeout
Maximum number of seconds to wait for a BRLTTY answer. If it is
exceeded, speechd-el closes the connection. Normally, BRLTTY should
answer protocol commands immediately, but if you talk to BrlAPI in a
strange way through a lagging network, you may want to increase the
limit.
@end vtable
@node Default Priorities, Basic Speaking, Connection Setup, Customization
@subsection Default Priorities
@cindex priorities
If a speechd-el function sends a message to the output device without
an explicitly specified priority, the priorities defined by the
following variables are used. By changing the values, you can achieve
interesting effects. For instance, changing the value of
@code{speechd-default-key-priority} from @code{notification} to
@code{message} makes all typed characters to be echoed and makes them
to interrupt common text reading.
The valid values of all the variables here are: @code{important},
@code{message}, @code{text}, @code{notification}, @code{progress}.
They correspond to Speech Dispatcher priorities, see the Speech
Dispatcher manual for more details.
@vtable @code
@item speechd-default-text-priority
Default priority of most text messages.
@item speechd-default-sound-priority
Default priority of sound icons.
@item speechd-default-char-priority
Default priority of spelled characters.