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 keyspeech_region: Azure Speech service region
-
Requirements:
- Enable the Text-to-Speech API in the Google Cloud Console
- Environment variables
GOOGLE_APPLICATION_CREDENTIALSpointing to the service account key file
-
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
-
Required parameters:
api_key: Baidu API keysecret_key: Baidu secret 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.
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.
Behind a proxy
TeTos respects the proxy environment variables HTTP_PROXY, HTTPS_PROXY, ALL_PROXY and NO_PROXY.
TODO
- Google TTS
- SSML support
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tetos-0.1.1.tar.gz.
File metadata
- Download URL: tetos-0.1.1.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4ccc2b281a0917407be018aaed9b5f1d14334484f343e7d57065190392e9a3c
|
|
| MD5 |
4db03705ceff3193ce54be314c7a5be7
|
|
| BLAKE2b-256 |
0e92288ed61ea1b2b93c5459fa144111f55e9edffde4552be7533174eb2fc016
|
File details
Details for the file tetos-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tetos-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae1105a23aae2211876f846dde09555d29cf564e67c403b64abca7a0b5992542
|
|
| MD5 |
380e78d7a27b41d408f871981c62af1a
|
|
| BLAKE2b-256 |
2f0d38240d84f60881af0d3a9f58c823310891f164c440bec3582cc10ee7270a
|