TeToS
A unified interface for multiple Text-to-Speech (TTS) providers.
Supported TTS providers
Installation
Tetos requires Python 3.8 or higher.
pip install tetos
CLI Usage
tetos PROVIDER [PROVIDER_OPTIONS] TEXT [--output FILE]
Please run tetos --help
for available providers and options.
Examples
tetos google "Hello, world!"
tetos azure "Hello, world!" --output output.mp3 # save to another file
tetos edge --lang zh-CN "你好,世界!" # specify language
tetos openai --voice echo "Hello, world!" # specify voice
API Usage
Use Azure TTS as an example:
from tetos.azure import AzureSpeaker
speaker = AzureSpeaker(speech_key='...', speech_region='...')
speaker.say('Hello, world!', 'output.mp3')
The initialization parameters may be different for other providers.
Work behind a proxy
TeTos respects the proxy environment variables HTTP_PROXY
, HTTPS_PROXY
, ALL_PROXY
and NO_PROXY
.
TODO
License
Apache License 2.0