You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > opVoiceRate
opVoiceRate style property | XvVoiceRate style property
opVoiceRate | ||||||
XvVoiceRate |
Specifies or returns the number of spoken words per minute.
Same as the voice-pitch-range property in the CSS3 declaration.
The opVoiceRate and XvVoiceRate properties are equivalent in Opera.
Syntax:
You can find the related objects in the Supported by objects section below.
XvVoiceRate: | This property is read/write. |
opVoiceRate: | This property is read/write. |
CSS page for this property: -op-voice-rate |
Possible values:
The type of this property is string.
One of the following values:
Fast. For instance 300 words per minute in English. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Normal speech rate for the language. For instance 180 - 200 words per minute in English. | |||||||
Slow. For instance 120 words per minute in English. | |||||||
Positive integer, number of spoken words per minute. | |||||||
Very fast. For instance 500 words per minute in English. | |||||||
Very slow. For instance 80 words per minute in English. |
Default: medium.
Example HTML code 1:
This example illustrates the use of the -xv-voice-rate property:
|
||||
<head> <style> .example { -xv-voice-rate: fast; } </style> </head> <body> <p class="example">300 words per minute in English.</p> Select the text in the document, right click and select speak </body> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the XvVoiceRate property in JavaScript:
|
||||
<head> <style> #example { -xv-voice-rate: slow; } </style> <script type="text/javascript"> function ChangeRate (selectTag) { var example = document.getElementById ("example"); // Returns the index of the selected option var whichSelected = selectTag.selectedIndex; // Returns the text of the selected option var selectState = selectTag.options[whichSelected].text; if ('XvVoiceRate' in example.style) { example.style.XvVoiceRate = selectState; // or opVoiceRate } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> Normal voice <p id="example">Select the text in the document, right click and select speak</p> Normal voice <select onchange="ChangeRate (this);" size="5"> <option>x-slow</option> <option selected="selected">slow</option> <option>medium</option> <option>fast</option> <option>x-fast</option> </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
opVoiceStress
opVoiceVolume
cue
cueAfter
cueBefore
pause
pauseAfter
pauseBefore
rest
restAfter
restBefore
speak
voiceFamily
opPhonemes
XvVoiceBalance
XvVoiceDuration
opVoicePitch
opVoicePitchRange
opVoiceStress
opVoiceVolume
cue
cueAfter
cueBefore
pause
pauseAfter
pauseBefore
rest
restAfter
restBefore
speak
voiceFamily
External links:
User Contributed Comments