speech¶
Text to speech
Speak text with system voices.
-
speech.get_available_languages() → List[str]¶ Returns all available languages.
Return type: List[str]
-
speech.is_speaking() → bool¶ Returns a boolean indicating if the device is currently speaking.
Return type: bool
-
speech.say(text: str, language: str = None, rate: float = None)¶ Says the given text.
Parameters: - text – The text to speak.
- language – Format:
en-US. If is nothing provided, the system language is used. Use theget_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.
-
speech.wait()¶ Waits until the script finishes speaking.