voice-family property is used in speech media to specify the voice family of the speaking voice.
The value is a comma-separated, prioritized list of voice family names. This works similar to the
font-family property, where, if the first choice isn't available, the user agent will try the second, and so on.
You can use the
voice-family property to specify things like, whether the voice is male or female, whether it's a child or adult, etc. You can also use named values (for example, "Steve", "MC", "old woman", etc) to point to a specific voice instance.
The value can be a comma-separated, prioritized list of values. The user agent will attempt to use the first option. If it can't use the first option, it will try the subsequent options. Similar to the font family, it's a good idea to leave a generic voice family as the last option in case the user agent can't support any specific voices.
Refers to a specific voice instance. For example,
cartoon duck, etc.
Generic voices include the following values:
Possible values are
old. These translate roughly into ages 6, 24, and 75 respectively (based on the Speech Synthesis Markup Language (SSML)), however, this may depend on the voice-matching algorithm being used.
Possible values are
An integer indicating the preferred variant. For example, the second female child voice. Only positive, non-zero integers are allowed.
For example, a value of
1indicates that the first matching variant is the preferred voice to be used.
- Indicates that the
voice-familyvalue gets inherited and used regardless of any potential language change within the content markup. This value behaves as
inheritwhen applied to the root element.
In addition, all CSS properties also accept the following CSS-wide keyword values as the sole component of their property value:
- Represents the value specified as the property's initial value.
- Represents the computed value of the property on the element's parent.
- This value acts as either
initial, depending on whether the property is inherited or not. In other words, it sets all properties to their parent value if they are inheritable or to their initial value if not inheritable.
- Initial Value
- Depends on the user agent.
- Applies To
- All elements.