A unified interface for multiple Text-to-Speech (TTS) providers.
-
Required parameters:
api_key
: OpenAI API key
-
Required parameters(Please refer to the documentation to get the secrets):
speech_key
: Azure Speech service keyservice_region
: Azure Speech service region
-
Required parameters:
access_key
: Volcengine access key ID. (Get it here)secret_key
: Volcengine access secret key. (Get it here)app_key
: Volcengine app key
Requires Python 3.8 or higher.
pip install tetos
tetos PROVIDER [PROVIDER_OPTIONS] TEXT [--output FILE]
Please run tetos --help
for available providers and options.
Use Azure TTS as an example:
import anyio
from pathlib import Path
from tetos.azure import AzureSpeaker
speaker = AzureSpeaker(speech_key='...', speech_region='...')
anyio.run(speaker.synthesize, 'Hello, world!', Path('output.mp3'))
The initialization parameters may be different for other providers.
TeTos respects the proxy environment variables HTTP_PROXY
, HTTPS_PROXY
, ALL_PROXY
and NO_PROXY
.
- Google TTS
- SSML support