Interface ISpeechCommand

Provides an interface for "if Condition then Action" speech commands

Condition: the predicate to taking the "Action" evaluated against the given transcript Action: the action to be taken once the transcript satisfies the predicate "Condition"

interface ISpeechCommand {
    Action: (() => Promise<void>);
    Condition: ((transcript) => boolean);
}

Properties

Properties

Action: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

Condition: ((transcript) => boolean)

Type declaration

    • (transcript): boolean
    • Parameters

      • transcript: string

      Returns boolean

Generated using TypeDoc