e2-tts-pytorch


Namee2-tts-pytorch JSON
Version 1.0.5 PyPI version JSON
download
home_pageNone
SummaryE2-TTS in Pytorch
upload_time2024-09-11 12:25:44
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2024 Phil Wang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords artificial intelligence attention mechanism deep learning text to speech transformers
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<img src="./e2-tts.png" width="400px"></img>

## E2 TTS - Pytorch

Implementation of E2-TTS, <a href="https://arxiv.org/abs/2406.18009v1">Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS</a>, in Pytorch

The repository differs from the paper in that it uses a <a href="https://arxiv.org/abs/2107.10342">multistream transformer</a> for text and audio, with conditioning done every transformer block in the E2 manner.

## Appreciation

- <a href="https://github.com/manmay-nakhashi">Manmay</a> for contributing <a href="https://github.com/lucidrains/e2-tts-pytorch/pull/1">working end-to-end training code</a>!

- <a href="https://github.com/lucasnewman">Lucas Newman</a> for the code contributions, helpful feedback, and for sharing the first set of positive experiments!

- <a href="https://github.com/JingRH">Jing</a> for sharing the second positive result with a multilingual (English + Chinese) dataset!

- <a href="https://github.com/Coice">Coice</a> and <a href="https://github.com/manmay-nakhashi">Manmay</a> for reporting the third and fourth successful runs. Farewell alignment engineering

## Install

```bash
$ pip install e2-tts-pytorch
```

## Usage

```python
import torch

from e2_tts_pytorch import (
    E2TTS,
    DurationPredictor
)

duration_predictor = DurationPredictor(
    transformer = dict(
        dim = 512,
        depth = 8,
    )
)

mel = torch.randn(2, 1024, 100)
text = ['Hello', 'Goodbye']

loss = duration_predictor(mel, text = text)
loss.backward()

e2tts = E2TTS(
    duration_predictor = duration_predictor,
    transformer = dict(
        dim = 512,
        depth = 8        
    ),
)

out = e2tts(mel, text = text)
out.loss.backward()

sampled = e2tts.sample(mel[:, :5], text = text)

```

## Citations

```bibtex
@inproceedings{Eskimez2024E2TE,
    title   = {E2 TTS: Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS},
    author  = {Sefik Emre Eskimez and Xiaofei Wang and Manthan Thakker and Canrun Li and Chung-Hsien Tsai and Zhen Xiao and Hemin Yang and Zirun Zhu and Min Tang and Xu Tan and Yanqing Liu and Sheng Zhao and Naoyuki Kanda},
    year    = {2024},
    url     = {https://api.semanticscholar.org/CorpusID:270738197}
}
```

```bibtex
@inproceedings{Darcet2023VisionTN,
    title   = {Vision Transformers Need Registers},
    author  = {Timoth'ee Darcet and Maxime Oquab and Julien Mairal and Piotr Bojanowski},
    year    = {2023},
    url     = {https://api.semanticscholar.org/CorpusID:263134283}
}
```

```bibtex
@article{Bao2022AllAW,
    title   = {All are Worth Words: A ViT Backbone for Diffusion Models},
    author  = {Fan Bao and Shen Nie and Kaiwen Xue and Yue Cao and Chongxuan Li and Hang Su and Jun Zhu},
    journal = {2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    year    = {2022},
    pages   = {22669-22679},
    url     = {https://api.semanticscholar.org/CorpusID:253581703}
}
```

```bibtex
@article{Burtsev2021MultiStreamT,
    title     = {Multi-Stream Transformers},
    author    = {Mikhail S. Burtsev and Anna Rumshisky},
    journal   = {ArXiv},
    year      = {2021},
    volume    = {abs/2107.10342},
    url       = {https://api.semanticscholar.org/CorpusID:236171087}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "e2-tts-pytorch",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "artificial intelligence, attention mechanism, deep learning, text to speech, transformers",
    "author": null,
    "author_email": "Phil Wang <lucidrains@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b0/62/996730ead75e04cf6895784ec5c15be6d051aec3aa8fd8b1a79cd2bab268/e2_tts_pytorch-1.0.5.tar.gz",
    "platform": null,
    "description": "\n<img src=\"./e2-tts.png\" width=\"400px\"></img>\n\n## E2 TTS - Pytorch\n\nImplementation of E2-TTS, <a href=\"https://arxiv.org/abs/2406.18009v1\">Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS</a>, in Pytorch\n\nThe repository differs from the paper in that it uses a <a href=\"https://arxiv.org/abs/2107.10342\">multistream transformer</a> for text and audio, with conditioning done every transformer block in the E2 manner.\n\n## Appreciation\n\n- <a href=\"https://github.com/manmay-nakhashi\">Manmay</a> for contributing <a href=\"https://github.com/lucidrains/e2-tts-pytorch/pull/1\">working end-to-end training code</a>!\n\n- <a href=\"https://github.com/lucasnewman\">Lucas Newman</a> for the code contributions, helpful feedback, and for sharing the first set of positive experiments!\n\n- <a href=\"https://github.com/JingRH\">Jing</a> for sharing the second positive result with a multilingual (English + Chinese) dataset!\n\n- <a href=\"https://github.com/Coice\">Coice</a> and <a href=\"https://github.com/manmay-nakhashi\">Manmay</a> for reporting the third and fourth successful runs. Farewell alignment engineering\n\n## Install\n\n```bash\n$ pip install e2-tts-pytorch\n```\n\n## Usage\n\n```python\nimport torch\n\nfrom e2_tts_pytorch import (\n    E2TTS,\n    DurationPredictor\n)\n\nduration_predictor = DurationPredictor(\n    transformer = dict(\n        dim = 512,\n        depth = 8,\n    )\n)\n\nmel = torch.randn(2, 1024, 100)\ntext = ['Hello', 'Goodbye']\n\nloss = duration_predictor(mel, text = text)\nloss.backward()\n\ne2tts = E2TTS(\n    duration_predictor = duration_predictor,\n    transformer = dict(\n        dim = 512,\n        depth = 8        \n    ),\n)\n\nout = e2tts(mel, text = text)\nout.loss.backward()\n\nsampled = e2tts.sample(mel[:, :5], text = text)\n\n```\n\n## Citations\n\n```bibtex\n@inproceedings{Eskimez2024E2TE,\n    title   = {E2 TTS: Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS},\n    author  = {Sefik Emre Eskimez and Xiaofei Wang and Manthan Thakker and Canrun Li and Chung-Hsien Tsai and Zhen Xiao and Hemin Yang and Zirun Zhu and Min Tang and Xu Tan and Yanqing Liu and Sheng Zhao and Naoyuki Kanda},\n    year    = {2024},\n    url     = {https://api.semanticscholar.org/CorpusID:270738197}\n}\n```\n\n```bibtex\n@inproceedings{Darcet2023VisionTN,\n    title   = {Vision Transformers Need Registers},\n    author  = {Timoth'ee Darcet and Maxime Oquab and Julien Mairal and Piotr Bojanowski},\n    year    = {2023},\n    url     = {https://api.semanticscholar.org/CorpusID:263134283}\n}\n```\n\n```bibtex\n@article{Bao2022AllAW,\n    title   = {All are Worth Words: A ViT Backbone for Diffusion Models},\n    author  = {Fan Bao and Shen Nie and Kaiwen Xue and Yue Cao and Chongxuan Li and Hang Su and Jun Zhu},\n    journal = {2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},\n    year    = {2022},\n    pages   = {22669-22679},\n    url     = {https://api.semanticscholar.org/CorpusID:253581703}\n}\n```\n\n```bibtex\n@article{Burtsev2021MultiStreamT,\n    title     = {Multi-Stream Transformers},\n    author    = {Mikhail S. Burtsev and Anna Rumshisky},\n    journal   = {ArXiv},\n    year      = {2021},\n    volume    = {abs/2107.10342},\n    url       = {https://api.semanticscholar.org/CorpusID:236171087}\n}\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Phil Wang  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "E2-TTS in Pytorch",
    "version": "1.0.5",
    "project_urls": {
        "Homepage": "https://pypi.org/project/e2-tts-pytorch/",
        "Repository": "https://github.com/lucidrains/e2-tts-pytorch"
    },
    "split_keywords": [
        "artificial intelligence",
        " attention mechanism",
        " deep learning",
        " text to speech",
        " transformers"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c524e6b4f086d7a0a2ae2604c6679b81089900d5a4b9f965468f170044f4ae9d",
                "md5": "970734ce4e8cc6d532108f7fb1d0ed20",
                "sha256": "e2835cc9144faffdc339147204cb0d6dbedb0f3c01a696c4c2691719f0b99b27"
            },
            "downloads": -1,
            "filename": "e2_tts_pytorch-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "970734ce4e8cc6d532108f7fb1d0ed20",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15959,
            "upload_time": "2024-09-11T12:25:43",
            "upload_time_iso_8601": "2024-09-11T12:25:43.075476Z",
            "url": "https://files.pythonhosted.org/packages/c5/24/e6b4f086d7a0a2ae2604c6679b81089900d5a4b9f965468f170044f4ae9d/e2_tts_pytorch-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b062996730ead75e04cf6895784ec5c15be6d051aec3aa8fd8b1a79cd2bab268",
                "md5": "a0da03b0af6a4ec84c5fc6fff00aca83",
                "sha256": "150fec87f355d3cc65ef765aef293455df48cc1a81400ab0ee64518afee787a8"
            },
            "downloads": -1,
            "filename": "e2_tts_pytorch-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "a0da03b0af6a4ec84c5fc6fff00aca83",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 183899,
            "upload_time": "2024-09-11T12:25:44",
            "upload_time_iso_8601": "2024-09-11T12:25:44.694299Z",
            "url": "https://files.pythonhosted.org/packages/b0/62/996730ead75e04cf6895784ec5c15be6d051aec3aa8fd8b1a79cd2bab268/e2_tts_pytorch-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-11 12:25:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lucidrains",
    "github_project": "e2-tts-pytorch",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "e2-tts-pytorch"
}
        
Elapsed time: 0.36461s