Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tetos

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tetos

Unified interface for multiple Text-to-Speech (TTS) providers

  • 0.4.1
  • PyPI
  • Socket score

Maintainers
1

TeToS

PyPI Python License Downloads Documentation Status

A unified interface for multiple Text-to-Speech (TTS) providers.

Supported TTS providers

ProviderRequirements
Edge-TTS-
OpenAI TTSapi_key: OpenAI API key
Azure TTSspeech_key: Azure Speech service key
speech_region: Azure Speech service region
Google TTSEnable 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 TTSapi_key: Baidu API key
secret_key: Baidu secret key
Both can be acquired at the console
Minimax TTSapi_key: Minimax API key
group_id: Minimax group ID
Both can be acquired at the Minimax console
迅飞 TTSapp_id: Xunfei APP ID
api_key: Xunfei API key
api_secret: Xunfei API secret
Fish Audioapi_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

Apache License 2.0

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc