speech-rule-engine
Version:
A standalone speech rule engine for XML structures, based on the original engine from ChromeVox.
45 lines (44 loc) • 2.31 kB
TypeScript
import { AuditoryDescription } from '../audio/auditory_description.js';
import { SpeechStructure } from '../rule_engine/speech_structure.js';
import { SemanticNode } from '../semantic_tree/semantic_node.js';
type OptionsList = {
[key: string]: string;
};
export declare function computeSpeech(xml: Element, clear?: boolean): AuditoryDescription[];
export declare function computeMarkup(tree: Element, clear?: boolean): string;
export declare function recomputeMarkup(semantic: SemanticNode): string;
export declare function addSpeech(mml: Element, semantic: SemanticNode, snode: Element): void;
export declare function addModality(mml: Element, semantic: SemanticNode, modality: string): void;
export declare function addPrefix(mml: Element, semantic: SemanticNode): void;
export declare function retrievePrefix(semantic: SemanticNode): string;
export declare function computePrefix(node: Element): AuditoryDescription[];
export declare function connectMactions(node: Element, mml: Element, stree: Element): void;
export declare function connectMactionSelections(mml: Element, stree: Element): {
[key: string]: {
"data-semantic-id"?: string;
"data-semantic-parent"?: string;
"aria-level"?: string;
"aria-posinset"?: string;
role?: string;
};
};
export declare function connectAllMactions(mml: Element, stree: Element): void;
export declare function retrieveSummary(node: Element, options?: OptionsList): string;
export declare function computeSummary(node: Element, options?: OptionsList): AuditoryDescription[];
export declare function computePostfix(node: Element): AuditoryDescription[];
export declare function completeModalities(structure: SpeechStructure): void;
export declare function computeSpeechStructure(sxml: Element): {
[id: string]: {
[modality: string]: string;
};
};
export declare function computeBrailleStructure(sxml: Element): {
[id: string]: {
[modality: string]: string;
};
};
export declare function nextRules(options: OptionsList, styles?: OptionsList): OptionsList;
export declare function nextStyle(node: SemanticNode, options: OptionsList): string;
export declare function toStyles(options: OptionsList): OptionsList;
export declare function fromStyles(styles: OptionsList): string;
export {};