Self Voicing
Overview
Component Name: gpii.firstDiscovery.selfVoicing
File: selfVoicing.js
Provides a Text-to-Speech engine for vocalizing text.
Note: This is will only work in browsers that support the SpeechSynthesis API.
Using the Self Voicing component
Option 1: Typically this component is used as a sub-component of the Preferences Editor Loader, particularly the First Discovery Tool Editor:
selfVoicing: {
type: "gpii.firstDiscovery.selfVoicing",
options: {}
}
Option 2: Outside the context of the First Discovery Tool, developers may wish to create a standalone component:
var mySelfVoicing = gpii.firstDiscovery.selfVoicing(options);
Grades
This component uses the following base grades:
Methods
Method | Description | Parameters |
---|---|---|
queueSpeech |
Calls queueSpeechImpl if the enabled model value is true or the force option value is true. |
|
queueSpeechImpl |
Makes use of the fluid.textToSpeech.queueSpeech to queue speeches. |
|
clearQueue |
Empties the queue if the self voicing is disabled (muted). | none |
Dependencies
<script type="text/javascript" src="src/lib/infusion/infusion-custom.js"></script>
<script type="text/javascript" src="src/js/selfVoicing.js"></script>