Unified interface for multiple Text-to-Speech (TTS) providers
Project description
TeToS
A unified interface for multiple Text-to-Speech (TTS) providers.
Supported 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
Installation
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.
API Usage
Use Azure TTS as an example:
from tetos.azure import AzureSpeaker
import asyncio
async def main():
speaker = AzureSpeaker(speech_key='...', service_region='...')
await speaker.synthesize('Hello, world!', 'output.mp3')
if __name__ == '__main__':
asyncio.run(main())
The initialization parameters may be different for other providers.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tetos-0.0.1.tar.gz
(11.3 kB
view hashes)
Built Distribution
tetos-0.0.1-py3-none-any.whl
(13.2 kB
view hashes)