UNPKG

speech-rule-engine

Version:

A standalone speech rule engine for XML structures, based on the original engine from ChromeVox.

15 lines 764 B
import { AbstractSpeechGenerator } from './abstract_speech_generator.js'; import * as SpeechGeneratorUtil from './speech_generator_util.js'; import { setupEngine } from '../common/engine_setup.js'; import { Attribute } from '../enrich_mathml/enrich_attr.js'; export class SummarySpeechGenerator extends AbstractSpeechGenerator { getSpeech(node, _xml) { setupEngine(this.getOptions()); const id = node.getAttribute(Attribute.ID); const snode = this.getRebuilt().streeRoot.querySelectorAll((x) => x.id.toString() === id)[0]; SpeechGeneratorUtil.addModality(node, snode, this.modality); const speech = node.getAttribute(Attribute.SUMMARY); return speech; } } //# sourceMappingURL=summary_speech_generator.js.map