Text-To-Speech Hookup - First Discovery API
Text-to-Speech Hookup - First Discovery Overview
Text-to-Speech Hookup - First Discovery is a grade containing the configuration necessary to setup the utterance of the panel introductions. As a panel is made visible, a message is uttered. The 'h' key is also wired up utter the panel instructions. This grade is intended to be added as a base grade to the First Discovery Editor.
Note: the utterance will only occur when self voicing is enabled.
Join the infusion-users mailing list and ask your questions there.
Adding a Text-to-Speech Hookup Grade
To mixin the Text-to-Speech Hookup into your Grade:
fluid.defaults("my.component", { gradeNames: ["gpii.firstDiscovery.tts.fdHookup", "autoInit"] });
Methods
Note: The methods specified below are bound to the underlying selfVoicing subcomponent.
Method | Description | Parameters |
---|---|---|
| Utters the panel message. Typically a combination of the step ( e.g. x of y ) and the panel instructions |
|
speakPanelInstructions | Utters the panel instructions | speakOpts : Any valid speech utterance options (see: utteranceOpts) |
Subcomponents
Name | Description | Values | Default |
---|---|---|---|
| Specifies the Text-To-Speech engine to use for self voicing. This provides additional configuration on top of what is specified in gpii.firstDiscovery.firstDiscoveryEditor. |
| selfVoicing: { options: { invokers: { speakPanelMessage: { funcName: "gpii.firstDiscovery.tts.fdHookup.speakPanelMessage", args: ["{firstDiscoveryEditor}", "{that}.msgLookup.stepCountMsg", "{that}.msgLookup.panelMsg", "{that}.queueSpeech", "{arguments}.0"] }, speakPanelInstructions: { funcName: "gpii.firstDiscovery.tts.fdHookup.speakPanelInstructions", args: ["{firstDiscoveryEditor}", "{that}.queueSpeech", "{arguments}.0"] } }, listeners: { "onCreate.bindKeypress": { listener: "gpii.firstDiscovery.keyboardShortcut.bindShortcut", args: ["body", gpii.firstDiscovery.keyboardShortcut.key.h, [], "{that}.speakPanelInstructions"] } }, modelListeners: { "{firstDiscoveryEditor}.model.currentPanelNum": "{that}.speakPanelMessage" } } } |
Dependencies
<script type="text/javascript" src="src/lib/infusion/infusion-custom.js"></script> <script type="text/javascript" src="src/js/msgLookup.js"></script> <script type="text/javascript" src="src/js/ttsHookup.js"></script>