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
Provider | Requirements |
---|---|
Edge-TTS | - |
OpenAI TTS | api_key : OpenAI API key |
Azure TTS | speech_key : Azure Speech service keyspeech_region : Azure Speech service region |
Google TTS | Enable the Text-to-Speech API in the Google Cloud Console Set env var GOOGLE_APPLICATION_CREDENTIALS as the path to the service account key file |
Volcengine TTS(火山引擎) | access_key : Volcengine access key ID. (Get it here)secret_key : Volcengine access secret key. (Get it here)app_key : Volcengine app key |
Baidu TTS | api_key : Baidu API keysecret_key : Baidu secret keyBoth can be acquired at the console |
Minimax TTS | api_key : Minimax API keygroup_id : Minimax group IDBoth can be acquired at the Minimax console |
迅飞 TTS | app_id : Xunfei APP IDapi_key : Xunfei API keyapi_secret : Xunfei API secret |
Fish Audio | api_key : Fish Audio API key |
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
- 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
tetos-0.4.0.tar.gz
(23.4 kB
view details)
Built Distribution
tetos-0.4.0-py3-none-any.whl
(27.4 kB
view details)
File details
Details for the file tetos-0.4.0.tar.gz
.
File metadata
- Download URL: tetos-0.4.0.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
41e8d14fc22409e832f3d26799fb4c9434b4625cbcfb6e88e0374ce3d6519ec2
|
|
MD5 |
b692f6ffe0e042f660ad7943a03f4a1f
|
|
BLAKE2b-256 |
c9dc6dad90396752bb10966bd6b7491b726b7168692e18ba59dacd8ffca4c3b9
|
File details
Details for the file tetos-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: tetos-0.4.0-py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
362057265accb125c0f9c36e9e6b65e19762ded5524542437b6ca8a82457f04f
|
|
MD5 |
6c4c84b2a36d9848cd72a9e99083b3de
|
|
BLAKE2b-256 |
3756add65d976c6ae4ee59262b3fc8894d1cdf5c85dca5f24f5e794c3925a0a9
|