play_tts
play_tts
Play text-to-speech. A typed convenience over play() that builds the
{"type": "tts", "params": {...}} media item for you.
Parameters
text
The text to speak.
language
Language code for the voice, such as "en-US". Keyword-only.
gender
Voice gender, "male" or "female". Keyword-only.
voice
Voice ID. Keyword-only.
volume
Volume adjustment in dB, from -40.0 to 40.0. Keyword-only.
on_completed
Callback invoked when the operation reaches a terminal state. Can be a regular function or async coroutine. Keyword-only.
Returns
PlayAction — An action handle with stop(), pause(), resume(), volume(), and wait() methods.