Chapter 3
AFL: Audio Formatting Language

In Chapter 2, we described the internal representations used to capture document structure and content. This internal representation is rendered in audio by applying audio rendering rules written in AFL, a language for audio formatting.

AFL can be viewed as the audio analogue of visual formatting languages like Postscript. Postscript provides primitives to write visual rendering rules; AFL provides the corresponding audio rendering primitives. A set of rendering rules written in AFL manipulate the audio formatter: the logical device that controls the (possibly) multiple components (e.g., speech and sound) of the audio system.

The audio formatter has state. The kind of voice used, the speed of speech, the pitch of the voice, the type of sounds generated, etc. are all determined by the current state of the formatter. AFL, a block structured language, captures this state in an AFL program variable, and AFL statements manipulate this state. This chapter describes AFL, which has been implemented as an extension to Common Lisp. Thus, the AFL programmer can use all the standard constructs provided by Lisp.

Section 3.1, gives an overview of AFL and the design issues that have been addressed. Section 3.2 presents AFL in its most important setting, as a language capable of controlling a single component —a speech synthesizer. Section 3.3 describes how AFL handles an audio formatter with multiple components. Section 3.4 describes AFL in the context of non-speech audio, and Section 3.5 describes the pronunciation component of our present system. Section 3.6 provides some concluding remarks. Appendix A.3 documents the various AFL statements.

 3.1 Overview
 3.2 The Speech Component
  The AFL Block
  Dimensions for the MultiVoice
  AFL Statements
  AFL Expressions
  Summary of the Speech Component
  Using Common Lisp
 3.3 Combining Different Spaces in AFL
  States in AFL
  Tracking Busy Components
 3.4 Audio Formatting using Non-Speech Audio
  Space of Sound Cues
  Types of Operators
  Examples of Use
  Implementation Details
 3.5 The Pronunciation Component
  Example of Use
 3.6 Some Concluding Remarks on AFL
  The Simplicity of the AFL Block
  External and Internal Direct Sums
  Benefits of AFL