Next: , Previous: , Up: Emacspeak Commands And Options   [Contents][Index]


12.234 voice-setup

A voice is to audio as a font is to a visual display. A personality is to audio as a face is to a visual display.

Voice-lock-mode is a minor mode that causes your comments to be spoken in one personality, strings in another, reserved words in another, documentation strings in another, and so on.

Comments will be spoken in ‘voice-comment-personality’. Strings will be spoken in ‘voice-string-personality’. Function (in their defining forms) will be spoken in ‘voice-function-name-personality’. Reserved words will be spoken in ‘voice-keyword-personality’.

To audio-format text , use M-x voice-lock-mode. When this minor mode is on, the voices of the current line are updated with every insertion or deletion.

12.234.1 Voice-Lock And Aural CSS

The CSS Speech Style Sheet specification defines a number of abstract device independent voice properties. A setting conforming to the CSS speech specification can be represented in elisp as a structure.

We will refer to this structure as a "speech style". This structure needs to be mapped to device dependent codes to produce the desired effect. This module forms a bridge between emacs packages that wish to implement audio formatting and Emacspeak’s TTS module. Emacspeak produces voice change effects by examining the value of text-property ’personality’, as well as the face/font at point.

Think of a buffer of formatted text along with the text-property ’personality appropriately set as a "aural display list". Module voice-setup.el help applications like EWW produce audio-formatted output by calling function voice-acss-from-speech-style with a "speech-style" –a structure as defined in this module and get back a symbol that they assign to the value of property ’personality. Emacspeak’s rendering engine then does the needful at the time speech is produced. Function voice-acss-from-speech-style does the following: Takes as input a "speech style" (1) Computes a symbol that will be used to refer to this specific speech style. (2) Examines emacspeak’s internal voice table to see if this speech style has a voice already defined. If so it returns immediately. Otherwise, it does the additional work of defining a -voice for future use. See its use in this module to see how voices are defined independent of a given TTS engine. How faces map to voices: TTS engine specific modules e.g., dectalk-voices.el and outloud-voices.el map ACSS dimensions to engine-specific codes. Emacspeak modules use voice-setup-add-map when defining face->personality mappings. For use from other modules.

12.234.2 Voice-Setup Commands

12.234.2.1 voice-lock-mode

Command: voice-lock-mode (&optional arg)
C-e d v
<fn> d v
Toggle voice lock mode.

This is a minor mode.  If called interactively, toggle the
‘Voice-Lock mode’ mode.  If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is ‘toggle’.  Enable
the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer,
evaluate ‘voice-lock-mode’.

The mode’s hook is called both when the mode is enabled and when
it is disabled.

(fn &optional ARG)

12.234.2.2 voice-lock-mode–turn-on

Command: voice-lock-mode--turn-on
Turn on Voice Lock mode .

12.234.2.3 voice-setup-toggle-silence-personality

Command: voice-setup-toggle-silence-personality
C-e M-q
<fn> M-q
Toggle audibility of personality under point  . 

12.234.3 voice-setup Options

Variable: User Option voice-lock-mode-hook

Hook run after entering or leaving ‘voice-lock-mode’. No problems result if this variable is not bound. ‘add-hook’ automatically binds it. (This is true for all hook variables.)

Default Value: (voice-lock-mode-set-explicitly)


Next: xbacklight, Previous: voice-defs, Up: Emacspeak Commands And Options   [Contents][Index]