CSS Aural Media - CSS Advanced

What is Aural Media?

Now a days, a web document can be enhanced by a speech synthesizer.

We can assume that in near future level , CSS will have new values and properties defined for speech output.

This syntax means that a style sheet such as

is valid, but it does not mean by CSS 2.1, while

is against, but defined by this appendix.

Below listed are the frequently used documentations.

  • Intention to learn
  • Training program
  • For Web accessing in vehicles
  • For Home entertainment
  • Intent of Preparation of Industrial documentation
  • Intent of Preparation of Medical documentation

The CSS properties also lets one to vary the quality of synthesized speech (voice type, frequency, inflection, etc.)

Below is an example –

properties

This will redirect the speech synthesizer to speak headers in a voice (a type of audio font) called "paul", on a flat tone, but in a very authorized/rich voice. Before speaking the headers, a sound sample will be played from the given URL.

Now, let us see the different properties related to this aural media.

  • Where the sound should come horizontally is set by the azimuth property.
  • Where the sound should come vertically is set by the elevation property.
  • The cue-after property states which sound to be played after speaking an element's content to delimit it from others.
  • The cue-before property states which sound to be played before speaking an element's content to delimit it from others.
  • The cue is a shorthand for setting cue-before and cue-after.
  • The pause-after property states where a pause to be observed after speaking an element's content.
  • The pause-before specifies a pause to be observed before speaking an element's content.
  • The pause property is a shorthand for setting pause-before and pause-after.
  • The average pitch (frequency) of the speaking voice is specified by the pitch property.
  • The pitch-range states what should be the variation in average pitch.
  • The play-during states which sound should be played as a background voice while an element's content is being spoken.
  • The richness states the contrastness, richness of the voice spoken.
  • The speakvoice-family specifies the first concerns the list of voice family names.
  • The median volume of the voice is mentioned by the volume.

What is the azimuth Property?

The azimuth property sets where the sound should come from horizontally. The most possible values are listed below −

  • angle – A Position is described in terms of an angle within the range of 360degrees to 360degrees. The value 0degrees means directly ahead in the center of the sound stage. 90degrees is to the right, 180degrees behind, and 270degrees (or, equivalently and more conveniently, -90deg) to the left.
  • left-side – It is Same as '270degrees'. With 'behind', '270degrees'.
  • far-left – It is Same as '300degrees'. With 'behind', '240degrees'.
  • left – It is Same as '320degrees'. With 'behind', '220degrees'.
  • center-left – It is Same as '340degrees'. With 'behind', '200degrees'.
  • center − It is Same as '0degrees'. With 'behind', '180degrees'.
  • center-right – It is Same as '20degrees'. With 'behind', '160degrees'.
  • right – It is Same as '40degrees'. With 'behind', '140degrees'.
  • far-right – It is Same as '60degrees'. With 'behind', '120degrees'.
  • right-side – It is Same as '90degrees'. With 'behind', '90degrees'.
  • leftwards – This Moves the sound to the left and relative to the current angle. More specifically, it subtracts 20 degrees.
  • rightwards – It Moves the sound to the right, relative to the current angle. More specifically, adds 20 degrees.

Value:

<angle>[[ left-side far-left left center-left center center-right right far-right right-side ] behind ] leftwards rightwards inherit

Initial:

center

Applies to:

all elements

Inherited:

yes

Percentages:

N/A

Media:

aural

Computedvalue:

normalized angle

•if 90deg < x <= 180deg then x := 180deg - x

•if 180deg < x <= 270deg then x := 540deg - x

Below is an example −

What is the elevation Property?

The elevation property sets where the sound should come from vertically. The most possible values are as follows –

Value:

<angle> below level above higher lower inherit

Initial:

level

Applies to:

all elements

Inherited:

yes

Percentages:

N/A

Media:

aural

  • angle − This Specifies the elevation as an angle, between -90degrees and 90degrees. 0degrees means on the forward horizon, which loosely means level with the listener. 90degrees means directly overhead and -90degrees means directly below.
  • below – It is Same as '-90degrees'.
  • level – It is Same as '0degrees'.
  • above – It is Same as '90degrees'.
  • higher – It Adds 10 degrees to the current elevation.
  • lower − It Subtracts 10 degrees from the current elevation.

Here is an example –

What is the cue-after Property?

The cue-after property defines which sound to be played after speaking an element's content to delimit it from other. The most possible values include −

  • url – It defines the URL of a sound file to be played.
  • none –It means nothing has to be played.

Value:

<uri> none inherit

Initial:

None

Applies to:

all elements

Inherited:

no

Percentages:

N/A

Media:

aural

Computedvalue:

absolute URI or 'none'

Here is an example –

What is the cue-before Property?

The Cue-before property defines a sound to be played before speaking an element's content to delimit it from other.

Value:

<number> inherit

Initial:

none

Applies to:

all elements

Inherited:

no

Percentages:

N/A

Media:

aural

Computedvalue:

absolute URI or 'none

The most possible values are −

  • url –This defines which URL of a sound file to be played.
  • none − Nothing has to be played.

Here is an example –

What is the cue Property?

The cue property is better explained in the below table. It is a shorthand for allocating both cue-before and cue-after properties. If two values are given, the first value will be cue-before and the second is going to be cue-after. If only one value is given, it applies for both the properties.

Value:

[ <'cue before'> <'cue after'>] inherit

Initial:

see individual properties

Applies to:

all elements

Inherited:

no

Percentages:

N/A

Media:

aural

Computedvalue:

see individual properties

Computed value: see individual properties

For example, the below two rules are equivalent –

What is the pause-after Property?

Pause after property specifies a break/pause to be observed after speaking an element's content. The most possible values are −

  • time – It Expresses the pause in absolute time units (seconds and milliseconds).
  • percentage – Percentage is nothing but the the inverse of the value of the speech-rate property. Let us see an example: If the speech-rate calculated is 120 words per minute (i.e. if a word takes half a second, or 500ms), then a pause-after of 100% means a halt of 500 ms and a pause-after of 20% means 100milli seconds.

What is the pause-before Property?

Pause before property is used to define a break observed before speaking an element's content. The most used values are −

  • time − Expresses the pause in absolute time units (seconds and milliseconds).
  • percentage − Refers to the inverse of the value of the speech-rate property.

For example, if the speech-rate is 120 words per minute (i.e. a word takes half a second, or 500ms), then a pause-before of 100% means a pause of 500 ms and a pause-before of 20% means 100ms.

What is the pause Property?

Pause property is a shorthand for setting both pause-before and pause-after. If two values are given, the first value is pause-before and the second is pause-after.

Here is an example –

What is the pitch Property?

Pitch property defined as the average pitch (a frequency) of the speaking voice. The average pitch here of a voice depends on the voice family. For example, the average pitch of a standard male voice is around 120Hz, but for a female voice, it's around 210Hz.

Value:

<frequency>x-low low medium high x-high <number> inherit

Initial:

medium

Applies to:

all elements

Inherited:

yes

Percentages:

N/A

Media:

aural

Computedvalue:

frequency

The most used values are −

  • frequency – It Specifies the average pitch of the speaking voice in hertz (Hz).
  • x-low, low, medium, high, x-high – The listed values do not map to absolute frequencies since these values depend on the voice family.

What is the pitch-range Property?

Pitch range property is defined as a variation in average pitch.

Value:

<number> inherit

Initial:

50

Applies to:

all elements

Inherited:

yes

Percentages:

N/A

Media:

aural

Computedvalue:

as specified

The most used values are −

  • number − A value ranging between '0' and '100'. A pitch range of '0' produces a flat, monotonic voice.
  • A pitch ranging about 50 produces the normal inflection. Pitch ranging greater than 50, produce animated voices.

What is the play-during Property?

Play during property defines a sound to be played as a background while an element's content is spoken. The most possible values could take any of the following below −

  • URI − The sound designed by this <uri> is played as a background while the element's content is spoken.
  • mix − When present, mix keyword means that the sound inherited from the parent element's play-during property continues to play and the sound designated by the uri is mixed with it. If mix is not specified, the element's background sound substitutes the parent's element.
  • repeat − When present, repeat keyword means that the sound will repeat if it is too short to fill the entire duration of the element. Otherwise, the sound is played once and then stops.
  • auto − The sound of the parent element continues to play.
  • none − This keyword means that there is silence.

Value:

,uri.[ mix repeat ]? auto none inherit

Initial:

Auto

Applies to:

all elements

Inherited:

No

Percentages:

N/A

Media:

aural

Computedvalue:

absolute URI, rest as specified

Here is an example −

What is the richness Property?

Richness property defines the richness or brightness of the speaking voice.

Value:

<number> inherit

Initial:

50

Applies to:

all elements

Inherited:

yes

Percentages:

N/A

Media:

aural

Computedvalue:

as specified

The most possible values are:

number − A value ranging '0' to '100'. The higher the value, the more will be the voice that will carry. A lower value will produce a soft voice.

What is the speak Property?

Speak property defines whether text will be rendered aurally and if so, in what manner. The most possible values are listed below −

  • none − Suppresses aural rendering so that the element requires no time to render.
  • normal − Uses language-dependent pronunciation rules for rendering an element and its children.
  • spell-out − Spells the text one letter at a time.

Notice the main difference between an element whose 'volume' property is defined as a value of 'silent' and an element whose 'speak' property takes the value 'none'. The former takes up the same time as if it had been spoken, including any breaks before and after the element, but then no sound is generated. The latter one requires no time and so it is not rendered.

What is the speak-numeral Property?

Speak- numeral property controls how numerals should be spoken.

Value:

digits continuous inherit

Initial:

continuous

Applies to:

all elements

Inherited:

yes

Percentages:

N/A

Media:

aural

Computedvalue:

as specified

The most possible values can take up −

  • digits − Speak the numeral as individual digits. So, "237" is spoken "Two Three Seven".
  • continuous − Speak the numeral as a full number. So, "237" is spoken "Two hundred thirty seven". Word representations here are language-dependent.

What is the speak-punctuation Property?

Speak-punctuation property defines how the punctuation is spoken.

Value:

code none inherit

Initial:

none

Applies to:

all elements

Inherited:

yes

Percentages:

N/A

Media:

aural

The most used values can take up −

  • code – It takes the Punctuation such as semicolons, braces, and so on are to be spoken literally.
  • none – It takes the Punctuation which is not to be spoken, but instead rendered naturally as various breaks/pauses.

What is the speech-rate property?

Speech-rate property defines the speaking rate. Remember that the both absolute and relative keyword values are allowed. The most possible values can take up are listed below −

  • number − Specifies the speaking rate in words per minute.
  • x-slow − Same as 80 words per minute.
  • slow − Same as 120 words per minute.
  • medium − Same as 180 - 200 words per minute.
  • fast − Same as 300 words per minute.
  • x-fast − Same as 500 words per minute.
  • faster − Adds 40 words per minute to the current speech rate.
  • slower − Subtracts 40 words per minutes from the current speech rate.

Value:

<number>x-slow slow medium fast x-fast faster slower inherit

Initial:

medium

Applies to:

all elements

Inherited:

yes

Percentages:

N/A

Media:

aural

Computedvalue:

number


What is the stress Property?

Stress property defines the height of "local peaks" in the intonation contour of a voice. English is known as a stressed language, and most parts of a sentence are assigned as primary, secondary, or tertiary stress.

Value:

<number>inherit

Initial:

50

Applies to:

all elements

Inherited:

yes

Percentages:

N/A

Media:

aural

Computedvalue:

as specified

The most used values are −

  • number − A value ranging from '0' to '100'. The meaning of values depends on the language being spoken.
  • Let us take, a level of '50' for a standard, English-speaking male voice (average pitch = 122Hz), speaking with normal intonation and emphasis would have a different meaning than '50' for an Italian voice.

What is the voice-family Property?

The value is a comma-separated, prioritized list of voice family names. It can have below values:

  • generic-voice – Values here are voice families. Probable values can be 'male', 'female', and 'child'.
  • specific-voice – Values here are specific instances (e.g., comedian, trinoids, carlos, lani).

Value:

[[<specific-voice> <generic-voice> ],]* [<specific-voice> <generic-voice> ]

Initial:

depends on user agent

Applies to:

all elements

Inherited:

yes

Percentages:

N/A

Media:

aural

Computedvalue:

as specified

Here is an example −

What is the volume Property?

Volume is defined to the median volume of the voice. It can take the below values −

  • numbers – Numbers can take anything between '0' and '100'. Whereas '0' represents the minimum audible volume level and ‘100’ represents the maximum comfortable level.
  • percentage − These values are calculated relative to the inherited value, and are then clipped to the range between '0' to '100'.
  • silent – Silent means having no sound at all. The value '0' does not mean the same as 'silent'.
  • x-soft − Same as '0'.
  • soft − Same as '25'.
  • medium − Same as '50'.
  • loud− Same as '75'.
  • x-loud − Same as '100'.

Below is an example –

Paragraphs with class goat will be very soft.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

CSS Advanced Topics