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

opVoicePitch style property | XvVoicePitch style property

Browser support:
opVoicePitch
XvVoicePitch
Specifies or retrieves the average frequency of the speaking voice.
Same as the voice-pitch property in the CSS3 declaration.
The opVoicePitch and XvVoicePitch properties are equivalent in Opera.

Syntax:

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

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 average frequency of the speaking voice in Hertz.
high
Values depend on the voice family.
inherit
Takes the value of this property from the computed style of the parent element.
low
Values depend on the voice family.
medium
Values depend on the voice family.
x-high
Values depend on the voice family.
x-low
Values depend on the voice family.
Default: medium.

Example HTML code 1:

This example illustrates the use of the -xv-voice-pitch property:
<head>
    <style>
        .example {
            -xv-voice-pitch: high;
        }
    </style>
</head>
<body>
    <p class="example">Sets the average pitch of the speaking voice to high.</p>
    Select the text above, 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 XvVoicePitch property in JavaScript:
<head>
    <style>
        .example {
            -xv-voice-pitch: high;
        }
    </style>
    <script type="text/javascript">
        function ChangePitch (input) {
            var div = document.getElementById ("myDiv");

            if ('XvVoicePitch' in div.style) {
                div.style.XvVoicePitch = input.value + "Hz";
            } else {
                alert ("Your browser doesn't support this example!");
            }
        }
    </script>
</head>
<body>
    Normal voice
    <p class="example">Select the text in the document, right click and select speak</p>
    Change voice-pitch: 
    <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