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
Metadata
Release files for tetos 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tetos-0.4.3.tar.gz | 23.7 kB | Without provenance | Details for tetos-0.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tetos-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for tetos-0.4.3-py3-none-any.whl |
Total release size: 51.4 kB
Release files / tetos-0.4.3.tar.gz
| Download URL | tetos-0.4.3.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f33a9c7f12ea835c197002df3e15a2b01b4bd0cd06b158090f33bf434d5972bc
|
|
BLAKE2b-256 checksum How to use checksums |
79f28c9ed3d1b643df80c99fd0d53683e6ca3e8e65ac8f7b04518401b1ff4d64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / tetos-0.4.3-py3-none-any.whl
| Download URL | tetos-0.4.3-py3-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1e04794b3f6b4aced7183361dfbcc860b7faf9dc3954d09d52246e2e3dd0dab
|
|
BLAKE2b-256 checksum How to use checksums |
865125bbb39db09c39cc87a2d49a2ecba913c624a36ae9db9906e76a44042ee2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for tetos 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.