tts
#
Description#
Default Text-to-Speech plugin. It leverages Google Translate’s unofficial frontend API.
- param player_args:
Additional arguments to be passed to SoundPlugin.play (like volume, duration, channels etc.).
Configuration#
tts:
# [Optional]
# Language code (default: ``en-US``).
# language: en-US
Dependencies#
pip
pip install numpy sounddevice num2words
Alpine
apk add ffmpeg portaudio-dev py3-numpy
Debian
apt install ffmpeg portaudio19-dev python3-numpy
Fedora
yum install ffmpeg python-numpy portaudio-devel
Arch Linux
pacman -S ffmpeg python-numpy python-sounddevice portaudio
Actions#
Module reference#
- class platypush.plugins.tts.TtsPlugin(language='en-US', **player_args)[source]#
Bases:
Plugin
Default Text-to-Speech plugin. It leverages Google Translate’s unofficial frontend API.
- __init__(language='en-US', **player_args)[source]#
- Parameters:
language – Language code (default:
en-US
).player_args – Additional arguments to be passed to
platypush.plugins.sound.SoundPlugin.play()
(like volume, duration, channels etc.).