You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > opVoicePitchRange

opVoicePitchRange style property | XvVoicePitchRange style property

Browser support:
opVoicePitchRange
XvVoicePitchRange
Specifies or retrieves the variation from the average pitch of the voice.
Same as the voice-pitch-range property in the CSS3 declaration.
The opVoicePitchRange and XvVoicePitchRange properties are equivalent in Opera.

Syntax:

object.opVoicePitchRange;
object.XvVoicePitchRange;
You can find the related objects in the Supported by objects section below.
XvVoicePitchRange: This property is read/write.
opVoicePitchRange: This property is read/write.
CSS page for this property: -op-voice-pitch-range

Possible values:

The type of this property is string.
 One of the following values: 
frequency (floating-point in Hz)
A floating-point number followed by Hz, the variation from the average pitch in Hertz.
high
A highly animated voice.
inherit
Takes the value of this property from the computed style of the parent element.
low
A flat monotonic voice.
medium
A normal voice.
variation in non-negative percentage
Degree of the variation from the average pitch.
Default: 50%.

Example HTML code 1:

This example illustrates the use of the -xv-voice-pitch-range property:
<head>
    <style>
        .example {
            -xv-voice-pitch-range: high;
        }
    </style>
</head>
<body>
    Normal voice
    <p class="example">A highly animated voice.</p>
    Select the text in the document, right click and select speak
</body>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the XvVoicePitchRange property in JavaScript:
<head>
    <style>
        #example {
            -xv-voice-pitch: high;
        }
    </style>
    <script type="text/javascript">
        function ChangePitch (input) {
            var example = document.getElementById ("example");

            if ('XvVoicePitchRange' in example.style) {
                example.style.XvVoicePitchRange = input.value + "Hz";
                // or opVoicePitchRange
            } 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>
    Change voice-pitch-range: 
    <input type="text" onkeyup="ChangePitch (this);" value="1" />
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content