tetos


Nametetos JSON
Version 0.4.1 PyPI version JSON
download
home_pageNone
SummaryUnified interface for multiple Text-to-Speech (TTS) providers
upload_time2024-10-29 11:39:07
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache-2.0
keywords tts text-to-speech speech audio ai nlp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TeToS
<!--index start-->

[![PyPI](https://img.shields.io/pypi/v/tetos)](https://pypi.org/project/tetos/)
[![Python](https://img.shields.io/pypi/pyversions/tetos)](https://pypi.org/project/tetos/)
[![License](https://img.shields.io/pypi/l/tetos)](https://www.apache.org/licenses/LICENSE-2.0)
[![Downloads](https://pepy.tech/badge/tetos)](https://pepy.tech/project/tetos)
[![Documentation Status](https://readthedocs.org/projects/tetos/badge/?version=latest)](https://tetos.readthedocs.io/latest/?badge=latest)

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


## Supported TTS providers

| Provider                                                                                             | Requirements                                                                                                                                                                                                                                                      |
| ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Edge-TTS](https://github.com/rany2/edge-tts)                                                        | -                                                                                                                                                                                                                                                                 |
| [OpenAI TTS](https://platform.openai.com/docs/guides/text-to-speech)                                 | `api_key`: OpenAI API key                                                                                                                                                                                                                                         |
| [Azure TTS](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/text-to-speech) | `speech_key`: Azure Speech service key<br>`speech_region`: Azure Speech service region                                                                                                                                                                            |
| [Google TTS](https://cloud.google.com/text-to-speech?hl=zh-CN)                                       | [Enable the Text-to-Speech API in the Google Cloud Console](https://console.developers.google.com/apis/api/texttospeech.googleapis.com/overview?project=586547753837)<br>Set env var `GOOGLE_APPLICATION_CREDENTIALS` as the path to the service account key file |
| [Volcengine TTS(火山引擎)](https://console.volcengine.com/sami)                                      | `access_key`: Volcengine access key ID. ([Get it here](https://console.volcengine.com/iam/keymanage/))<br>`secret_key`: Volcengine access secret key. ([Get it here](https://console.volcengine.com/iam/keymanage/))<br>`app_key`: Volcengine app key             |
| [Baidu TTS](https://ai.baidu.com/tech/speech/tts)                                                    | `api_key`: Baidu API key<br>`secret_key`: Baidu secret key<br>Both can be acquired at the [console](https://console.bce.baidu.com/ai/#/ai/speech/app/list)                                                                                                        |
| [Minimax TTS](https://www.minimaxi.com/document/speech-synthesis-engine?id=645e034eeb82db92fba9ac20) | `api_key`: Minimax API key<br>`group_id`: Minimax group ID<br>Both can be acquired at the [Minimax console](https://www.minimaxi.com/user-center/basic-information)                                                                                               |
| [迅飞 TTS](https://www.xfyun.cn/services/online_tts)                                                 | `app_id`: Xunfei APP ID<br>`api_key`: Xunfei API key<br>`api_secret`: Xunfei API secret                                                                                                                                                                           |
| [Fish Audio](https://fish.audio)                                                                     | `api_key`: Fish Audio API key                                                                                                                                                                                                                                     |

## Installation

Tetos requires Python 3.8 or higher.

```bash
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:

```python
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

- [x] Google TTS
- [ ] SSML support

## License

[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)

<!--index end-->

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tetos",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "tts, text-to-speech, speech, audio, ai, nlp",
    "author": null,
    "author_email": "Frost Ming <me@frostming.com>",
    "download_url": "https://files.pythonhosted.org/packages/2c/37/c559dfbff265b2dc4fdd95809c32210d9f4523298d71e1db8334d2a0f6af/tetos-0.4.1.tar.gz",
    "platform": null,
    "description": "# TeToS\n<!--index start-->\n\n[![PyPI](https://img.shields.io/pypi/v/tetos)](https://pypi.org/project/tetos/)\n[![Python](https://img.shields.io/pypi/pyversions/tetos)](https://pypi.org/project/tetos/)\n[![License](https://img.shields.io/pypi/l/tetos)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Downloads](https://pepy.tech/badge/tetos)](https://pepy.tech/project/tetos)\n[![Documentation Status](https://readthedocs.org/projects/tetos/badge/?version=latest)](https://tetos.readthedocs.io/latest/?badge=latest)\n\nA unified interface for multiple Text-to-Speech (TTS) providers.\n\n\n## Supported TTS providers\n\n| Provider                                                                                             | Requirements                                                                                                                                                                                                                                                      |\n| ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [Edge-TTS](https://github.com/rany2/edge-tts)                                                        | -                                                                                                                                                                                                                                                                 |\n| [OpenAI TTS](https://platform.openai.com/docs/guides/text-to-speech)                                 | `api_key`: OpenAI API key                                                                                                                                                                                                                                         |\n| [Azure TTS](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/text-to-speech) | `speech_key`: Azure Speech service key<br>`speech_region`: Azure Speech service region                                                                                                                                                                            |\n| [Google TTS](https://cloud.google.com/text-to-speech?hl=zh-CN)                                       | [Enable the Text-to-Speech API in the Google Cloud Console](https://console.developers.google.com/apis/api/texttospeech.googleapis.com/overview?project=586547753837)<br>Set env var `GOOGLE_APPLICATION_CREDENTIALS` as the path to the service account key file |\n| [Volcengine TTS(\u706b\u5c71\u5f15\u64ce)](https://console.volcengine.com/sami)                                      | `access_key`: Volcengine access key ID. ([Get it here](https://console.volcengine.com/iam/keymanage/))<br>`secret_key`: Volcengine access secret key. ([Get it here](https://console.volcengine.com/iam/keymanage/))<br>`app_key`: Volcengine app key             |\n| [Baidu TTS](https://ai.baidu.com/tech/speech/tts)                                                    | `api_key`: Baidu API key<br>`secret_key`: Baidu secret key<br>Both can be acquired at the [console](https://console.bce.baidu.com/ai/#/ai/speech/app/list)                                                                                                        |\n| [Minimax TTS](https://www.minimaxi.com/document/speech-synthesis-engine?id=645e034eeb82db92fba9ac20) | `api_key`: Minimax API key<br>`group_id`: Minimax group ID<br>Both can be acquired at the [Minimax console](https://www.minimaxi.com/user-center/basic-information)                                                                                               |\n| [\u8fc5\u98de TTS](https://www.xfyun.cn/services/online_tts)                                                 | `app_id`: Xunfei APP ID<br>`api_key`: Xunfei API key<br>`api_secret`: Xunfei API secret                                                                                                                                                                           |\n| [Fish Audio](https://fish.audio)                                                                     | `api_key`: Fish Audio API key                                                                                                                                                                                                                                     |\n\n## Installation\n\nTetos requires Python 3.8 or higher.\n\n```bash\npip install tetos\n```\n\n## CLI Usage\n\n```\ntetos PROVIDER [PROVIDER_OPTIONS] TEXT [--output FILE]\n```\n\nPlease run `tetos --help` for available providers and options.\n\nExamples\n\n```\ntetos google \"Hello, world!\"\ntetos azure \"Hello, world!\" --output output.mp3   # save to another file\ntetos edge --lang zh-CN \"\u4f60\u597d\uff0c\u4e16\u754c\uff01\"  # specify language\ntetos openai --voice echo \"Hello, world!\"  # specify voice\n```\n\n## API Usage\n\nUse Azure TTS as an example:\n\n```python\nfrom tetos.azure import AzureSpeaker\n\nspeaker = AzureSpeaker(speech_key='...', speech_region='...')\nspeaker.say('Hello, world!', 'output.mp3')\n```\n\nThe initialization parameters may be different for other providers.\n\n## Work behind a proxy\n\nTeTos respects the proxy environment variables `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY` and `NO_PROXY`.\n\n## TODO\n\n- [x] Google TTS\n- [ ] SSML support\n\n## License\n\n[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)\n\n<!--index end-->\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Unified interface for multiple Text-to-Speech (TTS) providers",
    "version": "0.4.1",
    "project_urls": {
        "Documentation": "https://tetos.readthedocs.io/latest/",
        "Repository": "https://github.com/frostming/tetos"
    },
    "split_keywords": [
        "tts",
        " text-to-speech",
        " speech",
        " audio",
        " ai",
        " nlp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e604a477f7d96e5c9e7d44755c9193afc99277767102f0a421164ee4a6f5be7",
                "md5": "f0a29d2a3ef4f0cf29cbe4a10d540141",
                "sha256": "99717c41aac5047d64349309fb81fedf12be178ffe4d0ab0906f6c9e74bc05ec"
            },
            "downloads": -1,
            "filename": "tetos-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f0a29d2a3ef4f0cf29cbe4a10d540141",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 27408,
            "upload_time": "2024-10-29T11:39:05",
            "upload_time_iso_8601": "2024-10-29T11:39:05.993807Z",
            "url": "https://files.pythonhosted.org/packages/5e/60/4a477f7d96e5c9e7d44755c9193afc99277767102f0a421164ee4a6f5be7/tetos-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2c37c559dfbff265b2dc4fdd95809c32210d9f4523298d71e1db8334d2a0f6af",
                "md5": "e166e95c0c462c21fa3857c748cb6066",
                "sha256": "13e96b604162f630abce17de89a5c10bc903a0045387eb39bdd5e5546e4a29d1"
            },
            "downloads": -1,
            "filename": "tetos-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e166e95c0c462c21fa3857c748cb6066",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 23382,
            "upload_time": "2024-10-29T11:39:07",
            "upload_time_iso_8601": "2024-10-29T11:39:07.272208Z",
            "url": "https://files.pythonhosted.org/packages/2c/37/c559dfbff265b2dc4fdd95809c32210d9f4523298d71e1db8334d2a0f6af/tetos-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-29 11:39:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "frostming",
    "github_project": "tetos",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tetos"
}
        
Elapsed time: 4.18141s