[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]

Emacspeak: An Overview Of Voice-Lock Over The Years



http://tvraman.github.io/emacspeak/blog/voice-lock-refreshed.html

Emacspeak: An Overview Of Voice-Lock Over The Years

1 Executive Summary

Audio formatted output is provided via voice-lock in Emacspeak. The feature was
originally implemented in 1994 and significantly overhauled in 2002 (with no
change in functionality). Now, in 2015, the implementation has been reworked to
be once again simpler — but with the same functionality. 

2 1994: Original Implementation

Font-lock was a new feature in Emacs 19 — it was introduced right around the
time the Emacspeak project was started. At the time, there were multiple
font-lock packages in Emacs. Emacspeak implemented voice-lock via a stand-alone
module that attached property personality to buffer contents. The dtk-speak
Text-To-Speech module treated strings annotated with property personality as an
aural display list when producing spoken output. 

In the winter of 1995, I implemented Aural CSS in emacspeak, and this resulted
in module acss.el — that module provides a clean abstraction for defining values
that can be assigned to property personality. Next, the rest of emacspeak was
overhauled to express all voice-lock features via the ACSS abstraction. 

3 2002 Overhaul

With feature font-lock now mature, Emacs itself converged on a single font-lock
module with jit-lock.el providing just-in-time font locking. This meant that
Emacspeak's voice-lock feature could now be more easily implemented by attaching
appropriate advice to lisp functions put-text-property and friends — this led to
the deletion of module voice-lock.el and the creation of module
emacspeak-personality.el. 

That module provided multiple options for how faces were mapped to
personalities: 

* Cumulative where property personality was either appended or prepended to the
 list of personalities at any given position. 
* Simple: where the new personality directly replaced any previously applied
 personality property. 
* None: Where faces were not mapped to personalities. 

4 2015 Overhaul

And now, in 2015, the code in module dtk-speak.el that implements
audio-formatting has been overhauled to directly map faces to personalities.
This implementation can be enabled by setting the option
emacspeak-personality-voiceify-faces provided in module emacspeak-personality.el
to none. This means that the new implementation can co-exist (at least for a
while) with the earlier advice-based implementation from module
emacspeak-personality.el. 

once deemed to be stable, the new implementation will become the default — by
changing the default value of emacspeak-personality-voiceify-faces to none. 

5 Summary

 From an end-user's perspective, nothing has changed in 21 years. From the
perspective of implementing voice-lock for Emacs modules, nothing has changed —
all that an Emacspeak extension for a specific package needs to do to enable
voice-lock is to set up a face->personality mapping as before via function
voice-setup-add-map. Note that property personality will continue to have higher
precedence than property face with respect to the audio formatting that gets
applied i.e. Emacspeak first consults value of property personality, and if that
is not set, but there is a face property set, then that face->personality
mapping (if defined) is used as the aural style. 

Date: <2015-08-18 Tue>

Author: T.V Raman

Created: 2015-08-18 Tue 15:26

Validate

aaa

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help".




|All Past Years |Current Year|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page