Keyboard Input - Text to Speech API
Keyboard Input - Text to Speech Overview
This component adds the self-voicing to the Keyboard Input to announce the input character and whether the SHIFT key is latched. This component is not intended to be used on its own, but provided as a base grade to another component. It also relies on the availability of a component with the fluid.textToSpeech grade within the component hierarchy to do the actual speaking.
On This Page
See Also
Still need help?
Join the infusion-users mailing list and ask your questions there.
Adding a Keyboard Input - Text to Speech to a Component/Grade
To mixin the Keyboard Input - Text to Speech into the Keyboard Input by supplying it as a gradeNames option:
keyboardInput: { type: "gpii.firstDiscovery.keyboardInput", container: "{that}.dom.input", options: { gradeNames: ["gpii.firstDiscovery.keyboardInputTts"] ... } }
Methods
Method | Description | Parameters |
---|---|---|
| Queues speech. | None |
speakOnFocusMessage | Speaks the message when the input field gets focus. | None |
speakShiftState | Announces when the SHIFT is latched or unlatched. | None |
Dependencies
<script type="text/javascript" src="src/lib/infusion/infusion-custom.js"></script> <script type="text/javascript" src="src/js/keyboardInput.js"></script>