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
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.4.2.tar.gz.
File metadata
- Download URL: tetos-0.4.2.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
680aa553cda237280d5c2dace1ee4ee76dcbc83d1c0839f8c07499b0ce161543
|
|
| MD5 |
4e4df19ea9fb887668717f791b354f25
|
|
| BLAKE2b-256 |
8f86f1bbb2d528937ae825c2108c8debe02e7cd7bcc3a2ab089b79f1496c6053
|
File details
Details for the file tetos-0.4.2-py3-none-any.whl.
File metadata
- Download URL: tetos-0.4.2-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0c54479ac98b0a3dc6cc30b99f1f806dba7db7449714e8de29a011e3c94057a
|
|
| MD5 |
223f85dd8336ad4f5aa0277f7c48db54
|
|
| BLAKE2b-256 |
4521bcfb13ca88188eb25f78dbf86cab0a2e2773881b68e08c2d2abce463da92
|