Speech Rate Panel API

Speech Rate Panel Overview

Allows users to adjust the speed at which items on the screen are read. This component uses Ranged Panel - with Disabled Message as a base grade so it has the same component structure as Ranged Panel - with Disabled Message in aspect of the model, options, selectors and dependencies.

 


Adding a Speech Rate Panel to a Component/Grade

Option 1: Typically the Speech Rate Panel is integrated into the first discovery tool by supplying it as a type option in an Auxiliary Schema:

"speechRate": {
    "type": "gpii.firstDiscovery.speechRate",
    "panel": {
        "type": "gpii.firstDiscovery.panel.speechRate",
        "container": ".gpiic-fd-prefsEditor-panel-speechRate",
        "template": "%prefix/rangeWithDisabledMsgTemplate.html",
        "message": "%prefix/speechRate.json",
        "gradeNames": ["gpii.firstDiscovery.panel.speechRate.prefsEditorConnection"]
    }
}
Working in conjunction with the Auxiliary Schema, the type, its default value and range of the speech rate preference are defined in the Primary Schema:

 

fluid.defaults("gpii.firstDiscovery.schemas.speechRate", {
    gradeNames: ["autoInit", "fluid.prefs.schemas"],
    schema: {
        "gpii.firstDiscovery.speechRate": {
            "type": "number",
            "default": 1,
            "minimum": 0.1,
            "maximum": 2, // The spec allows for up to 10, but in chrome 2 seems to be the upper bound.
            "divisibleBy": 0.1
        }
    }
});

 


Option 2: Adding as a stand alone component:

var myPanel = gpii.firstDiscovery.panel.speechRate(container, options);

Grades

The base grades used by the Speech Rate Panel: