CSS - voice-family


The voice-family property is used to define the specific voice, and optionally a generic voice type, which is to be used in the speaking of content.

Possible Values

  • specific-voice − Any specific voice name may be declared for the voice, although those voice names with whitespace or other special characters in their names should be quoted.

  • generic-voice − The permitted generic voice family values are male, female, and child.

Applies to

All the HTML elements.

DOM Syntax

object.style.voiceFamily = "child";


Here is the example −

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