XML technologies / CSS / Advanced websites with CSS / Miscellaneous CSS topics / Aural stylesheets
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
Sound is still used relatively rarely for communication on the web. Flash movies, video streams and podcasts show that audio content is increasingly gaining a key role. Opinions differ, however, on using sound files to improve navigation or interfaces, particularly for visually impaired users. In the future, speech, soundscapes and combinations of voice and music could make many websites more exciting and lively for everyone. The W3C has specified a range of acoustic properties that can be defined with CSS, producing an aural stylesheet.
Here is part of an aural stylesheet borrowed from the W3C website:
h1, h2, h3, h4, h5, h6 {
voice-family: paul;
stress: 20;
richness: 90;
cue-before: url(ping.au);
}
p.heidi {
azimuth: center-left;
}
p.peter {
azimuth: right;
}
p.ziege {
volume: x-soft;
}Let us examine this CSS fragment line by line.
All headings are spoken using a voice-family named paul. A voice-family is similar to a font-family: it consists of variations of a voice. We give spoken headings a relatively low value for the property stress of 20. This defines the voice’s “contour,” the gradual modulation differences in different parts of a sentence.
In the example, we set richness to the relatively high value 90. This property controls volume. Before a heading is spoken, we play a sound named ping.au. With cue-before or cue-after, we specify whether the signal comes before or after the audio section.
Every paragraph assigned to the class heidi is heard as coming slightly from the left of the vertical center. Paragraphs assigned to class peter are heard from the user’s right. All paragraphs with ziege are spoken particularly softly.
Aural stylesheets control the following characteristics of a spoken voice on your website:
volume
whether words are pronounced or spelled out
pauses
preceding or following audio cues
mixing, with two sounds played simultaneously
spatial positioning of sound in 3D
speaking rate
pitch and pitch range
the voice’s hurriedness
richness of the voice
handling punctuation: spoken aloud or used as pause cues
handling numbers: individual digits or numeric values
For a list of all properties controlling these factors, see CSS property reference.
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg
back to top