Name | e2-tts-pytorch JSON |
Version |
1.6.3
JSON |
| download |
home_page | None |
Summary | E2-TTS in Pytorch |
upload_time | 2024-12-19 15:41:31 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
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. |
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.
It also includes an improvisation that was proven out by Manmay, where the text is simply interpolated to the length of the audio for conditioning. You can try this by setting `interpolated_text = True` on `E2TTS`
## 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}
}
```
```bibtex
@inproceedings{Sadat2024EliminatingOA,
title = {Eliminating Oversaturation and Artifacts of High Guidance Scales in Diffusion Models},
author = {Seyedmorteza Sadat and Otmar Hilliges and Romann M. Weber},
year = {2024},
url = {https://api.semanticscholar.org/CorpusID:273098845}
}
```
```bibtex
@article{Gulati2020ConformerCT,
title = {Conformer: Convolution-augmented Transformer for Speech Recognition},
author = {Anmol Gulati and James Qin and Chung-Cheng Chiu and Niki Parmar and Yu Zhang and Jiahui Yu and Wei Han and Shibo Wang and Zhengdong Zhang and Yonghui Wu and Ruoming Pang},
journal = {ArXiv},
year = {2020},
volume = {abs/2005.08100},
url = {https://api.semanticscholar.org/CorpusID:218674528}
}
```
```bibtex
@article{Yang2024ConsistencyFM,
title = {Consistency Flow Matching: Defining Straight Flows with Velocity Consistency},
author = {Ling Yang and Zixiang Zhang and Zhilong Zhang and Xingchao Liu and Minkai Xu and Wentao Zhang and Chenlin Meng and Stefano Ermon and Bin Cui},
journal = {ArXiv},
year = {2024},
volume = {abs/2407.02398},
url = {https://api.semanticscholar.org/CorpusID:270878436}
}
```
```bibtex
@article{Li2024SwitchEA,
title = {Switch EMA: A Free Lunch for Better Flatness and Sharpness},
author = {Siyuan Li and Zicheng Liu and Juanxi Tian and Ge Wang and Zedong Wang and Weiyang Jin and Di Wu and Cheng Tan and Tao Lin and Yang Liu and Baigui Sun and Stan Z. Li},
journal = {ArXiv},
year = {2024},
volume = {abs/2402.09240},
url = {https://api.semanticscholar.org/CorpusID:267657558}
}
```
```bibtex
@inproceedings{Zhou2024ValueRL,
title = {Value Residual Learning For Alleviating Attention Concentration In Transformers},
author = {Zhanchao Zhou and Tianyi Wu and Zhiyun Jiang and Zhenzhong Lan},
year = {2024},
url = {https://api.semanticscholar.org/CorpusID:273532030}
}
```
```bibtex
@inproceedings{Duvvuri2024LASERAW,
title = {LASER: Attention with Exponential Transformation},
author = {Sai Surya Duvvuri and Inderjit S. Dhillon},
year = {2024},
url = {https://api.semanticscholar.org/CorpusID:273849947}
}
```
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/cf/2f/b67f7535db900685245f2afa1d7f7fe2f89a0aebf32e3101d06e8276f129/e2_tts_pytorch-1.6.3.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\nIt also includes an improvisation that was proven out by Manmay, where the text is simply interpolated to the length of the audio for conditioning. You can try this by setting `interpolated_text = True` on `E2TTS`\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\n```bibtex\n@inproceedings{Sadat2024EliminatingOA,\n title = {Eliminating Oversaturation and Artifacts of High Guidance Scales in Diffusion Models},\n author = {Seyedmorteza Sadat and Otmar Hilliges and Romann M. Weber},\n year = {2024},\n url = {https://api.semanticscholar.org/CorpusID:273098845}\n}\n```\n\n```bibtex\n@article{Gulati2020ConformerCT,\n title = {Conformer: Convolution-augmented Transformer for Speech Recognition},\n author = {Anmol Gulati and James Qin and Chung-Cheng Chiu and Niki Parmar and Yu Zhang and Jiahui Yu and Wei Han and Shibo Wang and Zhengdong Zhang and Yonghui Wu and Ruoming Pang},\n journal = {ArXiv},\n year = {2020},\n volume = {abs/2005.08100},\n url = {https://api.semanticscholar.org/CorpusID:218674528}\n}\n```\n\n```bibtex\n@article{Yang2024ConsistencyFM,\n title = {Consistency Flow Matching: Defining Straight Flows with Velocity Consistency},\n author = {Ling Yang and Zixiang Zhang and Zhilong Zhang and Xingchao Liu and Minkai Xu and Wentao Zhang and Chenlin Meng and Stefano Ermon and Bin Cui},\n journal = {ArXiv},\n year = {2024},\n volume = {abs/2407.02398},\n url = {https://api.semanticscholar.org/CorpusID:270878436}\n}\n```\n\n```bibtex\n@article{Li2024SwitchEA,\n title = {Switch EMA: A Free Lunch for Better Flatness and Sharpness},\n author = {Siyuan Li and Zicheng Liu and Juanxi Tian and Ge Wang and Zedong Wang and Weiyang Jin and Di Wu and Cheng Tan and Tao Lin and Yang Liu and Baigui Sun and Stan Z. Li},\n journal = {ArXiv},\n year = {2024},\n volume = {abs/2402.09240},\n url = {https://api.semanticscholar.org/CorpusID:267657558}\n}\n```\n\n```bibtex\n@inproceedings{Zhou2024ValueRL,\n title = {Value Residual Learning For Alleviating Attention Concentration In Transformers},\n author = {Zhanchao Zhou and Tianyi Wu and Zhiyun Jiang and Zhenzhong Lan},\n year = {2024},\n url = {https://api.semanticscholar.org/CorpusID:273532030}\n}\n```\n\n```bibtex\n@inproceedings{Duvvuri2024LASERAW,\n title = {LASER: Attention with Exponential Transformation},\n author = {Sai Surya Duvvuri and Inderjit S. Dhillon},\n year = {2024},\n url = {https://api.semanticscholar.org/CorpusID:273849947}\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.6.3",
"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": "9ead223df0fdfd52982063780753c8a2f082341f4364bab126d09a8d28c10efe",
"md5": "d8bb5b3d6c1623fe5096248a3bef9bde",
"sha256": "b02cb17d373cd28c8f3a0729cf7fb5acd0a2a02c8ba97632253937ef4f1be708"
},
"downloads": -1,
"filename": "e2_tts_pytorch-1.6.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d8bb5b3d6c1623fe5096248a3bef9bde",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 18345,
"upload_time": "2024-12-19T15:41:29",
"upload_time_iso_8601": "2024-12-19T15:41:29.184378Z",
"url": "https://files.pythonhosted.org/packages/9e/ad/223df0fdfd52982063780753c8a2f082341f4364bab126d09a8d28c10efe/e2_tts_pytorch-1.6.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cf2fb67f7535db900685245f2afa1d7f7fe2f89a0aebf32e3101d06e8276f129",
"md5": "1dee4bce613fe82ec5b36592ae16ecdc",
"sha256": "307c49ae55a51173d1f09c5a48a3fa5ed3a741776ad6130c0c5ea8fb0a289ad6"
},
"downloads": -1,
"filename": "e2_tts_pytorch-1.6.3.tar.gz",
"has_sig": false,
"md5_digest": "1dee4bce613fe82ec5b36592ae16ecdc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 186254,
"upload_time": "2024-12-19T15:41:31",
"upload_time_iso_8601": "2024-12-19T15:41:31.780770Z",
"url": "https://files.pythonhosted.org/packages/cf/2f/b67f7535db900685245f2afa1d7f7fe2f89a0aebf32e3101d06e8276f129/e2_tts_pytorch-1.6.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-19 15:41:31",
"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"
}