Members
(static, constant) exports.addFeedbackToResponse
Generates the final response by adding feedback and commands to it.
(static, constant) exports.addThousandsSeparators
Adds thousands separators for large numbers.
(static, constant) exports.addVariationInformation
Adds CV information to the data.
(static, constant) exports.computeMetadata
Computes CV from metadata for relaying uncertainty information.
(static, constant) exports.createTemporaryElement
Creates a temporary element to relay response to screen readers.
(static, constant) exports.formatOptions
Formats the options, specifically the xLabel and yLabel.
(static, constant) exports.generateInstructions
Generates the initial instructions for VoxLens.
(static, constant) exports.getArrayFromObject
Converts an object into an array.
(static, constant) exports.getDefaults
Finds the defaults for VoxLens.
(static, constant) exports.getInstructionsText
Generates the detailed instructions for VoxLens.
(static, constant) exports.getKeyBinds
Generates key bindings for a given set of combinations.
(static, constant) exports.getKeyFromEvent
Converts the event code into the face value of the key.
(static, constant) exports.getModifier
Finds the modifier using the settings. A modifier is the set of key bindings to trigger responses.
(static, constant) exports.getSettings
Finds settings based on the operating system.
(static, constant) exports.isCommandDuplicate
Checks to see if the command issued is duplicate.
(static, constant) exports.logCommand
Logs command issued into the user's local storage.
(static, constant) exports.logKeyPresses
Logs key presses into the user's local storage.
(static, constant) exports.sanitizeVoiceText
Sanitizes the voice input by removing stop words and converting words to numbers.
(static, constant) exports.validate
Validates the data supplied to VoxLens and throws errors where necessary.
(static, constant) exports.verbalise
Verbalises an array of values by joining each value and adding "and" before the last one.
(static, constant) os
Finds the operating system of the user.
(static, constant) stopWords
Set of stop words
Methods
(static) getFeedbackText() → {string}
Generates a verbose human-friendly response prefixing user's query.
Returns:
- Human-friendly verbose response.
- Type
- string
(static) getMappedTriggers(triggers, modifier) → {Object}
Maps the triggers to a human-readable format to be used in instructions.
Parameters:
Name | Type | Description |
---|---|---|
triggers |
Object | Triggers for each VoxLens mode. |
modifier |
string | The key binding for the trigger. |
Returns:
- Triggers with their presentable values.
- Type
- Object