platypush.plugins.tts

class platypush.plugins.tts.TtsPlugin(language='en-gb', player_args: Optional[List[str]] = None)[source]

Default Text-to-Speech plugin. It leverages Google Translate.

Requires:

  • mplayer - see your distribution docs on how to install the mplayer package
__init__(language='en-gb', player_args: Optional[List[str]] = None)[source]
Parameters:
  • language – Language code (default: en-gb).
  • player_args – Extra options to be passed to the audio player (default: mplayer).
say(text: str, language: Optional[str] = None, player_args: Optional[List[str]] = None)[source]

Say some text.

Parameters:
  • text – Text to say.
  • language – Language code override.
  • player_argsplayer_args override.