CSS voice-family property

CSS voice-family property

Description

The voice-family property is used to define a specific voice to be used when content is spoken, as well as possible generic voice types.

Possible values

  • specific-voice – Any specific voice name can be declared for a voice, although voice names with spaces or other special characters should be enclosed in quotes.
  • generic-voice – Allowed generic voice family values ​​are: male, female, and child.


Applies to

All HTML elements.

DOM Syntax

object.style.voiceFamily = "child"; 

Example

Here is an example:

<style type = "text/css"> 
<!-- 
h1 { voice-family: announcer, male } 
p.part.romeo { voice-family: romeo, male } 
p.part.juliet { voice-family: juliet, female } 
--> 
</style> 

Leave a Reply

Your email address will not be published. Required fields are marked *