PlayTextAudio¶
- class PlayTextAudio(text: str, sample_rate: int | float | None = None, **settings)[source]¶
Bases:
SpeakInstructionSynthesize text and play it through the output device.
- property id: int¶
Return the unique speech instruction identifier.
- Returns:
Speech instruction identifier.
- Return type:
int
- perform(speaker: BaseSpeaker, *args, **kwargs)[source]¶
Execute the instruction with a speaker backend.
- Parameters:
speaker (BaseSpeaker) – Speaker used to synthesize or play speech.
args – Additional positional arguments for the execution flow.
kwargs – Additional keyword arguments for the execution flow.
- Returns:
Updated UI state when the implementation returns it.
- Return type: