speech-rule-engine
Version:
A standalone speech rule engine for XML structures, based on the original engine from ChromeVox.
19 lines (18 loc) • 802 B
TypeScript
import { Span, SpanAttrs } from '../audio/span.js';
import * as srf from './speech_rule_functions.js';
export declare class SpeechRuleContext {
customQueries: srf.CustomQueries;
customStrings: srf.CustomStrings;
contextFunctions: srf.ContextFunctions;
customGenerators: srf.CustomGenerators;
applyCustomQuery(node: Node, funcName: string): Node[];
applySelector(node: Node, expr: string): Node[];
applyQuery(node: Node, expr: string): Node;
applyConstraint(node: Node, expr: string): boolean;
constructString(node: Node, expr: string): string;
constructSpan(node: Node, expr: string, def: SpanAttrs): Span[];
private constructString_;
parse(functions: [string, srf.SpeechRuleFunction][] | {
[key: string]: srf.SpeechRuleFunction;
}): void;
}