2.274 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’.

Legacy Voice Lock modes are provided by ‘emacsvox-aural-compatibility-voice’. This module retains ACSS, face mapping, and local compatibility-provider machinery. When this minor mode is on, the voices of the current line are updated with every insertion or deletion.

2.274.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 Emacsvox’s TTS module. Emacsvox 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-from-acss 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. Emacsvox’s rendering engine then does the needful at the time speech is produced. Function voice-from-acss 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 emacsvox’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. Emacsvox modules use voice-setup-add-map when defining face->personality mappings. For use from other modules.

2.274.2 Voice-Setup Commands

2.274.2.1 voice-setup-toggle-silence-personality

Command: voice-setup-toggle-silence-personality
Toggle local audibility of the personality or mapped face at point.