voiceFamily style property
Specifies or returns the type of voice to use as speak control.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: voice-family |
Possible values:
The type of this property is string.
One of the following values: | ||||||||||||||||||||||||||||||||||||||||||||||
|
Description of values:
Child voice. | |||||||
Female voice. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Male voice. | |||||||
Neutral voice. | |||||||
Old voice. | |||||||
String that identifies a specific voice on the user's system. | |||||||
Integer that indicates the number of the voice characteristic in the order of the given generic-voice. | |||||||
Young voice. |
Default: young male 0.
Example HTML code 1:
This example illustrates the use of the voice-family property:
|
||||
<head> <style> .example { voice-family: "Louis Amstrong", male; } </style> </head> <body> <div class="example">What a wonderful world</div> </body> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the voiceFamily property in JavaScript:
|
||||
<head> <script type="text/javascript"> function ChangeVoiceFamily () { var selectTags = document.getElementsByTagName ("select"); var familyValue = ""; for (i = 0; i < selectTags.length; i++) { // Returns the index of the selected option whichSelected = selectTags[i].selectedIndex; // Concatenates the text of the selected option familyValue += selectTags[i].options[whichSelected].text + " "; } var div = document.getElementById ("myDiv"); if ('voiceFamily' in div.style) { div.style.voiceFamily = familyValue; } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <div id="myDiv">Select this text and use context menu</div> <br /> Change the voice-family property: <br /> <select size="3" onchange="ChangeVoiceFamily ();"> <option />child <option selected="selected" />young <option />old </select> <select size="2" onchange="ChangeVoiceFamily ();"> <option />female <option selected="selected" />male </select> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
CSSStyleDeclaration, htmlElement.currentStyle, htmlElement.style
HTML elements:
a, abbr, acronym, address, b, bdo, big, blink, blockquote, body, button, caption, center, cite, code, col, colgroup, dd, del, dfn, dir, div, dl, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, html, i, input:button, input:file, input:password, input:reset, input:submit, input:text, ins, isindex, kbd, label, legend, li, marquee, menu, ol, optgroup, option, p, plaintext, pre, q, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp
Related pages:
XvInterpretAs
opPhonemes
XvVoiceBalance
XvVoiceDuration
opVoicePitch
opVoicePitchRange
opVoiceRate
opVoiceStress
opVoiceVolume
cue
cueAfter
cueBefore
pause
pauseAfter
pauseBefore
rest
restAfter
restBefore
speak
opPhonemes
XvVoiceBalance
XvVoiceDuration
opVoicePitch
opVoicePitchRange
opVoiceRate
opVoiceStress
opVoiceVolume
cue
cueAfter
cueBefore
pause
pauseAfter
pauseBefore
rest
restAfter
restBefore
speak
External links:
User Contributed Comments