SpeakAlgorithm¶
- class SpeakAlgorithm(instructions: list[BaseInstruction], speaker: BaseSpeaker | None = None, debugger: BaseDebugger | bool = True)[source]¶
Bases:
BaseAlgorithmRun instruction sequences that depend on a speaker backend.
- property id: int¶
Return the unique algorithm identifier.
- Returns:
Algorithm identifier.
- Return type:
int
- perform(ui: BaseUi, *args, **kwargs)[source]¶
Execute the algorithm for the provided UI context.
- Parameters:
ui (BaseUi) – UI instance used during execution.
args – Additional positional arguments for the execution flow.
kwargs – Additional keyword arguments for the execution flow.
- add_instruction(instruction: BaseInstruction)[source]¶
Add an instruction to the algorithm sequence.
- Parameters:
instruction – Instruction to append.
- property instructions: list[BaseInstruction]¶
Return the configured instructions.
- Returns:
Instructions managed by the algorithm.