Text to speech
Speak text with system voices.
get_available_languages() → List[str]¶
Returns all available languages.
Return type: List[str]
is_speaking() → bool¶
Returns a boolean indicating if the device is currently speaking.
Return type: bool
say(text: str, language: str = None, rate: float = None)¶
Says the given text.
- text – The text to speak.
- language – Format:
en-US. If is nothing provided, the system language is used. Use the
get_available_languages()function to get all available languages.
- rate – The speed of the voice. From 0 (really slow) to 1 (really fast). If nothing is provided, 0.5 is used.
Waits until the script finishes speaking.