text-to-speech


Nametext-to-speech JSON
Version 1.6.1 PyPI version JSON
download
home_pagehttps://github.com/dewittethomas/text-to-speech
SummaryA versatile and user-friendly Python Text-to-Speech engine
upload_time2023-09-06 20:21:43
maintainer
docs_urlNone
authorThomas Dewitte
requires_python
licenseMIT
keywords sound playsound music wave wav mp3 media song play audio
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Text-to-Speech

[![PyPi Version](https://img.shields.io/pypi/v/text-to-speech.svg)](https://pypi.org/project/text-to-speech/)
[![MIT License](https://img.shields.io/pypi/l/text-to-speech.svg)](https://github.com/dewittethomas/text-to-speech/blob/master/LICENSE)

A versatile and user-friendly Python Text-to-Speech engine with customizable options.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
  - [Basic Usage](#basic-usage)
  - [Parameters](#parameters)
  - [Example with Slow Speech](#example-with-slow-speech)
- [Contributing](#contributing)
- [License](#license)
  
## Installation

You can install the `text-to-speech` module using pip:

```bash
pip install text-to-speech
```

## Usage

### Basic Usage

You can use this module to convert text to speech and save it as an audio file. Here's a basic example:

```python
from text_to_speech import save

text = "Hello, World!"
language = "en"  # Specify the language (IETF language tag)
output_file = "hello_world.mp3"  # Specify the output file (only accepts .mp3)

save(text, language, file=output_file)
```

### Parameters

Here are the available parameters for the `save` function:

| Parameter     | Description                                            | Default Value   |
|---------------|--------------------------------------------------------|-----------------|
| `text`        | The text to be converted to speech.                    |                 |
| `language`    | The language (IETF language tag) to use for speech synthesis. | "en"         |
| `slow`        | Set to `True` if you want the text to be read more slowly. | `False`         |
| `file`        | The name of the output audio file. Only accepts .mp3 format. | "speech.mp3"   |
| `lang_check`  | Set to `True` to check the text for language errors.   | `False`         |

### Example with Slow Speech

You can make the speech slower by setting the `slow` parameter to `True`:

```python
from text_to_speech import save

text = "This is a slow speech example."
language = "en"
output_file = "slow_speech.mp3"

save(text, language, slow=True, file=output_file)
```

## Contributing

Contributions to this project are welcome. If you have any improvements or bug fixes, please submit a pull request.

## License

This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dewittethomas/text-to-speech",
    "name": "text-to-speech",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "sound playsound music wave wav mp3 media song play audio",
    "author": "Thomas Dewitte",
    "author_email": "thomasdewittecontact@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d7/f0/230f3f0ab7e4e5eee130ecdd2271719b574568e92a65ec6d6b6a45a626ee/text_to_speech-1.6.1.tar.gz",
    "platform": null,
    "description": "# Text-to-Speech\r\n\r\n[![PyPi Version](https://img.shields.io/pypi/v/text-to-speech.svg)](https://pypi.org/project/text-to-speech/)\r\n[![MIT License](https://img.shields.io/pypi/l/text-to-speech.svg)](https://github.com/dewittethomas/text-to-speech/blob/master/LICENSE)\r\n\r\nA versatile and user-friendly Python Text-to-Speech engine with customizable options.\r\n\r\n## Table of Contents\r\n\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n  - [Basic Usage](#basic-usage)\r\n  - [Parameters](#parameters)\r\n  - [Example with Slow Speech](#example-with-slow-speech)\r\n- [Contributing](#contributing)\r\n- [License](#license)\r\n  \r\n## Installation\r\n\r\nYou can install the `text-to-speech` module using pip:\r\n\r\n```bash\r\npip install text-to-speech\r\n```\r\n\r\n## Usage\r\n\r\n### Basic Usage\r\n\r\nYou can use this module to convert text to speech and save it as an audio file. Here's a basic example:\r\n\r\n```python\r\nfrom text_to_speech import save\r\n\r\ntext = \"Hello, World!\"\r\nlanguage = \"en\"  # Specify the language (IETF language tag)\r\noutput_file = \"hello_world.mp3\"  # Specify the output file (only accepts .mp3)\r\n\r\nsave(text, language, file=output_file)\r\n```\r\n\r\n### Parameters\r\n\r\nHere are the available parameters for the `save` function:\r\n\r\n| Parameter     | Description                                            | Default Value   |\r\n|---------------|--------------------------------------------------------|-----------------|\r\n| `text`        | The text to be converted to speech.                    |                 |\r\n| `language`    | The language (IETF language tag) to use for speech synthesis. | \"en\"         |\r\n| `slow`        | Set to `True` if you want the text to be read more slowly. | `False`         |\r\n| `file`        | The name of the output audio file. Only accepts .mp3 format. | \"speech.mp3\"   |\r\n| `lang_check`  | Set to `True` to check the text for language errors.   | `False`         |\r\n\r\n### Example with Slow Speech\r\n\r\nYou can make the speech slower by setting the `slow` parameter to `True`:\r\n\r\n```python\r\nfrom text_to_speech import save\r\n\r\ntext = \"This is a slow speech example.\"\r\nlanguage = \"en\"\r\noutput_file = \"slow_speech.mp3\"\r\n\r\nsave(text, language, slow=True, file=output_file)\r\n```\r\n\r\n## Contributing\r\n\r\nContributions to this project are welcome. If you have any improvements or bug fixes, please submit a pull request.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A versatile and user-friendly Python Text-to-Speech engine",
    "version": "1.6.1",
    "project_urls": {
        "Homepage": "https://github.com/dewittethomas/text-to-speech"
    },
    "split_keywords": [
        "sound",
        "playsound",
        "music",
        "wave",
        "wav",
        "mp3",
        "media",
        "song",
        "play",
        "audio"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ca071e501c180d875897e15ecc5e95f4accbc64fb12591d9e8f542684ce02bb",
                "md5": "6ec05b6f83c4f731914868efd0935078",
                "sha256": "2b84b392697c3aa6fb188427db051b29016cbafc0fa4e1a79f73c97038132a53"
            },
            "downloads": -1,
            "filename": "text_to_speech-1.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6ec05b6f83c4f731914868efd0935078",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3694,
            "upload_time": "2023-09-06T20:21:41",
            "upload_time_iso_8601": "2023-09-06T20:21:41.334802Z",
            "url": "https://files.pythonhosted.org/packages/2c/a0/71e501c180d875897e15ecc5e95f4accbc64fb12591d9e8f542684ce02bb/text_to_speech-1.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d7f0230f3f0ab7e4e5eee130ecdd2271719b574568e92a65ec6d6b6a45a626ee",
                "md5": "cdc172fe8dc9f115518e9f4c08dfb57b",
                "sha256": "d639d79669211774de23e364d6fce22b19ff080e2b376a8fdc47765d0e32ea47"
            },
            "downloads": -1,
            "filename": "text_to_speech-1.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "cdc172fe8dc9f115518e9f4c08dfb57b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3452,
            "upload_time": "2023-09-06T20:21:43",
            "upload_time_iso_8601": "2023-09-06T20:21:43.062651Z",
            "url": "https://files.pythonhosted.org/packages/d7/f0/230f3f0ab7e4e5eee130ecdd2271719b574568e92a65ec6d6b6a45a626ee/text_to_speech-1.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-06 20:21:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dewittethomas",
    "github_project": "text-to-speech",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "text-to-speech"
}
        
Elapsed time: 0.13819s