├── .gitignore ├── setup.py ├── image_webui.png ├── bark ├── assets │ └── prompts │ │ ├── announcer.npz │ │ ├── speaker_0.npz │ │ ├── speaker_1.npz │ │ ├── speaker_2.npz │ │ ├── speaker_3.npz │ │ ├── speaker_4.npz │ │ ├── speaker_5.npz │ │ ├── speaker_6.npz │ │ ├── speaker_7.npz │ │ ├── speaker_8.npz │ │ ├── speaker_9.npz │ │ ├── de_speaker_0.npz │ │ ├── de_speaker_1.npz │ │ ├── de_speaker_2.npz │ │ ├── de_speaker_3.npz │ │ ├── de_speaker_4.npz │ │ ├── de_speaker_5.npz │ │ ├── de_speaker_6.npz │ │ ├── de_speaker_7.npz │ │ ├── de_speaker_8.npz │ │ ├── de_speaker_9.npz │ │ ├── en_speaker_0.npz │ │ ├── en_speaker_1.npz │ │ ├── en_speaker_2.npz │ │ ├── en_speaker_3.npz │ │ ├── en_speaker_4.npz │ │ ├── en_speaker_5.npz │ │ ├── en_speaker_6.npz │ │ ├── en_speaker_7.npz │ │ ├── en_speaker_8.npz │ │ ├── en_speaker_9.npz │ │ ├── es_speaker_0.npz │ │ ├── es_speaker_1.npz │ │ ├── es_speaker_2.npz │ │ ├── es_speaker_3.npz │ │ ├── es_speaker_4.npz │ │ ├── es_speaker_5.npz │ │ ├── es_speaker_6.npz │ │ ├── es_speaker_7.npz │ │ ├── es_speaker_8.npz │ │ ├── es_speaker_9.npz │ │ ├── fr_speaker_0.npz │ │ ├── fr_speaker_1.npz │ │ ├── fr_speaker_2.npz │ │ ├── fr_speaker_3.npz │ │ ├── fr_speaker_4.npz │ │ ├── fr_speaker_5.npz │ │ ├── fr_speaker_6.npz │ │ ├── fr_speaker_7.npz │ │ ├── fr_speaker_8.npz │ │ ├── fr_speaker_9.npz │ │ ├── hi_speaker_0.npz │ │ ├── hi_speaker_1.npz │ │ ├── hi_speaker_2.npz │ │ ├── hi_speaker_3.npz │ │ ├── hi_speaker_4.npz │ │ ├── hi_speaker_5.npz │ │ ├── hi_speaker_6.npz │ │ ├── hi_speaker_7.npz │ │ ├── hi_speaker_8.npz │ │ ├── hi_speaker_9.npz │ │ ├── it_speaker_0.npz │ │ ├── it_speaker_1.npz │ │ ├── it_speaker_2.npz │ │ ├── it_speaker_3.npz │ │ ├── it_speaker_4.npz │ │ ├── it_speaker_5.npz │ │ ├── it_speaker_6.npz │ │ ├── it_speaker_7.npz │ │ ├── it_speaker_8.npz │ │ ├── it_speaker_9.npz │ │ ├── ja_speaker_0.npz │ │ ├── ja_speaker_1.npz │ │ ├── ja_speaker_2.npz │ │ ├── ja_speaker_3.npz │ │ ├── ja_speaker_4.npz │ │ ├── ja_speaker_5.npz │ │ ├── ja_speaker_6.npz │ │ ├── ja_speaker_7.npz │ │ ├── ja_speaker_8.npz │ │ ├── ja_speaker_9.npz │ │ ├── ko_speaker_0.npz │ │ ├── ko_speaker_1.npz │ │ ├── ko_speaker_2.npz │ │ ├── ko_speaker_3.npz │ │ ├── ko_speaker_4.npz │ │ ├── ko_speaker_5.npz │ │ ├── ko_speaker_6.npz │ │ ├── ko_speaker_7.npz │ │ ├── ko_speaker_8.npz │ │ ├── ko_speaker_9.npz │ │ ├── pl_speaker_0.npz │ │ ├── pl_speaker_1.npz │ │ ├── pl_speaker_2.npz │ │ ├── pl_speaker_3.npz │ │ ├── pl_speaker_4.npz │ │ ├── pl_speaker_5.npz │ │ ├── pl_speaker_6.npz │ │ ├── pl_speaker_7.npz │ │ ├── pl_speaker_8.npz │ │ ├── pl_speaker_9.npz │ │ ├── pt_speaker_0.npz │ │ ├── pt_speaker_1.npz │ │ ├── pt_speaker_2.npz │ │ ├── pt_speaker_3.npz │ │ ├── pt_speaker_4.npz │ │ ├── pt_speaker_5.npz │ │ ├── pt_speaker_6.npz │ │ ├── pt_speaker_7.npz │ │ ├── pt_speaker_8.npz │ │ ├── pt_speaker_9.npz │ │ ├── ru_speaker_0.npz │ │ ├── ru_speaker_1.npz │ │ ├── ru_speaker_2.npz │ │ ├── ru_speaker_3.npz │ │ ├── ru_speaker_4.npz │ │ ├── ru_speaker_5.npz │ │ ├── ru_speaker_6.npz │ │ ├── ru_speaker_7.npz │ │ ├── ru_speaker_8.npz │ │ ├── ru_speaker_9.npz │ │ ├── tr_speaker_0.npz │ │ ├── tr_speaker_1.npz │ │ ├── tr_speaker_2.npz │ │ ├── tr_speaker_3.npz │ │ ├── tr_speaker_4.npz │ │ ├── tr_speaker_5.npz │ │ ├── tr_speaker_6.npz │ │ ├── tr_speaker_7.npz │ │ ├── tr_speaker_8.npz │ │ ├── tr_speaker_9.npz │ │ ├── zh_speaker_0.npz │ │ ├── zh_speaker_1.npz │ │ ├── zh_speaker_2.npz │ │ ├── zh_speaker_3.npz │ │ ├── zh_speaker_4.npz │ │ ├── zh_speaker_5.npz │ │ ├── zh_speaker_6.npz │ │ ├── zh_speaker_7.npz │ │ ├── zh_speaker_8.npz │ │ ├── zh_speaker_9.npz │ │ └── readme.md ├── __init__.py ├── api.py ├── model_fine.py ├── model.py └── generation.py ├── download_models.py ├── README.md ├── pyproject.toml ├── webui.py ├── model-card.md ├── LICENSE └── notebooks └── fake_classifier.ipynb /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | outputs/ -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup() 4 | -------------------------------------------------------------------------------- /image_webui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/image_webui.png -------------------------------------------------------------------------------- /bark/assets/prompts/announcer.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/announcer.npz -------------------------------------------------------------------------------- /bark/assets/prompts/speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/de_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/de_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/de_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/de_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/de_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/de_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/de_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/de_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/de_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/de_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/de_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/de_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/de_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/de_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/de_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/de_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/de_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/de_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/de_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/de_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/en_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/en_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/en_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/en_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/en_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/en_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/en_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/en_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/en_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/en_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/en_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/en_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/en_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/en_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/en_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/en_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/en_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/en_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/en_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/en_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/es_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/es_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/es_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/es_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/es_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/es_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/es_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/es_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/es_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/es_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/es_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/es_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/es_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/es_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/es_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/es_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/es_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/es_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/es_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/es_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/fr_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/fr_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/fr_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/fr_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/fr_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/fr_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/fr_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/fr_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/fr_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/fr_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/fr_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/fr_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/fr_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/fr_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/fr_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/fr_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/fr_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/fr_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/fr_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/fr_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/hi_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/hi_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/hi_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/hi_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/hi_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/hi_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/hi_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/hi_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/hi_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/hi_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/hi_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/hi_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/hi_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/hi_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/hi_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/hi_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/hi_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/hi_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/hi_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/hi_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/it_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/it_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/it_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/it_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/it_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/it_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/it_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/it_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/it_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/it_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/it_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/it_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/it_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/it_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/it_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/it_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/it_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/it_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/it_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/it_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ja_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ja_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ja_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ja_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ja_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ja_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ja_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ja_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ja_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ja_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ja_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ja_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ja_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ja_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ja_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ja_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ja_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ja_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ja_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ja_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ko_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ko_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ko_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ko_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ko_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ko_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ko_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ko_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ko_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ko_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ko_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ko_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ko_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ko_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ko_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ko_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ko_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ko_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ko_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ko_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pl_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pl_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pl_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pl_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pl_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pl_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pl_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pl_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pl_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pl_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pl_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pl_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pl_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pl_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pl_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pl_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pl_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pl_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pl_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pl_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pt_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pt_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pt_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pt_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pt_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pt_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pt_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pt_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pt_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pt_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pt_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pt_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pt_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pt_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pt_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pt_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pt_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pt_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/pt_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/pt_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ru_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ru_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ru_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ru_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ru_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ru_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ru_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ru_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ru_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ru_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ru_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ru_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ru_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ru_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ru_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ru_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ru_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ru_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/ru_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/ru_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/tr_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/tr_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/tr_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/tr_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/tr_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/tr_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/tr_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/tr_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/tr_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/tr_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/tr_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/tr_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/tr_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/tr_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/tr_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/tr_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/tr_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/tr_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/tr_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/tr_speaker_9.npz -------------------------------------------------------------------------------- /bark/assets/prompts/zh_speaker_0.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/zh_speaker_0.npz -------------------------------------------------------------------------------- /bark/assets/prompts/zh_speaker_1.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/zh_speaker_1.npz -------------------------------------------------------------------------------- /bark/assets/prompts/zh_speaker_2.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/zh_speaker_2.npz -------------------------------------------------------------------------------- /bark/assets/prompts/zh_speaker_3.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/zh_speaker_3.npz -------------------------------------------------------------------------------- /bark/assets/prompts/zh_speaker_4.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/zh_speaker_4.npz -------------------------------------------------------------------------------- /bark/assets/prompts/zh_speaker_5.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/zh_speaker_5.npz -------------------------------------------------------------------------------- /bark/assets/prompts/zh_speaker_6.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/zh_speaker_6.npz -------------------------------------------------------------------------------- /bark/assets/prompts/zh_speaker_7.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/zh_speaker_7.npz -------------------------------------------------------------------------------- /bark/assets/prompts/zh_speaker_8.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/zh_speaker_8.npz -------------------------------------------------------------------------------- /bark/assets/prompts/zh_speaker_9.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makawy7/bark-webui/HEAD/bark/assets/prompts/zh_speaker_9.npz -------------------------------------------------------------------------------- /bark/__init__.py: -------------------------------------------------------------------------------- 1 | from .api import generate_audio, text_to_semantic, semantic_to_waveform, save_as_prompt 2 | from .generation import SAMPLE_RATE, preload_models 3 | -------------------------------------------------------------------------------- /download_models.py: -------------------------------------------------------------------------------- 1 | from bark.generation import _download, _get_ckpt_path, REMOTE_MODEL_PATHS 2 | 3 | 4 | 5 | _download(REMOTE_MODEL_PATHS["text"]["path"], _get_ckpt_path("text")) 6 | _download(REMOTE_MODEL_PATHS["text"]["path"], _get_ckpt_path("text")) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bark Web UI 2 | 3 | ![This is the web UI for the Bark Text-to-Speech.](./image_webui.png) 4 | 5 | ### Installation 6 | 7 | - `git clone https://github.com/makawy7/bark-webui` 8 | - `pip install .` 9 | - `pip install gradio` 10 | 11 | ### Usage 12 | 13 | - `python webui.py` 14 | 15 | Check out the [Bark](https://github.com/suno-ai/bark) for prompts and more information. 16 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools"] 3 | build-backend = "setuptools.build_meta" 4 | 5 | [project] 6 | name = "suno-bark" 7 | version = "0.0.1a" 8 | description = "Bark text to audio model" 9 | readme = "README.md" 10 | requires-python = ">=3.8" 11 | authors = [ 12 | {name = "Suno Inc", email = "hello@suno.ai"}, 13 | ] 14 | # Apache 2.0 15 | license = {file = "LICENSE"} 16 | 17 | dependencies = [ 18 | "boto3", 19 | "encodec", 20 | "funcy", 21 | "numpy", 22 | "scipy", 23 | "tokenizers", 24 | "torch", 25 | "tqdm", 26 | "transformers", 27 | ] 28 | 29 | [project.urls] 30 | source = "https://github.com/suno-ai/bark" 31 | 32 | [project.optional-dependencies] 33 | dev = [ 34 | "bandit", 35 | "black", 36 | "codecov", 37 | "flake8", 38 | "huggingface-hub", 39 | "hypothesis>=6.14,<7", 40 | "isort>=5.0.0,<6", 41 | "jupyter", 42 | "mypy", 43 | "nbconvert", 44 | "nbformat", 45 | "pydocstyle", 46 | "pylint", 47 | "pytest", 48 | "pytest-cov", 49 | ] 50 | 51 | [tool.setuptools] 52 | packages = ["bark"] 53 | 54 | [tool.setuptools.package-data] 55 | bark = ["assets/prompts/*.npz"] 56 | 57 | [tool.black] 58 | line-length = 100 59 | -------------------------------------------------------------------------------- /bark/assets/prompts/readme.md: -------------------------------------------------------------------------------- 1 | # Example Prompts Data 2 | 3 | The provided data is in the .npz format, which is a file format used in Python for storing arrays and data. The data contains three arrays: semantic_prompt, coarse_prompt, and fine_prompt. 4 | 5 | ```semantic_prompt``` 6 | 7 | The semantic_prompt array contains a sequence of token IDs generated by the BERT tokenizer from Hugging Face. These tokens encode the text input and are used as an input to generate the audio output. The shape of this array is (n,), where n is the number of tokens in the input text. 8 | 9 | ```coarse_prompt``` 10 | 11 | The coarse_prompt array is an intermediate output of the text-to-speech pipeline, and contains token IDs generated by the first two codebooks of the EnCodec Codec from Facebook. This step converts the semantic tokens into a different representation that is better suited for the subsequent step. The shape of this array is (2, m), where m is the number of tokens after conversion by the EnCodec Codec. 12 | 13 | ```fine_prompt``` 14 | 15 | The fine_prompt array is a further processed output of the pipeline, and contains 8 codebooks from the EnCodec Codec. These codebooks represent the final stage of tokenization, and the resulting tokens are used to generate the audio output. The shape of this array is (8, p), where p is the number of tokens after further processing by the EnCodec Codec. 16 | 17 | Overall, these arrays represent different stages of a text-to-speech pipeline that converts text input into synthesized audio output. The semantic_prompt array represents the input text, while coarse_prompt and fine_prompt represent intermediate and final stages of tokenization, respectively. 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /webui.py: -------------------------------------------------------------------------------- 1 | import gradio as gr 2 | from bark.generation import SUPPORTED_LANGS 3 | from bark import SAMPLE_RATE, generate_audio 4 | from scipy.io.wavfile import write as write_wav 5 | import os 6 | from datetime import datetime 7 | 8 | 9 | def generate_text_to_speech(text_prompt, selected_speaker, text_temp, waveform_temp): 10 | audio_array = generate_audio(text_prompt, selected_speaker, text_temp, waveform_temp) 11 | 12 | now = datetime.now() 13 | date_str = now.strftime("%m-%d-%Y") 14 | time_str = now.strftime("%H-%M-%S") 15 | 16 | outputs_folder = os.path.join(os.getcwd(), "outputs") 17 | if not os.path.exists(outputs_folder): 18 | os.makedirs(outputs_folder) 19 | 20 | sub_folder = os.path.join(outputs_folder, date_str) 21 | if not os.path.exists(sub_folder): 22 | os.makedirs(sub_folder) 23 | 24 | file_name = f"audio_{time_str}.wav" 25 | file_path = os.path.join(sub_folder, file_name) 26 | write_wav(file_path, SAMPLE_RATE, audio_array) 27 | 28 | return file_path 29 | 30 | 31 | speakers_list = [] 32 | 33 | for lang, code in SUPPORTED_LANGS: 34 | for n in range(10): 35 | speakers_list.append(f"{code}_speaker_{n}") 36 | 37 | input_text = gr.Textbox(label="Input Text", lines=4, placeholder="Enter text here...") 38 | text_temp = gr.Slider( 39 | 0.1, 40 | 1.0, 41 | value=0.7, 42 | label="Generation Temperature", 43 | info="1.0 more diverse, 0.1 more conservative", 44 | ) 45 | waveform_temp = gr.Slider( 46 | 0.1, 1.0, value=0.7, label="Waveform temperature", info="1.0 more diverse, 0.1 more conservative" 47 | ) 48 | output_audio = gr.Audio(label="Generated Audio", type="filepath") 49 | speaker = gr.Dropdown(speakers_list, value=speakers_list[0], label="Acoustic Prompt") 50 | 51 | 52 | interface = gr.Interface( 53 | fn=generate_text_to_speech, 54 | inputs=[input_text, speaker, text_temp, waveform_temp], 55 | outputs=output_audio, 56 | title="Text-to-Speech using Bark", 57 | description="A simple Bark TTS Web UI.", 58 | ) 59 | 60 | interface.launch() 61 | -------------------------------------------------------------------------------- /model-card.md: -------------------------------------------------------------------------------- 1 | # Model Card: Bark 2 | 3 | This is the official codebase for running the text to audio model, from Suno.ai. 4 | 5 | The following is additional information about the models released here. 6 | 7 | ## Model Details 8 | 9 | Bark is a series of three transformer models that turn text into audio. 10 | ### Text to semantic tokens 11 | - Input: text, tokenized with [BERT tokenizer from Hugging Face](https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer) 12 | - Output: semantic tokens that encode the audio to be generated 13 | 14 | ### Semantic to coarse tokens 15 | - Input: semantic tokens 16 | - Output: tokens from the first two codebooks of the [EnCodec Codec](https://github.com/facebookresearch/encodec) from facebook 17 | 18 | ### Coarse to fine tokens 19 | - Input: the first two codebooks from EnCodec 20 | - Output: 8 codebooks from EnCodec 21 | 22 | ### Architecture 23 | | Model | Parameters | Attention | Output Vocab size | 24 | |:-------------------------:|:----------:|------------|:-----------------:| 25 | | Text to semantic tokens | 80 M | Causal | 10,000 | 26 | | Semantic to coarse tokens | 80 M | Causal | 2x 1,024 | 27 | | Coarse to fine tokens | 80 M | Non-causal | 6x 1,024 | 28 | 29 | 30 | ### Release date 31 | April 2023 32 | 33 | ## Broader Implications 34 | We anticipate that this model's text to audio capabilities can be used to improve accessbility tools in a variety of languages. 35 | Straightforward improvements will allow models to run faster than realtime, rendering them useful for applications such as virtual assistants. 36 | 37 | While we hope that this release will enable users to express their creativity and build applications that are a force 38 | for good, we acknowledge that any text to audio model has the potential for dual use. While it is not straightforward 39 | to voice clone known people with Bark, they can still be used for nefarious purposes. To further reduce the chances of unintended use of Bark, 40 | we also release a simple classifier to detect Bark-generated audio with high accuracy (see notebooks section of the main repository). 41 | -------------------------------------------------------------------------------- /bark/api.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | import numpy as np 4 | 5 | from .generation import codec_decode, generate_coarse, generate_fine, generate_text_semantic 6 | 7 | 8 | def text_to_semantic( 9 | text: str, 10 | history_prompt: Optional[str] = None, 11 | temp: float = 0.7, 12 | silent: bool = False, 13 | ): 14 | """Generate semantic array from text. 15 | 16 | Args: 17 | text: text to be turned into audio 18 | history_prompt: history choice for audio cloning 19 | temp: generation temperature (1.0 more diverse, 0.0 more conservative) 20 | silent: disable progress bar 21 | 22 | Returns: 23 | numpy semantic array to be fed into `semantic_to_waveform` 24 | """ 25 | x_semantic = generate_text_semantic( 26 | text, 27 | history_prompt=history_prompt, 28 | temp=temp, 29 | silent=silent, 30 | ) 31 | return x_semantic 32 | 33 | 34 | def semantic_to_waveform( 35 | semantic_tokens: np.ndarray, 36 | history_prompt: Optional[str] = None, 37 | temp: float = 0.7, 38 | silent: bool = False, 39 | output_full: bool = False, 40 | ): 41 | """Generate audio array from semantic input. 42 | 43 | Args: 44 | semantic_tokens: semantic token output from `text_to_semantic` 45 | history_prompt: history choice for audio cloning 46 | temp: generation temperature (1.0 more diverse, 0.0 more conservative) 47 | silent: disable progress bar 48 | output_full: return full generation to be used as a history prompt 49 | 50 | Returns: 51 | numpy audio array at sample frequency 24khz 52 | """ 53 | coarse_tokens = generate_coarse( 54 | semantic_tokens, 55 | history_prompt=history_prompt, 56 | temp=temp, 57 | silent=silent, 58 | ) 59 | fine_tokens = generate_fine( 60 | coarse_tokens, 61 | history_prompt=history_prompt, 62 | temp=0.5, 63 | ) 64 | audio_arr = codec_decode(fine_tokens) 65 | if output_full: 66 | full_generation = { 67 | "semantic_prompt": semantic_tokens, 68 | "coarse_prompt": coarse_tokens, 69 | "fine_prompt": fine_tokens, 70 | } 71 | return full_generation, audio_arr 72 | return audio_arr 73 | 74 | 75 | def save_as_prompt(filepath, full_generation): 76 | assert(filepath.endswith(".npz")) 77 | assert(isinstance(full_generation, dict)) 78 | assert("semantic_prompt" in full_generation) 79 | assert("coarse_prompt" in full_generation) 80 | assert("fine_prompt" in full_generation) 81 | np.savez(filepath, **full_generation) 82 | 83 | 84 | def generate_audio( 85 | text: str, 86 | history_prompt: Optional[str] = None, 87 | text_temp: float = 0.7, 88 | waveform_temp: float = 0.7, 89 | silent: bool = False, 90 | output_full: bool = False, 91 | ): 92 | """Generate audio array from input text. 93 | 94 | Args: 95 | text: text to be turned into audio 96 | history_prompt: history choice for audio cloning 97 | text_temp: generation temperature (1.0 more diverse, 0.0 more conservative) 98 | waveform_temp: generation temperature (1.0 more diverse, 0.0 more conservative) 99 | silent: disable progress bar 100 | output_full: return full generation to be used as a history prompt 101 | 102 | Returns: 103 | numpy audio array at sample frequency 24khz 104 | """ 105 | semantic_tokens = text_to_semantic( 106 | text, history_prompt=history_prompt, temp=text_temp, silent=silent, 107 | ) 108 | out = semantic_to_waveform( 109 | semantic_tokens, 110 | history_prompt=history_prompt, 111 | temp=waveform_temp, 112 | silent=silent, 113 | output_full=output_full, 114 | ) 115 | if output_full: 116 | full_generation, audio_arr = out 117 | return full_generation, audio_arr 118 | else: 119 | audio_arr = out 120 | return audio_arr 121 | -------------------------------------------------------------------------------- /bark/model_fine.py: -------------------------------------------------------------------------------- 1 | """ 2 | Much of this code is adapted from Andrej Karpathy's NanoGPT 3 | (https://github.com/karpathy/nanoGPT) 4 | """ 5 | from dataclasses import dataclass 6 | import math 7 | 8 | import torch 9 | import torch.nn as nn 10 | from torch.nn import functional as F 11 | 12 | from .model import GPT, GPTConfig, MLP 13 | 14 | 15 | class NonCausalSelfAttention(nn.Module): 16 | def __init__(self, config): 17 | super().__init__() 18 | assert config.n_embd % config.n_head == 0 19 | # key, query, value projections for all heads, but in a batch 20 | self.c_attn = nn.Linear(config.n_embd, 3 * config.n_embd, bias=config.bias) 21 | # output projection 22 | self.c_proj = nn.Linear(config.n_embd, config.n_embd, bias=config.bias) 23 | # regularization 24 | self.attn_dropout = nn.Dropout(config.dropout) 25 | self.resid_dropout = nn.Dropout(config.dropout) 26 | self.n_head = config.n_head 27 | self.n_embd = config.n_embd 28 | self.dropout = config.dropout 29 | # flash attention make GPU go brrrrr but support is only in PyTorch nightly and still a bit scary 30 | self.flash = ( 31 | hasattr(torch.nn.functional, "scaled_dot_product_attention") and self.dropout == 0.0 32 | ) 33 | 34 | def forward(self, x): 35 | B, T, C = x.size() # batch size, sequence length, embedding dimensionality (n_embd) 36 | 37 | # calculate query, key, values for all heads in batch and move head forward to be the batch dim 38 | q, k, v = self.c_attn(x).split(self.n_embd, dim=2) 39 | k = k.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs) 40 | q = q.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs) 41 | v = v.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs) 42 | 43 | # causal self-attention; Self-attend: (B, nh, T, hs) x (B, nh, hs, T) -> (B, nh, T, T) 44 | if self.flash: 45 | # efficient attention using Flash Attention CUDA kernels 46 | y = torch.nn.functional.scaled_dot_product_attention( 47 | q, k, v, attn_mask=None, dropout_p=self.dropout, is_causal=False 48 | ) 49 | else: 50 | # manual implementation of attention 51 | att = (q @ k.transpose(-2, -1)) * (1.0 / math.sqrt(k.size(-1))) 52 | att = F.softmax(att, dim=-1) 53 | att = self.attn_dropout(att) 54 | y = att @ v # (B, nh, T, T) x (B, nh, T, hs) -> (B, nh, T, hs) 55 | y = ( 56 | y.transpose(1, 2).contiguous().view(B, T, C) 57 | ) # re-assemble all head outputs side by side 58 | 59 | # output projection 60 | y = self.resid_dropout(self.c_proj(y)) 61 | return y 62 | 63 | 64 | class FineBlock(nn.Module): 65 | def __init__(self, config): 66 | super().__init__() 67 | self.ln_1 = nn.LayerNorm(config.n_embd) 68 | self.attn = NonCausalSelfAttention(config) 69 | self.ln_2 = nn.LayerNorm(config.n_embd) 70 | self.mlp = MLP(config) 71 | 72 | def forward(self, x): 73 | x = x + self.attn(self.ln_1(x)) 74 | x = x + self.mlp(self.ln_2(x)) 75 | return x 76 | 77 | 78 | class FineGPT(GPT): 79 | def __init__(self, config): 80 | super().__init__(config) 81 | del self.lm_head 82 | self.config = config 83 | self.n_codes_total = config.n_codes_total 84 | self.transformer = nn.ModuleDict( 85 | dict( 86 | wtes=nn.ModuleList( 87 | [ 88 | nn.Embedding(config.input_vocab_size, config.n_embd) 89 | for _ in range(config.n_codes_total) 90 | ] 91 | ), 92 | wpe=nn.Embedding(config.block_size, config.n_embd), 93 | drop=nn.Dropout(config.dropout), 94 | h=nn.ModuleList([FineBlock(config) for _ in range(config.n_layer)]), 95 | ln_f=nn.LayerNorm(config.n_embd), 96 | ) 97 | ) 98 | self.lm_heads = nn.ModuleList( 99 | [ 100 | nn.Linear(config.n_embd, config.output_vocab_size, bias=False) 101 | for _ in range(config.n_codes_given, self.n_codes_total) 102 | ] 103 | ) 104 | for i in range(self.n_codes_total - config.n_codes_given): 105 | self.transformer.wtes[i + 1].weight = self.lm_heads[i].weight 106 | 107 | def forward(self, pred_idx, idx): 108 | device = idx.device 109 | b, t, codes = idx.size() 110 | assert ( 111 | t <= self.config.block_size 112 | ), f"Cannot forward sequence of length {t}, block size is only {self.config.block_size}" 113 | assert pred_idx > 0, "cannot predict 0th codebook" 114 | assert codes == self.n_codes_total, (b, t, codes) 115 | pos = torch.arange(0, t, dtype=torch.long, device=device).unsqueeze(0) # shape (1, t) 116 | 117 | # forward the GPT model itself 118 | tok_embs = [ 119 | wte(idx[:, :, i]).unsqueeze(-1) for i, wte in enumerate(self.transformer.wtes) 120 | ] # token embeddings of shape (b, t, n_embd) 121 | tok_emb = torch.cat(tok_embs, dim=-1) 122 | pos_emb = self.transformer.wpe(pos) # position embeddings of shape (1, t, n_embd) 123 | x = tok_emb[:, :, :, : pred_idx + 1].sum(dim=-1) 124 | x = self.transformer.drop(x + pos_emb) 125 | for block in self.transformer.h: 126 | x = block(x) 127 | x = self.transformer.ln_f(x) 128 | logits = self.lm_heads[pred_idx - self.config.n_codes_given](x) 129 | return logits 130 | 131 | def get_num_params(self, non_embedding=True): 132 | """ 133 | Return the number of parameters in the model. 134 | For non-embedding count (default), the position embeddings get subtracted. 135 | The token embeddings would too, except due to the parameter sharing these 136 | params are actually used as weights in the final layer, so we include them. 137 | """ 138 | n_params = sum(p.numel() for p in self.parameters()) 139 | if non_embedding: 140 | for wte in self.transformer.wtes: 141 | n_params -= wte.weight.numel() 142 | n_params -= self.transformer.wpe.weight.numel() 143 | return n_params 144 | 145 | 146 | @dataclass 147 | class FineGPTConfig(GPTConfig): 148 | n_codes_total: int = 8 149 | n_codes_given: int = 1 150 | -------------------------------------------------------------------------------- /bark/model.py: -------------------------------------------------------------------------------- 1 | """ 2 | Much of this code is adapted from Andrej Karpathy's NanoGPT 3 | (https://github.com/karpathy/nanoGPT) 4 | """ 5 | import math 6 | from dataclasses import dataclass 7 | 8 | import torch 9 | import torch.nn as nn 10 | from torch.nn import functional as F 11 | 12 | class LayerNorm(nn.Module): 13 | """ LayerNorm but with an optional bias. PyTorch doesn't support simply bias=False """ 14 | 15 | def __init__(self, ndim, bias): 16 | super().__init__() 17 | self.weight = nn.Parameter(torch.ones(ndim)) 18 | self.bias = nn.Parameter(torch.zeros(ndim)) if bias else None 19 | 20 | def forward(self, input): 21 | return F.layer_norm(input, self.weight.shape, self.weight, self.bias, 1e-5) 22 | 23 | class CausalSelfAttention(nn.Module): 24 | 25 | def __init__(self, config): 26 | super().__init__() 27 | assert config.n_embd % config.n_head == 0 28 | # key, query, value projections for all heads, but in a batch 29 | self.c_attn = nn.Linear(config.n_embd, 3 * config.n_embd, bias=config.bias) 30 | # output projection 31 | self.c_proj = nn.Linear(config.n_embd, config.n_embd, bias=config.bias) 32 | # regularization 33 | self.attn_dropout = nn.Dropout(config.dropout) 34 | self.resid_dropout = nn.Dropout(config.dropout) 35 | self.n_head = config.n_head 36 | self.n_embd = config.n_embd 37 | self.dropout = config.dropout 38 | # flash attention make GPU go brrrrr but support is only in PyTorch nightly and still a bit scary 39 | self.flash = hasattr(torch.nn.functional, 'scaled_dot_product_attention') 40 | if not self.flash: 41 | # print("WARNING: using slow attention. Flash Attention atm needs PyTorch nightly and dropout=0.0") 42 | # causal mask to ensure that attention is only applied to the left in the input sequence 43 | self.register_buffer("bias", torch.tril(torch.ones(config.block_size, config.block_size)) 44 | .view(1, 1, config.block_size, config.block_size)) 45 | 46 | def forward(self, x): 47 | B, T, C = x.size() # batch size, sequence length, embedding dimensionality (n_embd) 48 | 49 | # calculate query, key, values for all heads in batch and move head forward to be the batch dim 50 | q, k ,v = self.c_attn(x).split(self.n_embd, dim=2) 51 | k = k.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs) 52 | q = q.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs) 53 | v = v.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs) 54 | 55 | # causal self-attention; Self-attend: (B, nh, T, hs) x (B, nh, hs, T) -> (B, nh, T, T) 56 | if self.flash: 57 | # efficient attention using Flash Attention CUDA kernels 58 | y = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=None, dropout_p=self.dropout, is_causal=True) 59 | else: 60 | # manual implementation of attention 61 | att = (q @ k.transpose(-2, -1)) * (1.0 / math.sqrt(k.size(-1))) 62 | att = att.masked_fill(self.bias[:,:,:T,:T] == 0, float('-inf')) 63 | att = F.softmax(att, dim=-1) 64 | att = self.attn_dropout(att) 65 | y = att @ v # (B, nh, T, T) x (B, nh, T, hs) -> (B, nh, T, hs) 66 | y = y.transpose(1, 2).contiguous().view(B, T, C) # re-assemble all head outputs side by side 67 | 68 | # output projection 69 | y = self.resid_dropout(self.c_proj(y)) 70 | return y 71 | 72 | class MLP(nn.Module): 73 | 74 | def __init__(self, config): 75 | super().__init__() 76 | self.c_fc = nn.Linear(config.n_embd, 4 * config.n_embd, bias=config.bias) 77 | self.c_proj = nn.Linear(4 * config.n_embd, config.n_embd, bias=config.bias) 78 | self.dropout = nn.Dropout(config.dropout) 79 | self.gelu = nn.GELU() 80 | 81 | def forward(self, x): 82 | x = self.c_fc(x) 83 | x = self.gelu(x) 84 | x = self.c_proj(x) 85 | x = self.dropout(x) 86 | return x 87 | 88 | class Block(nn.Module): 89 | 90 | def __init__(self, config, layer_idx): 91 | super().__init__() 92 | self.ln_1 = LayerNorm(config.n_embd, bias=config.bias) 93 | self.attn = CausalSelfAttention(config) 94 | self.ln_2 = LayerNorm(config.n_embd, bias=config.bias) 95 | self.mlp = MLP(config) 96 | self.layer_idx = layer_idx 97 | 98 | def forward(self, x): 99 | x = x + self.attn(self.ln_1(x)) 100 | x = x + self.mlp(self.ln_2(x)) 101 | return x 102 | 103 | @dataclass 104 | class GPTConfig: 105 | block_size: int = 1024 106 | input_vocab_size: int = 10_048 107 | output_vocab_size: int = 10_048 108 | n_layer: int = 12 109 | n_head: int = 12 110 | n_embd: int = 768 111 | dropout: float = 0.0 112 | bias: bool = True # True: bias in Linears and LayerNorms, like GPT-2. False: a bit better and faster 113 | 114 | class GPT(nn.Module): 115 | 116 | def __init__(self, config): 117 | super().__init__() 118 | assert config.input_vocab_size is not None 119 | assert config.output_vocab_size is not None 120 | assert config.block_size is not None 121 | self.config = config 122 | 123 | self.transformer = nn.ModuleDict(dict( 124 | wte = nn.Embedding(config.input_vocab_size, config.n_embd), 125 | wpe = nn.Embedding(config.block_size, config.n_embd), 126 | drop = nn.Dropout(config.dropout), 127 | h = nn.ModuleList([Block(config, idx) for idx in range(config.n_layer)]), 128 | ln_f = LayerNorm(config.n_embd, bias=config.bias), 129 | )) 130 | self.lm_head = nn.Linear(config.n_embd, config.output_vocab_size, bias=False) 131 | 132 | def get_num_params(self, non_embedding=True): 133 | """ 134 | Return the number of parameters in the model. 135 | For non-embedding count (default), the position embeddings get subtracted. 136 | The token embeddings would too, except due to the parameter sharing these 137 | params are actually used as weights in the final layer, so we include them. 138 | """ 139 | n_params = sum(p.numel() for p in self.parameters()) 140 | if non_embedding: 141 | n_params -= self.transformer.wte.weight.numel() 142 | n_params -= self.transformer.wpe.weight.numel() 143 | return n_params 144 | 145 | def forward(self, idx, merge_context=False): 146 | device = idx.device 147 | b, t = idx.size() 148 | if merge_context: 149 | assert(idx.shape[1] >= 256+256+1) 150 | t = idx.shape[1] - 256 151 | else: 152 | assert t <= self.config.block_size, f"Cannot forward sequence of length {t}, block size is only {self.config.block_size}" 153 | 154 | # forward the GPT model itself 155 | if merge_context: 156 | tok_emb = torch.cat([ 157 | self.transformer.wte(idx[:,:256]) + self.transformer.wte(idx[:,256:256+256]), 158 | self.transformer.wte(idx[:,256+256:]) 159 | ], dim=1) 160 | else: 161 | tok_emb = self.transformer.wte(idx) # token embeddings of shape (b, t, n_embd) 162 | 163 | pos = torch.arange(0, t, dtype=torch.long, device=device).unsqueeze(0) # shape (1, t) 164 | pos_emb = self.transformer.wpe(pos) # position embeddings of shape (1, t, n_embd) 165 | 166 | x = self.transformer.drop(tok_emb + pos_emb) 167 | for block in self.transformer.h: 168 | x = block(x) 169 | x = self.transformer.ln_f(x) 170 | 171 | # inference-time mini-optimization: only forward the lm_head on the very last position 172 | logits = self.lm_head(x[:, [-1], :]) # note: using list [-1] to preserve the time dim 173 | 174 | return logits 175 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Attribution-NonCommercial 4.0 International 3 | 4 | ======================================================================= 5 | 6 | Creative Commons Corporation ("Creative Commons") is not a law firm and 7 | does not provide legal services or legal advice. Distribution of 8 | Creative Commons public licenses does not create a lawyer-client or 9 | other relationship. Creative Commons makes its licenses and related 10 | information available on an "as-is" basis. Creative Commons gives no 11 | warranties regarding its licenses, any material licensed under their 12 | terms and conditions, or any related information. Creative Commons 13 | disclaims all liability for damages resulting from their use to the 14 | fullest extent possible. 15 | 16 | Using Creative Commons Public Licenses 17 | 18 | Creative Commons public licenses provide a standard set of terms and 19 | conditions that creators and other rights holders may use to share 20 | original works of authorship and other material subject to copyright 21 | and certain other rights specified in the public license below. The 22 | following considerations are for informational purposes only, are not 23 | exhaustive, and do not form part of our licenses. 24 | 25 | Considerations for licensors: Our public licenses are 26 | intended for use by those authorized to give the public 27 | permission to use material in ways otherwise restricted by 28 | copyright and certain other rights. Our licenses are 29 | irrevocable. Licensors should read and understand the terms 30 | and conditions of the license they choose before applying it. 31 | Licensors should also secure all rights necessary before 32 | applying our licenses so that the public can reuse the 33 | material as expected. Licensors should clearly mark any 34 | material not subject to the license. This includes other CC- 35 | licensed material, or material used under an exception or 36 | limitation to copyright. More considerations for licensors: 37 | wiki.creativecommons.org/Considerations_for_licensors 38 | 39 | Considerations for the public: By using one of our public 40 | licenses, a licensor grants the public permission to use the 41 | licensed material under specified terms and conditions. If 42 | the licensor's permission is not necessary for any reason--for 43 | example, because of any applicable exception or limitation to 44 | copyright--then that use is not regulated by the license. Our 45 | licenses grant only permissions under copyright and certain 46 | other rights that a licensor has authority to grant. Use of 47 | the licensed material may still be restricted for other 48 | reasons, including because others have copyright or other 49 | rights in the material. A licensor may make special requests, 50 | such as asking that all changes be marked or described. 51 | Although not required by our licenses, you are encouraged to 52 | respect those requests where reasonable. More_considerations 53 | for the public: 54 | wiki.creativecommons.org/Considerations_for_licensees 55 | 56 | ======================================================================= 57 | 58 | Creative Commons Attribution-NonCommercial 4.0 International Public 59 | License 60 | 61 | By exercising the Licensed Rights (defined below), You accept and agree 62 | to be bound by the terms and conditions of this Creative Commons 63 | Attribution-NonCommercial 4.0 International Public License ("Public 64 | License"). To the extent this Public License may be interpreted as a 65 | contract, You are granted the Licensed Rights in consideration of Your 66 | acceptance of these terms and conditions, and the Licensor grants You 67 | such rights in consideration of benefits the Licensor receives from 68 | making the Licensed Material available under these terms and 69 | conditions. 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. Copyright and Similar Rights means copyright and/or similar rights 88 | closely related to copyright including, without limitation, 89 | performance, broadcast, sound recording, and Sui Generis Database 90 | Rights, without regard to how the rights are labeled or 91 | categorized. For purposes of this Public License, the rights 92 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 93 | Rights. 94 | d. Effective Technological Measures means those measures that, in the 95 | absence of proper authority, may not be circumvented under laws 96 | fulfilling obligations under Article 11 of the WIPO Copyright 97 | Treaty adopted on December 20, 1996, and/or similar international 98 | agreements. 99 | 100 | e. Exceptions and Limitations means fair use, fair dealing, and/or 101 | any other exception or limitation to Copyright and Similar Rights 102 | that applies to Your use of the Licensed Material. 103 | 104 | f. Licensed Material means the artistic or literary work, database, 105 | or other material to which the Licensor applied this Public 106 | License. 107 | 108 | g. Licensed Rights means the rights granted to You subject to the 109 | terms and conditions of this Public License, which are limited to 110 | all Copyright and Similar Rights that apply to Your use of the 111 | Licensed Material and that the Licensor has authority to license. 112 | 113 | h. Licensor means the individual(s) or entity(ies) granting rights 114 | under this Public License. 115 | 116 | i. NonCommercial means not primarily intended for or directed towards 117 | commercial advantage or monetary compensation. For purposes of 118 | this Public License, the exchange of the Licensed Material for 119 | other material subject to Copyright and Similar Rights by digital 120 | file-sharing or similar means is NonCommercial provided there is 121 | no payment of monetary compensation in connection with the 122 | exchange. 123 | 124 | j. Share means to provide material to the public by any means or 125 | process that requires permission under the Licensed Rights, such 126 | as reproduction, public display, public performance, distribution, 127 | dissemination, communication, or importation, and to make material 128 | available to the public including in ways that members of the 129 | public may access the material from a place and at a time 130 | individually chosen by them. 131 | 132 | k. Sui Generis Database Rights means rights other than copyright 133 | resulting from Directive 96/9/EC of the European Parliament and of 134 | the Council of 11 March 1996 on the legal protection of databases, 135 | as amended and/or succeeded, as well as other essentially 136 | equivalent rights anywhere in the world. 137 | 138 | l. You means the individual or entity exercising the Licensed Rights 139 | under this Public License. Your has a corresponding meaning. 140 | 141 | Section 2 -- Scope. 142 | 143 | a. License grant. 144 | 145 | 1. Subject to the terms and conditions of this Public License, 146 | the Licensor hereby grants You a worldwide, royalty-free, 147 | non-sublicensable, non-exclusive, irrevocable license to 148 | exercise the Licensed Rights in the Licensed Material to: 149 | 150 | a. reproduce and Share the Licensed Material, in whole or 151 | in part, for NonCommercial purposes only; and 152 | 153 | b. produce, reproduce, and Share Adapted Material for 154 | NonCommercial purposes only. 155 | 156 | 2. Exceptions and Limitations. For the avoidance of doubt, where 157 | Exceptions and Limitations apply to Your use, this Public 158 | License does not apply, and You do not need to comply with 159 | its terms and conditions. 160 | 161 | 3. Term. The term of this Public License is specified in Section 162 | 6(a). 163 | 164 | 4. Media and formats; technical modifications allowed. The 165 | Licensor authorizes You to exercise the Licensed Rights in 166 | all media and formats whether now known or hereafter created, 167 | and to make technical modifications necessary to do so. The 168 | Licensor waives and/or agrees not to assert any right or 169 | authority to forbid You from making technical modifications 170 | necessary to exercise the Licensed Rights, including 171 | technical modifications necessary to circumvent Effective 172 | Technological Measures. For purposes of this Public License, 173 | simply making modifications authorized by this Section 2(a) 174 | (4) never produces Adapted Material. 175 | 176 | 5. Downstream recipients. 177 | 178 | a. Offer from the Licensor -- Licensed Material. Every 179 | recipient of the Licensed Material automatically 180 | receives an offer from the Licensor to exercise the 181 | Licensed Rights under the terms and conditions of this 182 | Public License. 183 | 184 | b. No downstream restrictions. You may not offer or impose 185 | any additional or different terms or conditions on, or 186 | apply any Effective Technological Measures to, the 187 | Licensed Material if doing so restricts exercise of the 188 | Licensed Rights by any recipient of the Licensed 189 | Material. 190 | 191 | 6. No endorsement. Nothing in this Public License constitutes or 192 | may be construed as permission to assert or imply that You 193 | are, or that Your use of the Licensed Material is, connected 194 | with, or sponsored, endorsed, or granted official status by, 195 | the Licensor or others designated to receive attribution as 196 | provided in Section 3(a)(1)(A)(i). 197 | 198 | b. Other rights. 199 | 200 | 1. Moral rights, such as the right of integrity, are not 201 | licensed under this Public License, nor are publicity, 202 | privacy, and/or other similar personality rights; however, to 203 | the extent possible, the Licensor waives and/or agrees not to 204 | assert any such rights held by the Licensor to the limited 205 | extent necessary to allow You to exercise the Licensed 206 | Rights, but not otherwise. 207 | 208 | 2. Patent and trademark rights are not licensed under this 209 | Public License. 210 | 211 | 3. To the extent possible, the Licensor waives any right to 212 | collect royalties from You for the exercise of the Licensed 213 | Rights, whether directly or through a collecting society 214 | under any voluntary or waivable statutory or compulsory 215 | licensing scheme. In all other cases the Licensor expressly 216 | reserves any right to collect such royalties, including when 217 | the Licensed Material is used other than for NonCommercial 218 | purposes. 219 | 220 | Section 3 -- License Conditions. 221 | 222 | Your exercise of the Licensed Rights is expressly made subject to the 223 | following conditions. 224 | 225 | a. Attribution. 226 | 227 | 1. If You Share the Licensed Material (including in modified 228 | form), You must: 229 | 230 | a. retain the following if it is supplied by the Licensor 231 | with the Licensed Material: 232 | 233 | i. identification of the creator(s) of the Licensed 234 | Material and any others designated to receive 235 | attribution, in any reasonable manner requested by 236 | the Licensor (including by pseudonym if 237 | designated); 238 | 239 | ii. a copyright notice; 240 | 241 | iii. a notice that refers to this Public License; 242 | 243 | iv. a notice that refers to the disclaimer of 244 | warranties; 245 | 246 | v. a URI or hyperlink to the Licensed Material to the 247 | extent reasonably practicable; 248 | 249 | b. indicate if You modified the Licensed Material and 250 | retain an indication of any previous modifications; and 251 | 252 | c. indicate the Licensed Material is licensed under this 253 | Public License, and include the text of, or the URI or 254 | hyperlink to, this Public License. 255 | 256 | 2. You may satisfy the conditions in Section 3(a)(1) in any 257 | reasonable manner based on the medium, means, and context in 258 | which You Share the Licensed Material. For example, it may be 259 | reasonable to satisfy the conditions by providing a URI or 260 | hyperlink to a resource that includes the required 261 | information. 262 | 263 | 3. If requested by the Licensor, You must remove any of the 264 | information required by Section 3(a)(1)(A) to the extent 265 | reasonably practicable. 266 | 267 | 4. If You Share Adapted Material You produce, the Adapter's 268 | License You apply must not prevent recipients of the Adapted 269 | Material from complying with this Public License. 270 | 271 | Section 4 -- Sui Generis Database Rights. 272 | 273 | Where the Licensed Rights include Sui Generis Database Rights that 274 | apply to Your use of the Licensed Material: 275 | 276 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 277 | to extract, reuse, reproduce, and Share all or a substantial 278 | portion of the contents of the database for NonCommercial purposes 279 | only; 280 | 281 | b. if You include all or a substantial portion of the database 282 | contents in a database in which You have Sui Generis Database 283 | Rights, then the database in which You have Sui Generis Database 284 | Rights (but not its individual contents) is Adapted Material; and 285 | 286 | c. You must comply with the conditions in Section 3(a) if You Share 287 | all or a substantial portion of the contents of the database. 288 | 289 | For the avoidance of doubt, this Section 4 supplements and does not 290 | replace Your obligations under this Public License where the Licensed 291 | Rights include other Copyright and Similar Rights. 292 | 293 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 294 | 295 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 296 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 297 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 298 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 299 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 300 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 301 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 302 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 303 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 304 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 305 | 306 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 307 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 308 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 309 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 310 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 311 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 312 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 313 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 314 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 315 | 316 | c. The disclaimer of warranties and limitation of liability provided 317 | above shall be interpreted in a manner that, to the extent 318 | possible, most closely approximates an absolute disclaimer and 319 | waiver of all liability. 320 | 321 | Section 6 -- Term and Termination. 322 | 323 | a. This Public License applies for the term of the Copyright and 324 | Similar Rights licensed here. However, if You fail to comply with 325 | this Public License, then Your rights under this Public License 326 | terminate automatically. 327 | 328 | b. Where Your right to use the Licensed Material has terminated under 329 | Section 6(a), it reinstates: 330 | 331 | 1. automatically as of the date the violation is cured, provided 332 | it is cured within 30 days of Your discovery of the 333 | violation; or 334 | 335 | 2. upon express reinstatement by the Licensor. 336 | 337 | For the avoidance of doubt, this Section 6(b) does not affect any 338 | right the Licensor may have to seek remedies for Your violations 339 | of this Public License. 340 | 341 | c. For the avoidance of doubt, the Licensor may also offer the 342 | Licensed Material under separate terms or conditions or stop 343 | distributing the Licensed Material at any time; however, doing so 344 | will not terminate this Public License. 345 | 346 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 347 | License. 348 | 349 | Section 7 -- Other Terms and Conditions. 350 | 351 | a. The Licensor shall not be bound by any additional or different 352 | terms or conditions communicated by You unless expressly agreed. 353 | 354 | b. Any arrangements, understandings, or agreements regarding the 355 | Licensed Material not stated herein are separate from and 356 | independent of the terms and conditions of this Public License. 357 | 358 | Section 8 -- Interpretation. 359 | 360 | a. For the avoidance of doubt, this Public License does not, and 361 | shall not be interpreted to, reduce, limit, restrict, or impose 362 | conditions on any use of the Licensed Material that could lawfully 363 | be made without permission under this Public License. 364 | 365 | b. To the extent possible, if any provision of this Public License is 366 | deemed unenforceable, it shall be automatically reformed to the 367 | minimum extent necessary to make it enforceable. If the provision 368 | cannot be reformed, it shall be severed from this Public License 369 | without affecting the enforceability of the remaining terms and 370 | conditions. 371 | 372 | c. No term or condition of this Public License will be waived and no 373 | failure to comply consented to unless expressly agreed to by the 374 | Licensor. 375 | 376 | d. Nothing in this Public License constitutes or may be interpreted 377 | as a limitation upon, or waiver of, any privileges and immunities 378 | that apply to the Licensor or You, including from the legal 379 | processes of any jurisdiction or authority. 380 | 381 | ======================================================================= 382 | 383 | Creative Commons is not a party to its public 384 | licenses. Notwithstanding, Creative Commons may elect to apply one of 385 | its public licenses to material it publishes and in those instances 386 | will be considered the “Licensor.” The text of the Creative Commons 387 | public licenses is dedicated to the public domain under the CC0 Public 388 | Domain Dedication. Except for the limited purpose of indicating that 389 | material is shared under a Creative Commons public license or as 390 | otherwise permitted by the Creative Commons policies published at 391 | creativecommons.org/policies, Creative Commons does not authorize the 392 | use of the trademark "Creative Commons" or any other trademark or logo 393 | of Creative Commons without its prior written consent including, 394 | without limitation, in connection with any unauthorized modifications 395 | to any of its public licenses or any other arrangements, 396 | understandings, or agreements concerning use of licensed material. For 397 | the avoidance of doubt, this paragraph does not form part of the 398 | public licenses. 399 | 400 | Creative Commons may be contacted at creativecommons.org. 401 | -------------------------------------------------------------------------------- /bark/generation.py: -------------------------------------------------------------------------------- 1 | import contextlib 2 | import hashlib 3 | import os 4 | import re 5 | import requests 6 | 7 | from encodec import EncodecModel 8 | import funcy 9 | import logging 10 | import numpy as np 11 | from scipy.special import softmax 12 | import torch 13 | import torch.nn.functional as F 14 | import tqdm 15 | from transformers import BertTokenizer 16 | 17 | from .model import GPTConfig, GPT 18 | from .model_fine import FineGPT, FineGPTConfig 19 | 20 | if ( 21 | torch.cuda.is_available() and 22 | hasattr(torch.cuda, "amp") and 23 | hasattr(torch.cuda.amp, "autocast") and 24 | hasattr(torch.cuda, "is_bf16_supported") and 25 | torch.cuda.is_bf16_supported() 26 | ): 27 | autocast = funcy.partial(torch.cuda.amp.autocast, dtype=torch.bfloat16) 28 | else: 29 | @contextlib.contextmanager 30 | def autocast(): 31 | yield 32 | 33 | 34 | # hold models in global scope to lazy load 35 | global models 36 | models = {} 37 | 38 | 39 | CONTEXT_WINDOW_SIZE = 1024 40 | 41 | SEMANTIC_RATE_HZ = 49.9 42 | SEMANTIC_VOCAB_SIZE = 10_000 43 | 44 | CODEBOOK_SIZE = 1024 45 | N_COARSE_CODEBOOKS = 2 46 | N_FINE_CODEBOOKS = 8 47 | COARSE_RATE_HZ = 75 48 | 49 | SAMPLE_RATE = 24_000 50 | 51 | 52 | SUPPORTED_LANGS = [ 53 | ("English", "en"), 54 | ("German", "de"), 55 | ("Spanish", "es"), 56 | ("French", "fr"), 57 | ("Hindi", "hi"), 58 | ("Italian", "it"), 59 | ("Japanese", "ja"), 60 | ("Korean", "ko"), 61 | ("Polish", "pl"), 62 | ("Portuguese", "pt"), 63 | ("Russian", "ru"), 64 | ("Turkish", "tr"), 65 | ("Chinese", "zh"), 66 | ] 67 | 68 | ALLOWED_PROMPTS = {"announcer"} 69 | for _, lang in SUPPORTED_LANGS: 70 | for n in range(10): 71 | ALLOWED_PROMPTS.add(f"{lang}_speaker_{n}") 72 | 73 | 74 | logger = logging.getLogger(__name__) 75 | 76 | 77 | CUR_PATH = os.path.dirname(os.path.abspath(__file__)) 78 | 79 | 80 | default_cache_dir = os.path.join(os.path.expanduser("~"), ".cache") 81 | CACHE_DIR = os.path.join(os.getenv("XDG_CACHE_HOME", default_cache_dir), "suno", "bark_v0") 82 | 83 | 84 | USE_SMALL_MODELS = os.environ.get("SUNO_USE_SMALL_MODELS", False) 85 | 86 | REMOTE_BASE_URL = "https://dl.suno-models.io/bark/models/v0/" 87 | if USE_SMALL_MODELS: 88 | REMOTE_MODEL_PATHS = { 89 | "text": { 90 | "path": os.path.join(REMOTE_BASE_URL, "text.pt"), 91 | "checksum": "b3e42bcbab23b688355cd44128c4cdd3", 92 | }, 93 | "coarse": { 94 | "path": os.path.join(REMOTE_BASE_URL, "coarse.pt"), 95 | "checksum": "5fe964825e3b0321f9d5f3857b89194d", 96 | }, 97 | "fine": { 98 | "path": os.path.join(REMOTE_BASE_URL, "fine.pt"), 99 | "checksum": "5428d1befe05be2ba32195496e58dc90", 100 | }, 101 | } 102 | else: 103 | REMOTE_MODEL_PATHS = { 104 | "text": { 105 | "path": os.path.join(REMOTE_BASE_URL, "text_2.pt"), 106 | "checksum": "54afa89d65e318d4f5f80e8e8799026a", 107 | }, 108 | "coarse": { 109 | "path": os.path.join(REMOTE_BASE_URL, "coarse_2.pt"), 110 | "checksum": "8a98094e5e3a255a5c9c0ab7efe8fd28", 111 | }, 112 | "fine": { 113 | "path": os.path.join(REMOTE_BASE_URL, "fine_2.pt"), 114 | "checksum": "59d184ed44e3650774a2f0503a48a97b", 115 | }, 116 | } 117 | 118 | 119 | if not hasattr(torch.nn.functional, 'scaled_dot_product_attention'): 120 | logger.warning( 121 | "torch version does not support flash attention. You will get significantly faster" + 122 | " inference speed by upgrade torch to newest version / nightly." 123 | ) 124 | 125 | 126 | def _string_md5(s): 127 | m = hashlib.md5() 128 | m.update(s.encode("utf-8")) 129 | return m.hexdigest() 130 | 131 | 132 | def _md5(fname): 133 | hash_md5 = hashlib.md5() 134 | with open(fname, "rb") as f: 135 | for chunk in iter(lambda: f.read(4096), b""): 136 | hash_md5.update(chunk) 137 | return hash_md5.hexdigest() 138 | 139 | 140 | def _get_ckpt_path(model_type): 141 | model_name = _string_md5(REMOTE_MODEL_PATHS[model_type]["path"]) 142 | return os.path.join(CACHE_DIR, f"{model_name}.pt") 143 | 144 | 145 | S3_BUCKET_PATH_RE = r"s3\:\/\/(.+?)\/" 146 | 147 | 148 | def _parse_s3_filepath(s3_filepath): 149 | bucket_name = re.search(S3_BUCKET_PATH_RE, s3_filepath).group(1) 150 | rel_s3_filepath = re.sub(S3_BUCKET_PATH_RE, "", s3_filepath) 151 | return bucket_name, rel_s3_filepath 152 | 153 | 154 | def _download(from_s3_path, to_local_path): 155 | os.makedirs(CACHE_DIR, exist_ok=True) 156 | response = requests.get(from_s3_path, stream=True) 157 | total_size_in_bytes = int(response.headers.get("content-length", 0)) 158 | block_size = 1024 159 | progress_bar = tqdm.tqdm(total=total_size_in_bytes, unit="iB", unit_scale=True) 160 | with open(to_local_path, "wb") as file: 161 | for data in response.iter_content(block_size): 162 | progress_bar.update(len(data)) 163 | file.write(data) 164 | progress_bar.close() 165 | if total_size_in_bytes != 0 and progress_bar.n != total_size_in_bytes: 166 | raise ValueError("ERROR, something went wrong") 167 | 168 | 169 | class InferenceContext: 170 | def __init__(self, benchmark=False): 171 | # we can't expect inputs to be the same length, so disable benchmarking by default 172 | self._chosen_cudnn_benchmark = benchmark 173 | self._cudnn_benchmark = None 174 | 175 | def __enter__(self): 176 | self._cudnn_benchmark = torch.backends.cudnn.benchmark 177 | torch.backends.cudnn.benchmark = self._chosen_cudnn_benchmark 178 | 179 | def __exit__(self, exc_type, exc_value, exc_traceback): 180 | torch.backends.cudnn.benchmark = self._cudnn_benchmark 181 | 182 | 183 | if torch.cuda.is_available(): 184 | torch.backends.cuda.matmul.allow_tf32 = True 185 | torch.backends.cudnn.allow_tf32 = True 186 | 187 | 188 | @contextlib.contextmanager 189 | def _inference_mode(): 190 | with InferenceContext(), torch.inference_mode(), torch.no_grad(), autocast(): 191 | yield 192 | 193 | 194 | def _clear_cuda_cache(): 195 | if torch.cuda.is_available(): 196 | torch.cuda.empty_cache() 197 | torch.cuda.synchronize() 198 | 199 | 200 | def clean_models(model_key=None): 201 | global models 202 | model_keys = [model_key] if model_key is not None else models.keys() 203 | for k in model_keys: 204 | if k in models: 205 | del models[k] 206 | _clear_cuda_cache() 207 | 208 | 209 | def _load_model(ckpt_path, device, model_type="text"): 210 | if "cuda" not in device: 211 | logger.warning("No GPU being used. Careful, inference might be extremely slow!") 212 | if model_type == "text": 213 | ConfigClass = GPTConfig 214 | ModelClass = GPT 215 | elif model_type == "coarse": 216 | ConfigClass = GPTConfig 217 | ModelClass = GPT 218 | elif model_type == "fine": 219 | ConfigClass = FineGPTConfig 220 | ModelClass = FineGPT 221 | else: 222 | raise NotImplementedError() 223 | if ( 224 | os.path.exists(ckpt_path) and 225 | _md5(ckpt_path) != REMOTE_MODEL_PATHS[model_type]["checksum"] 226 | ): 227 | logger.warning(f"found outdated {model_type} model, removing.") 228 | os.remove(ckpt_path) 229 | if not os.path.exists(ckpt_path): 230 | logger.info(f"{model_type} model not found, downloading into `{CACHE_DIR}`.") 231 | _download(REMOTE_MODEL_PATHS[model_type]["path"], ckpt_path) 232 | checkpoint = torch.load(ckpt_path, map_location=device) 233 | # this is a hack 234 | model_args = checkpoint["model_args"] 235 | if "input_vocab_size" not in model_args: 236 | model_args["input_vocab_size"] = model_args["vocab_size"] 237 | model_args["output_vocab_size"] = model_args["vocab_size"] 238 | del model_args["vocab_size"] 239 | gptconf = ConfigClass(**checkpoint["model_args"]) 240 | model = ModelClass(gptconf) 241 | state_dict = checkpoint["model"] 242 | # fixup checkpoint 243 | unwanted_prefix = "_orig_mod." 244 | for k, v in list(state_dict.items()): 245 | if k.startswith(unwanted_prefix): 246 | state_dict[k[len(unwanted_prefix) :]] = state_dict.pop(k) 247 | extra_keys = set(state_dict.keys()) - set(model.state_dict().keys()) 248 | extra_keys = set([k for k in extra_keys if not k.endswith(".attn.bias")]) 249 | missing_keys = set(model.state_dict().keys()) - set(state_dict.keys()) 250 | missing_keys = set([k for k in missing_keys if not k.endswith(".attn.bias")]) 251 | if len(extra_keys) != 0: 252 | raise ValueError(f"extra keys found: {extra_keys}") 253 | if len(missing_keys) != 0: 254 | raise ValueError(f"missing keys: {missing_keys}") 255 | model.load_state_dict(state_dict, strict=False) 256 | n_params = model.get_num_params() 257 | val_loss = checkpoint["best_val_loss"].item() 258 | logger.info(f"model loaded: {round(n_params/1e6,1)}M params, {round(val_loss,3)} loss") 259 | model.eval() 260 | model.to(device) 261 | del checkpoint, state_dict 262 | _clear_cuda_cache() 263 | if model_type == "text": 264 | tokenizer = BertTokenizer.from_pretrained("bert-base-multilingual-cased") 265 | return { 266 | "model": model, 267 | "tokenizer": tokenizer, 268 | } 269 | return model 270 | 271 | 272 | def _load_codec_model(device): 273 | model = EncodecModel.encodec_model_24khz() 274 | model.set_target_bandwidth(6.0) 275 | model.eval() 276 | model.to(device) 277 | _clear_cuda_cache() 278 | return model 279 | 280 | 281 | def load_model(ckpt_path=None, use_gpu=True, force_reload=False, model_type="text"): 282 | _load_model_f = funcy.partial(_load_model, model_type=model_type) 283 | if model_type not in ("text", "coarse", "fine"): 284 | raise NotImplementedError() 285 | global models 286 | if torch.cuda.device_count() == 0 or not use_gpu: 287 | device = "cpu" 288 | else: 289 | device = "cuda" 290 | model_key = str(device) + f"__{model_type}" 291 | if model_key not in models or force_reload: 292 | if ckpt_path is None: 293 | ckpt_path = _get_ckpt_path(model_type) 294 | clean_models(model_key=model_key) 295 | model = _load_model_f(ckpt_path, device) 296 | models[model_key] = model 297 | return models[model_key] 298 | 299 | 300 | def load_codec_model(use_gpu=True, force_reload=False): 301 | global models 302 | if torch.cuda.device_count() == 0 or not use_gpu: 303 | device = "cpu" 304 | else: 305 | device = "cuda" 306 | model_key = str(device) + f"__codec" 307 | if model_key not in models or force_reload: 308 | clean_models(model_key=model_key) 309 | model = _load_codec_model(device) 310 | models[model_key] = model 311 | return models[model_key] 312 | 313 | 314 | def preload_models(text_ckpt_path=None, coarse_ckpt_path=None, fine_ckpt_path=None, use_gpu=True): 315 | _ = load_model( 316 | ckpt_path=text_ckpt_path, model_type="text", use_gpu=use_gpu, force_reload=True 317 | ) 318 | _ = load_model( 319 | ckpt_path=coarse_ckpt_path, model_type="coarse", use_gpu=use_gpu, force_reload=True 320 | ) 321 | _ = load_model( 322 | ckpt_path=fine_ckpt_path, model_type="fine", use_gpu=use_gpu, force_reload=True 323 | ) 324 | _ = load_codec_model(use_gpu=use_gpu, force_reload=True) 325 | 326 | 327 | #### 328 | # Generation Functionality 329 | #### 330 | 331 | 332 | def _tokenize(tokenizer, text): 333 | return tokenizer.encode(text, add_special_tokens=False) 334 | 335 | 336 | def _detokenize(tokenizer, enc_text): 337 | return tokenizer.decode(enc_text) 338 | 339 | 340 | def _normalize_whitespace(text): 341 | return re.sub(r"\s+", " ", text).strip() 342 | 343 | 344 | TEXT_ENCODING_OFFSET = 10_048 345 | SEMANTIC_PAD_TOKEN = 10_000 346 | TEXT_PAD_TOKEN = 129_595 347 | SEMANTIC_INFER_TOKEN = 129_599 348 | 349 | 350 | def generate_text_semantic( 351 | text, 352 | history_prompt=None, 353 | temp=0.7, 354 | top_k=None, 355 | top_p=None, 356 | use_gpu=True, 357 | silent=False, 358 | min_eos_p=0.2, 359 | max_gen_duration_s=None, 360 | allow_early_stop=True, 361 | model=None, 362 | ): 363 | """Generate semantic tokens from text.""" 364 | assert isinstance(text, str) 365 | text = _normalize_whitespace(text) 366 | assert len(text.strip()) > 0 367 | if history_prompt is not None: 368 | if history_prompt.endswith(".npz"): 369 | semantic_history = np.load(history_prompt)["semantic_prompt"] 370 | else: 371 | assert (history_prompt in ALLOWED_PROMPTS) 372 | semantic_history = np.load( 373 | os.path.join(CUR_PATH, "assets", "prompts", f"{history_prompt}.npz") 374 | )["semantic_prompt"] 375 | assert ( 376 | isinstance(semantic_history, np.ndarray) 377 | and len(semantic_history.shape) == 1 378 | and len(semantic_history) > 0 379 | and semantic_history.min() >= 0 380 | and semantic_history.max() <= SEMANTIC_VOCAB_SIZE - 1 381 | ) 382 | else: 383 | semantic_history = None 384 | model_container = load_model(use_gpu=use_gpu, model_type="text") 385 | if model is None: 386 | model = model_container["model"] 387 | tokenizer = model_container["tokenizer"] 388 | encoded_text = np.array(_tokenize(tokenizer, text)) + TEXT_ENCODING_OFFSET 389 | device = "cuda" if use_gpu and torch.cuda.device_count() > 0 else "cpu" 390 | if len(encoded_text) > 256: 391 | p = round((len(encoded_text) - 256) / len(encoded_text) * 100, 1) 392 | logger.warning(f"warning, text too long, lopping of last {p}%") 393 | encoded_text = encoded_text[:256] 394 | encoded_text = np.pad( 395 | encoded_text, 396 | (0, 256 - len(encoded_text)), 397 | constant_values=TEXT_PAD_TOKEN, 398 | mode="constant", 399 | ) 400 | if semantic_history is not None: 401 | semantic_history = semantic_history.astype(np.int64) 402 | # lop off if history is too long, pad if needed 403 | semantic_history = semantic_history[-256:] 404 | semantic_history = np.pad( 405 | semantic_history, 406 | (0, 256 - len(semantic_history)), 407 | constant_values=SEMANTIC_PAD_TOKEN, 408 | mode="constant", 409 | ) 410 | else: 411 | semantic_history = np.array([SEMANTIC_PAD_TOKEN] * 256) 412 | x = torch.from_numpy( 413 | np.hstack([encoded_text, semantic_history, np.array([SEMANTIC_INFER_TOKEN])]).astype(np.int64) 414 | )[None] 415 | assert x.shape[1] == 256 + 256 + 1 416 | with _inference_mode(): 417 | x = x.to(device) 418 | n_tot_steps = 768 419 | # custom tqdm updates since we don't know when eos will occur 420 | pbar = tqdm.tqdm(disable=silent, total=100) 421 | pbar_state = 0 422 | tot_generated_duration_s = 0 423 | for n in range(n_tot_steps): 424 | logits = model(x, merge_context=True) 425 | relevant_logits = logits[0, 0, :SEMANTIC_VOCAB_SIZE] 426 | if allow_early_stop: 427 | relevant_logits = torch.hstack( 428 | (relevant_logits, logits[0, 0, [SEMANTIC_PAD_TOKEN]]) # eos 429 | ) 430 | if top_p is not None: 431 | # faster to convert to numpy 432 | logits_device = relevant_logits.device 433 | logits_dtype = relevant_logits.type() 434 | relevant_logits = relevant_logits.detach().cpu().type(torch.float32).numpy() 435 | sorted_indices = np.argsort(relevant_logits)[::-1] 436 | sorted_logits = relevant_logits[sorted_indices] 437 | cumulative_probs = np.cumsum(softmax(sorted_logits)) 438 | sorted_indices_to_remove = cumulative_probs > top_p 439 | sorted_indices_to_remove[1:] = sorted_indices_to_remove[:-1].copy() 440 | sorted_indices_to_remove[0] = False 441 | relevant_logits[sorted_indices[sorted_indices_to_remove]] = -np.inf 442 | relevant_logits = torch.from_numpy(relevant_logits) 443 | relevant_logits = relevant_logits.to(logits_device).type(logits_dtype) 444 | if top_k is not None: 445 | v, _ = torch.topk(relevant_logits, min(top_k, relevant_logits.size(-1))) 446 | relevant_logits[relevant_logits < v[-1]] = -float("Inf") 447 | probs = F.softmax(relevant_logits / temp, dim=-1) 448 | item_next = torch.multinomial(probs, num_samples=1) 449 | if allow_early_stop and ( 450 | item_next == SEMANTIC_VOCAB_SIZE 451 | or (min_eos_p is not None and probs[-1] >= min_eos_p) 452 | ): 453 | # eos found, so break 454 | pbar.update(100 - pbar_state) 455 | break 456 | x = torch.cat((x, item_next[None]), dim=1) 457 | tot_generated_duration_s += 1 / SEMANTIC_RATE_HZ 458 | if max_gen_duration_s is not None and tot_generated_duration_s > max_gen_duration_s: 459 | pbar.update(100 - pbar_state) 460 | break 461 | if n == n_tot_steps - 1: 462 | pbar.update(100 - pbar_state) 463 | break 464 | del logits, relevant_logits, probs, item_next 465 | req_pbar_state = np.min([100, int(round(100 * n / n_tot_steps))]) 466 | if req_pbar_state > pbar_state: 467 | pbar.update(req_pbar_state - pbar_state) 468 | pbar_state = req_pbar_state 469 | pbar.close() 470 | out = x.detach().cpu().numpy().squeeze()[256 + 256 + 1 :] 471 | assert all(0 <= out) and all(out < SEMANTIC_VOCAB_SIZE) 472 | _clear_cuda_cache() 473 | return out 474 | 475 | 476 | def _flatten_codebooks(arr, offset_size=CODEBOOK_SIZE): 477 | assert len(arr.shape) == 2 478 | arr = arr.copy() 479 | if offset_size is not None: 480 | for n in range(1, arr.shape[0]): 481 | arr[n, :] += offset_size * n 482 | flat_arr = arr.ravel("F") 483 | return flat_arr 484 | 485 | 486 | COARSE_SEMANTIC_PAD_TOKEN = 12_048 487 | COARSE_INFER_TOKEN = 12_050 488 | 489 | 490 | def generate_coarse( 491 | x_semantic, 492 | history_prompt=None, 493 | temp=0.7, 494 | top_k=None, 495 | top_p=None, 496 | use_gpu=True, 497 | silent=False, 498 | max_coarse_history=630, # min 60 (faster), max 630 (more context) 499 | sliding_window_len=60, 500 | model=None, 501 | ): 502 | """Generate coarse audio codes from semantic tokens.""" 503 | assert ( 504 | isinstance(x_semantic, np.ndarray) 505 | and len(x_semantic.shape) == 1 506 | and len(x_semantic) > 0 507 | and x_semantic.min() >= 0 508 | and x_semantic.max() <= SEMANTIC_VOCAB_SIZE - 1 509 | ) 510 | assert 60 <= max_coarse_history <= 630 511 | assert max_coarse_history + sliding_window_len <= 1024 - 256 512 | semantic_to_coarse_ratio = COARSE_RATE_HZ / SEMANTIC_RATE_HZ * N_COARSE_CODEBOOKS 513 | max_semantic_history = int(np.floor(max_coarse_history / semantic_to_coarse_ratio)) 514 | if history_prompt is not None: 515 | if history_prompt.endswith(".npz"): 516 | x_history = np.load(history_prompt) 517 | else: 518 | assert (history_prompt in ALLOWED_PROMPTS) 519 | x_history = np.load( 520 | os.path.join(CUR_PATH, "assets", "prompts", f"{history_prompt}.npz") 521 | ) 522 | x_semantic_history = x_history["semantic_prompt"] 523 | x_coarse_history = x_history["coarse_prompt"] 524 | assert ( 525 | isinstance(x_semantic_history, np.ndarray) 526 | and len(x_semantic_history.shape) == 1 527 | and len(x_semantic_history) > 0 528 | and x_semantic_history.min() >= 0 529 | and x_semantic_history.max() <= SEMANTIC_VOCAB_SIZE - 1 530 | and isinstance(x_coarse_history, np.ndarray) 531 | and len(x_coarse_history.shape) == 2 532 | and x_coarse_history.shape[0] == N_COARSE_CODEBOOKS 533 | and x_coarse_history.shape[-1] >= 0 534 | and x_coarse_history.min() >= 0 535 | and x_coarse_history.max() <= CODEBOOK_SIZE - 1 536 | and ( 537 | round(x_coarse_history.shape[-1] / len(x_semantic_history), 1) 538 | == round(semantic_to_coarse_ratio / N_COARSE_CODEBOOKS, 1) 539 | ) 540 | ) 541 | x_coarse_history = _flatten_codebooks(x_coarse_history) + SEMANTIC_VOCAB_SIZE 542 | # trim histories correctly 543 | n_semantic_hist_provided = np.min( 544 | [ 545 | max_semantic_history, 546 | len(x_semantic_history) - len(x_semantic_history) % 2, 547 | int(np.floor(len(x_coarse_history) / semantic_to_coarse_ratio)), 548 | ] 549 | ) 550 | n_coarse_hist_provided = int(round(n_semantic_hist_provided * semantic_to_coarse_ratio)) 551 | x_semantic_history = x_semantic_history[-n_semantic_hist_provided:].astype(np.int32) 552 | x_coarse_history = x_coarse_history[-n_coarse_hist_provided:].astype(np.int32) 553 | # TODO: bit of a hack for time alignment (sounds better) 554 | x_coarse_history = x_coarse_history[:-2] 555 | else: 556 | x_semantic_history = np.array([], dtype=np.int32) 557 | x_coarse_history = np.array([], dtype=np.int32) 558 | if model is None: 559 | model = load_model(use_gpu=use_gpu, model_type="coarse") 560 | device = "cuda" if use_gpu and torch.cuda.device_count() > 0 else "cpu" 561 | # start loop 562 | n_steps = int( 563 | round( 564 | np.floor(len(x_semantic) * semantic_to_coarse_ratio / N_COARSE_CODEBOOKS) 565 | * N_COARSE_CODEBOOKS 566 | ) 567 | ) 568 | assert n_steps > 0 and n_steps % N_COARSE_CODEBOOKS == 0 569 | x_semantic = np.hstack([x_semantic_history, x_semantic]).astype(np.int32) 570 | x_coarse = x_coarse_history.astype(np.int32) 571 | base_semantic_idx = len(x_semantic_history) 572 | with _inference_mode(): 573 | x_semantic_in = torch.from_numpy(x_semantic)[None].to(device) 574 | x_coarse_in = torch.from_numpy(x_coarse)[None].to(device) 575 | n_window_steps = int(np.ceil(n_steps / sliding_window_len)) 576 | n_step = 0 577 | for _ in tqdm.tqdm(range(n_window_steps), total=n_window_steps, disable=silent): 578 | semantic_idx = base_semantic_idx + int(round(n_step / semantic_to_coarse_ratio)) 579 | # pad from right side 580 | x_in = x_semantic_in[:, np.max([0, semantic_idx - max_semantic_history]) :] 581 | x_in = x_in[:, :256] 582 | x_in = F.pad( 583 | x_in, 584 | (0, 256 - x_in.shape[-1]), 585 | "constant", 586 | COARSE_SEMANTIC_PAD_TOKEN, 587 | ) 588 | x_in = torch.hstack( 589 | [ 590 | x_in, 591 | torch.tensor([COARSE_INFER_TOKEN])[None].to(device), 592 | x_coarse_in[:, -max_coarse_history:], 593 | ] 594 | ) 595 | for _ in range(sliding_window_len): 596 | if n_step >= n_steps: 597 | continue 598 | is_major_step = n_step % N_COARSE_CODEBOOKS == 0 599 | logits = model(x_in) 600 | logit_start_idx = ( 601 | SEMANTIC_VOCAB_SIZE + (1 - int(is_major_step)) * CODEBOOK_SIZE 602 | ) 603 | logit_end_idx = ( 604 | SEMANTIC_VOCAB_SIZE + (2 - int(is_major_step)) * CODEBOOK_SIZE 605 | ) 606 | relevant_logits = logits[0, 0, logit_start_idx:logit_end_idx] 607 | if top_p is not None: 608 | # faster to convert to numpy 609 | logits_device = relevant_logits.device 610 | logits_dtype = relevant_logits.type() 611 | relevant_logits = relevant_logits.detach().cpu().type(torch.float32).numpy() 612 | sorted_indices = np.argsort(relevant_logits)[::-1] 613 | sorted_logits = relevant_logits[sorted_indices] 614 | cumulative_probs = np.cumsum(softmax(sorted_logits)) 615 | sorted_indices_to_remove = cumulative_probs > top_p 616 | sorted_indices_to_remove[1:] = sorted_indices_to_remove[:-1].copy() 617 | sorted_indices_to_remove[0] = False 618 | relevant_logits[sorted_indices[sorted_indices_to_remove]] = -np.inf 619 | relevant_logits = torch.from_numpy(relevant_logits) 620 | relevant_logits = relevant_logits.to(logits_device).type(logits_dtype) 621 | if top_k is not None: 622 | v, _ = torch.topk(relevant_logits, min(top_k, relevant_logits.size(-1))) 623 | relevant_logits[relevant_logits < v[-1]] = -float("Inf") 624 | probs = F.softmax(relevant_logits / temp, dim=-1) 625 | item_next = torch.multinomial(probs, num_samples=1) 626 | item_next += logit_start_idx 627 | x_coarse_in = torch.cat((x_coarse_in, item_next[None]), dim=1) 628 | x_in = torch.cat((x_in, item_next[None]), dim=1) 629 | del logits, relevant_logits, probs, item_next 630 | n_step += 1 631 | del x_in 632 | del x_semantic_in 633 | gen_coarse_arr = x_coarse_in.detach().cpu().numpy().squeeze()[len(x_coarse_history) :] 634 | del x_coarse_in 635 | assert len(gen_coarse_arr) == n_steps 636 | gen_coarse_audio_arr = gen_coarse_arr.reshape(-1, N_COARSE_CODEBOOKS).T - SEMANTIC_VOCAB_SIZE 637 | for n in range(1, N_COARSE_CODEBOOKS): 638 | gen_coarse_audio_arr[n, :] -= n * CODEBOOK_SIZE 639 | _clear_cuda_cache() 640 | return gen_coarse_audio_arr 641 | 642 | 643 | def generate_fine( 644 | x_coarse_gen, 645 | history_prompt=None, 646 | temp=0.5, 647 | use_gpu=True, 648 | silent=True, 649 | model=None, 650 | ): 651 | """Generate full audio codes from coarse audio codes.""" 652 | assert ( 653 | isinstance(x_coarse_gen, np.ndarray) 654 | and len(x_coarse_gen.shape) == 2 655 | and 1 <= x_coarse_gen.shape[0] <= N_FINE_CODEBOOKS - 1 656 | and x_coarse_gen.shape[1] > 0 657 | and x_coarse_gen.min() >= 0 658 | and x_coarse_gen.max() <= CODEBOOK_SIZE - 1 659 | ) 660 | if history_prompt is not None: 661 | if history_prompt.endswith(".npz"): 662 | x_fine_history = np.load(history_prompt)["fine_prompt"] 663 | else: 664 | assert (history_prompt in ALLOWED_PROMPTS) 665 | x_fine_history = np.load( 666 | os.path.join(CUR_PATH, "assets", "prompts", f"{history_prompt}.npz") 667 | )["fine_prompt"] 668 | assert ( 669 | isinstance(x_fine_history, np.ndarray) 670 | and len(x_fine_history.shape) == 2 671 | and x_fine_history.shape[0] == N_FINE_CODEBOOKS 672 | and x_fine_history.shape[1] >= 0 673 | and x_fine_history.min() >= 0 674 | and x_fine_history.max() <= CODEBOOK_SIZE - 1 675 | ) 676 | else: 677 | x_fine_history = None 678 | n_coarse = x_coarse_gen.shape[0] 679 | if model is None: 680 | model = load_model(use_gpu=use_gpu, model_type="fine") 681 | device = "cuda" if use_gpu and torch.cuda.device_count() > 0 else "cpu" 682 | # make input arr 683 | in_arr = np.vstack( 684 | [ 685 | x_coarse_gen, 686 | np.zeros((N_FINE_CODEBOOKS - n_coarse, x_coarse_gen.shape[1])) 687 | + CODEBOOK_SIZE, # padding 688 | ] 689 | ).astype(np.int32) 690 | # prepend history if available (max 512) 691 | if x_fine_history is not None: 692 | x_fine_history = x_fine_history.astype(np.int32) 693 | in_arr = np.hstack( 694 | [ 695 | x_fine_history[:, -512:].astype(np.int32), 696 | in_arr, 697 | ] 698 | ) 699 | n_history = x_fine_history[:, -512:].shape[1] 700 | else: 701 | n_history = 0 702 | n_remove_from_end = 0 703 | # need to pad if too short (since non-causal model) 704 | if in_arr.shape[1] < 1024: 705 | n_remove_from_end = 1024 - in_arr.shape[1] 706 | in_arr = np.hstack( 707 | [ 708 | in_arr, 709 | np.zeros((N_FINE_CODEBOOKS, n_remove_from_end), dtype=np.int32) + CODEBOOK_SIZE, 710 | ] 711 | ) 712 | # we can be lazy about fractional loop and just keep overwriting codebooks 713 | n_loops = np.max([0, int(np.ceil((x_coarse_gen.shape[1] - (1024 - n_history)) / 512))]) + 1 714 | with _inference_mode(): 715 | in_arr = torch.tensor(in_arr.T).to(device) 716 | for n in tqdm.tqdm(range(n_loops), disable=silent): 717 | start_idx = np.min([n * 512, in_arr.shape[0] - 1024]) 718 | start_fill_idx = np.min([n_history + n * 512, in_arr.shape[0] - 512]) 719 | rel_start_fill_idx = start_fill_idx - start_idx 720 | in_buffer = in_arr[start_idx : start_idx + 1024, :][None] 721 | for nn in range(n_coarse, N_FINE_CODEBOOKS): 722 | logits = model(nn, in_buffer) 723 | if temp is None: 724 | relevant_logits = logits[0, rel_start_fill_idx:, :CODEBOOK_SIZE] 725 | codebook_preds = torch.argmax(relevant_logits, -1) 726 | else: 727 | relevant_logits = logits[0, :, :CODEBOOK_SIZE] / temp 728 | probs = F.softmax(relevant_logits, dim=-1) 729 | codebook_preds = torch.hstack( 730 | [ 731 | torch.multinomial(probs[n], num_samples=1) 732 | for n in range(rel_start_fill_idx, 1024) 733 | ] 734 | ) 735 | in_buffer[0, rel_start_fill_idx:, nn] = codebook_preds 736 | del logits, codebook_preds 737 | # transfer over info into model_in and convert to numpy 738 | for nn in range(n_coarse, N_FINE_CODEBOOKS): 739 | in_arr[ 740 | start_fill_idx : start_fill_idx + (1024 - rel_start_fill_idx), nn 741 | ] = in_buffer[0, rel_start_fill_idx:, nn] 742 | del in_buffer 743 | gen_fine_arr = in_arr.detach().cpu().numpy().squeeze().T 744 | del in_arr 745 | gen_fine_arr = gen_fine_arr[:, n_history:] 746 | if n_remove_from_end > 0: 747 | gen_fine_arr = gen_fine_arr[:, :-n_remove_from_end] 748 | assert gen_fine_arr.shape[-1] == x_coarse_gen.shape[-1] 749 | _clear_cuda_cache() 750 | return gen_fine_arr 751 | 752 | 753 | def codec_decode(fine_tokens, model=None, use_gpu=True): 754 | """Turn quantized audio codes into audio array using encodec.""" 755 | if model is None: 756 | model = load_codec_model(use_gpu=use_gpu) 757 | device = "cuda" if use_gpu and torch.cuda.device_count() > 0 else "cpu" 758 | arr = torch.from_numpy(fine_tokens)[None] 759 | arr = arr.to(device) 760 | arr = arr.transpose(0, 1) 761 | emb = model.quantizer.decode(arr) 762 | out = model.decoder(emb) 763 | audio_arr = out.detach().cpu().numpy().squeeze() 764 | del arr, emb, out 765 | return audio_arr 766 | -------------------------------------------------------------------------------- /notebooks/fake_classifier.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "id": "e330c1de", 7 | "metadata": {}, 8 | "outputs": [], 9 | "source": [ 10 | "import torchaudio\n", 11 | "from transformers import HubertModel\n", 12 | "from sklearn.metrics import PrecisionRecallDisplay" 13 | ] 14 | }, 15 | { 16 | "cell_type": "code", 17 | "execution_count": null, 18 | "id": "2ac3dd88", 19 | "metadata": {}, 20 | "outputs": [], 21 | "source": [ 22 | "# use hubert from HF for feature embedding\n", 23 | "model = HubertModel.from_pretrained(\"facebook/hubert-base-ls960\")\n", 24 | "arr, sr = torchaudio.load(\"my_audio.wav\")\n", 25 | "if sr != 16_000:\n", 26 | " arr = torchaudio.functional.resample(arr, sr, 16_000)\n", 27 | "# use intermediate layer\n", 28 | "hidden_state = model(arr[None], output_hidden_states=True).hidden_states[6]\n", 29 | "# take mean over time\n", 30 | "feats = hidden_state.detach().cpu().numpy().squeeze().mean(0)" 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": null, 36 | "id": "03a602e0", 37 | "metadata": {}, 38 | "outputs": [], 39 | "source": [ 40 | "# load sk-learn classifier from here: https://dl.suno-models.io/bark/models/v0/classifier.pkl\n", 41 | "with open(\"classifier.pkl\", \"rb\") as f:\n", 42 | " clf = pickle.load(f)" 43 | ] 44 | }, 45 | { 46 | "cell_type": "markdown", 47 | "id": "8e423794", 48 | "metadata": {}, 49 | "source": [ 50 | "### Precision-recall curve on test set" 51 | ] 52 | }, 53 | { 54 | "attachments": { 55 | "image.png": { 56 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAHFCAIAAACB+E92AAAMPmlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnltSIbQAAlJCb4JIDSAlhBZAercRkgChxBgIKnZkUcG1oGIBG7oqothpdsTOotj7YkFFWRcLduVNCui6r3xvvm/u/PefM/85c+7MvXcAUD/OFYtzUQ0A8kQFktiQAEZySiqD9BTggAyogAKMuLx8MSs6OgLAMtj+vby7DhBZe8VBpvXP/v9aNPmCfB4ASDTE6fx8Xh7EBwDAq3liSQEARBlvPqVALMOwAm0JDBDiBTKcqcDVMpyuwHvkNvGxbIjbACCrcrmSTADULkGeUcjLhBpqfRA7ifhCEQDqDIh98/Im8SFOg9gG2oghlukz03/QyfybZvqQJpebOYQVc5EXcqAwX5zLnfZ/puN/l7xc6aAPK1hVsyShsbI5w7zdzJkULsOqEPeK0iOjINaC+IOQL7eHGKVmSUMTFPaoIS+fDXMGdCF24nMDwyE2hDhYlBsZoeTTM4TBHIjhCkGnCgs48RDrQbxAkB8Up7TZKJkUq/SFNmRI2Cwlf5YrkfuV+bovzUlgKfVfZwk4Sn1MrSgrPgliKsQWhcLESIjVIHbMz4kLV9qMLspiRw7aSKSxsvgtII4ViEICFPpYYYYkOFZpX5aXPzhfbGOWkBOpxPsKsuJDFfnB2nhcefxwLtglgYiVMKgjyE+OGJwLXxAYpJg79kwgSohT6nwQFwTEKsbiVHFutNIeNxPkhsh4M4hd8wvjlGPxxAK4IBX6eIa4IDpeESdelM0Ni1bEgy8FEYANAgEDSGFNB5NANhB29Db2wjtFTzDgAgnIBALgoGQGRyTJe0TwGgeKwJ8QCUD+0LgAea8AFEL+6xCruDqADHlvoXxEDngCcR4IB7nwXiofJRrylggeQ0b4D+9cWHkw3lxYZf3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qybZYAAAA4ZVhJZk1NACoAAAAIAAGHaQAEAAAAAQAAABoAAAAAAAKgAgAEAAAAAQAAAjegAwAEAAAAAQAAAcUAAAAAljFVdgAAQABJREFUeAHtnQeYFMW6hg8sOecoOUiSICgCoqIIAhKMoChBUNGjJEUJAoICogJKRgVRjygq4FEEFEUBRUBAESRJzjnnZZf7Ql3r9DMzO9O7O7M7O/v19XCrq6srvD1bX/9Vf1eluXz58r90iIAIiIAIiEBYEkgblrVSpURABERABETgCgGplH4HIiACIiAC4UtAKhW+z0Y1EwEREAERkErpNyACIiACIhC+BKRS4ftsVDMREAEREAGplH4DIiACIiAC4UtAKhW+z0Y1EwEREAERkErpNyACIiACIhC+BKRS4ftsVDMREAEREAGplH4D8SOwYMGCxx57rEKFClmzZi1atGjLli1XrlwZvywcqV9++eU0adI4IkIevO222yjRHJkzZ65Wrdpbb70VGxsbioIphQYGzDnUEP5p7pX/nyNHjrp1637yyScBa5X4BB7tgjxH4rNVDqmNgFQqtT3xxLZ3woQJ27dv79at25w5c95+++2DBw/edNNNSFdi803C+0uXLv3r1WP69OkIbY8ePfr06ROK8imkc+fOAXMmDSkDJktMgvvvv58ilixZMnHixJMnTz788MPTpk1LTIa6VwSSjEC6JCtJBUUGgXHjxhUoUMC25a677ipbtuzQoUNvv/12GxnmAUwolNVUskmTJtiFY8eOffXVV9OnT++sOUtcnj9/nsTOyHiFbSn+77rm6uE/TSKvFixY0FSmTp069erVK1my5KRJk9CqRGYbhrdHR0djMqZLp54tDB9OAqskWyqB4FLtbU6JAkK2bNkqVaq0a9cu/0DmzZt3xx135MyZM0uWLBUrVhw2bJjP9Bg3jRo1Kly4MNpAst69e585c8am3Lp1a5s2bYoUKZIxY0a6XTL8448/zFWMOUaT8ubNy43Fixe/7777zp49a2/0E0CZatasSeJDhw6RjA7umWeeweCgdEr54IMPiPz777/p0Gk4McSj084Mjx8//txzz2GfcZU0TZs23bBhg0lAbnbEjyKef/75UqVKZcqUKU+ePLVq1bLDbh4jYww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okAiIgAiKQLASkUsmCXYWKgAiIgAi4IiCVcoVJiURABERABJKFgFQqWbCrUBEQAREQAVcEpFKuMCmRCIiACIhAshCQSiULdhUqAiIgAiLgioBUyhUmJRIBERABEUgWAlKpZMGuQkVABERABFwRkEq5wqREIiACIiACyUJAKpUs2FWoCIiACIiAKwJSKVeYlEgEREAERCBZCEilkgW7ChUBERABEXBFQCrlCpMSiYAIiIAIJAsBqVSyYFehIiACIiACrghIpVxhUiIREAEREIFkIRBylRo/fnypUqUyZcpUs2bNxYsX+2zkuHHjKlasmDlz5muvvfbDDz/0mUaRIiACIiACqZBAupC2efr06d27d0eo6tWrN2nSpCZNmqxbt6548eLOQidMmNCnT5933333hhtuWL58+eOPP547d+7mzZs70ygsAiIgAiKQOgmE1pYaOXJkp06dOnfujKn01ltvFStWDE3yAP3RRx89+eSTrVu3Ll26dJs2bUg/fPhwjzQ6FQEREAERSJ0EQqhSFy9eXLlyZaNGjSxZwkuWLLGnJnDhwgXGA20k435YVNHR0TbGJjvpODyu6lQEREAERCAiCYRQpQ4fPhwTE1OwYEELjvD+/fvtqQk0btz4vffeQ88uX768YsWKKVOmIFHc65Fs2LBhOf85sMk8rupUBERABEQgIgmEUKUMrzRp0lhw6JDz1MT379+f+aqbbropffr0LVu27NChA/FRUVH2LhNg7urEP8euXbs8rupUBERABEQgIgmEUKXy5cuH2DiNp4MHDzpNKwOUIT7sp7Nnz27fvn3nzp0lS5bMnj0793rgzpgxYw7H4XFVpyIgAiIgAhFJIIQqlSFDBrzP58+fb8ERrlu3rj11BjCkrrnmGlTt008/vfvuu9OmDWHFnOUqLAIiIAIiEM4EQuuJ3rNnz0cffbRWrVp16tR55513MJW6dOkCDobv9uzZYz6N2rRpE+4StWvXPnbsGD6Ba9eu/eCDD8IZmeomAiIgAiKQZARCq1L4lx85cmTw4MH79u2rUqXKnDlzSpQoQds4RbFMI/GwGDFixMaNGzGnGjRogBMgg35J1n4VJAIiIAIiEM4E0uDREM7181k3PNJx98OXgokqnwkUKQIiIAIiEHQCbd9b+svmI2+3qd6yetFgZR6wP9f0T7BQKx8REAEREIHgE5BKBZ+pchQBERABEQgWAalUsEgqHxEQAREQgeATkEoFn6lyFAEREAERCBYBVz5+eFgsXLiQfTf48JbPb/Pnz1+jRo2GDRtqpaJgPQblIwIiIAIi4JNAAFvq3LlzQ4cORY1YxOibb745fvw4H95u3rx54MCB7BrVtGnTpUuX+sxXkSIgAiIgAiKQeAIBbKny5cvzve3EiRNZE5bvmZzl7dixY9q0aXwR9dJLL7EplPOSwiIgAiIgAiIQFAIBvpdiJQi+xvVTEttzIFflypXzkybolwL61we9RGUoAiIgAiJQsvc3BsKrrao8ctOVJRoSfwTszwOM+PmXKOrHYn1JLFGJh6IcREAEREAEEkNgzpp9ibk9XvcGUCk/eZ05c2bRokV+EuiSCIiACIhAJBH4pfftBbJnTOIWJVyl8KFg2b0krq6KEwEREAERSC4CRXNl7tesYhKXnnCVSuKKqjgREAEREIFUSCCAjx9E8uTJ45MLa5n7jFekCIiACIiACASLQGCVunDhwlNPPXXdddd5FIlr36BBgzwidSoCIiACIiACQSQQWKWqV6/OV73t27f3KHX16tVSKQ8mOhUBERABEQgugcDzUs2aNWPJCe9SGQls166dd7xiREAEREAERCBYBALbUn379vVZGAbW+++/7/OSIkVABERABEQgKAQC21JBKUaZiIAIiIAIiEACCEilEgBNt4iACIiACCQRAalUEoFWMSIgAiIgAgkgIJVKADTdIgIiIAIikEQEpFJJBFrFiIAIiIAIJICAVCoB0HSLCIiACIhAEhGIh0o99thj/fr1s/XCQ50Ye6qACIiACIiACASdQODvpWyR27Zti42Ntad79uzZtWuXPVVABERABERABIJOIB4q9eOPPzqL/+CDD5ynCouACIiACIhA0AnEY8Qv6GUrQxEQAREQARHwTyCALfXVV1/5v79Fixb+E+iqCIiACIiACCSYQACVatWqlZ+s06RJo12m/PDRJREQAREQgUQSCKBSTneJRJak20VABERABEQgvgTiPS91/vz5+Jah9CIgAiIgAiKQMAJuVYqRvVdeeaVo0a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pUqfffYZAawrs/JsEGujrERABERABETAScCtSnXs2HH16tXc2adPHzM71aNHj169ejnzUlgEREAEREAEgkvArUqhSV27dqXsBg0abNiwgT07Vq1axSJJAWuDpDFUmClTJvajimt1Wua3qlWrliVLlsKFCyOHR478/zpRATNXAhEQAREQgcgm4FalnBRYefbee+9FV5yRPsNsQt+9e/d+/fr9/vvv+Fw0adJk586dHil//vnndu3asQnIX3/99fnnn//222+dO3f2SKNTERABERCB1EkggI/f6NGj/XMxBlZcaUaOHIn8GNVhsaVvv/2W7T+GDRvmTL906dKSJUuafLC6nnzySVa2dSZQWAREQAREINUSCKBSo0aN8oOGhWj9qNTFixdXrlzZu3dvm0OjRo2WLFliT02APX8xtubMmYOldfDgwS+++KJZs2YeaTi9cPUw8axO6J1AMSIgAiIgApFHIIBKbdu2LcFtPnz4cExMTMGCBW0OhPfv329PTQCVYl6qdevW58+fZ6n1Fi1asL+iRxpOscD4lNg7XjEiIAIiIAIRTCAh81LxwmE3/uAudglxnpp81q1bh0E2YMAADK958+ahi126dPEuAt9Ctuowx65du7wTKEYEREAERCDyCASwpRLT4Hz58kVFRTmNJwb0nKaVyRwjqV69esapvWrVquxZhZ/Fq6++ir+fs3RWZuJwxigsAiIgAiIQ8QRCaEtlyJAB7/P58+dbiIQZ37OnJnD27Nm0af9XDYSNeP97M3rkoFMREAEREIFIJfA/eQhFC3v27MnStFOmTFm/fj1fXOGGbkbzGL7D+9yU2Lx585kzZ+L7t3Xr1l9++YXRvxtvvJGlbENRH+UpAiIgAiKQsgiEcMQPEPhE8Inu4MGD9+3bV6VKFRz5WKOWeE7th1MdOnQ4derU2LFjn3vuOZZcuv3224cPH56yIKq2IiACIiACISKQxv3YGitHTJo0acuWLTiLFy1a9KOPPuLzJtacDVHN/GSLJ3rOnDnxpNAejH4o6ZIIiIAIhIhAhf5zz0fHLn6hQbE8WRJZRMD+3O2I34wZMxo3bpw5c2ZWkeDLJaqFATR06NBE1k+3i4AIiIAIiIAfAm5VCqe7iRM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oUqyKlT58+WAUrHxEQAREQAREISCCASp08eTJHjhzkUqNGDZz6ODxyNFc9InUqAiIgAiIgAkEhEEClmJRi/0N26c2VK5edlDIFG38KJqiCUg9lIgIiIAIiIALeBAKo1IIFC4wj348//uh9s2JEQAREQAREIKQEAqjUrbfeaoq3gZDWRpmLgAiIgAiIgJOA2++l5s2b9/PPP5s7x40bV7169Ycffpgde515KSwCIiACIiACwSXgVqV69eqFJwVlr1mzpmfPnuzYu3XrVgLBrY1yEwEREAEREAEngQAjfjYpq81WqlSJ0xkzZjRv3nzo0KGrVq1Cq2wCBURABERABEQg6ATc2lJ8xmtWm/3+++8bNWpEPfCqMNZV0OukDEVABERABETAEHBrS918882M79WrV2/58uVsLc/NmzZtuuaaa8RRBERABERABEJHwK0tNXbs2HTp0n3xxRcTJkwoWrQoFZo7d+5dd90VupopZxEQAREQARFwa0sVL1589uzZTl4+d+91JlBYBERABERABBJJwK1KUQzLTHz55Zfr169nEYqKFSu2bNkyKioqkcXrdhEQAREQARHwQ8CtSm3evBmPvj179lx77bWsjcSkVLFixb755psyZcr4yV2XREAEREAERCAxBNzOS3Xt2hVB2rVrFw7ov//++86dO1klncjElK17RUAEREAERMA/Abe21MKFC5cuXWo3582bN+9rr72Gy5//3HVVBERABERABBJDwK0tlTFjxlOnTjlLYq9ePqJyxigsAiIgAiIgAsEl4Fal7r777ieeeGLZsmVMSnFgV7GdfIsWLYJbG+UmAiIgAiIgAk4CblVq9OjRzEuxhXymqwdjfWXLln377bedeSksAiIgAiIgAsEl4HZeil0Q//vf/+Lphyc6thRr+qFSwa2KchMBERABERABDwKBVSo2NnbEiBF8KRUdHd2wYcMBAwZgTXnkolMREAEREAERCAWBwCN+w4cP7927d9asWQsXLjxy5Eh5n4fiMShPERABERABnwQCq9TUqVPHjBnz3XffMeKHRfXhhx8y4uczL0WKgAiIgAiIQHAJBFapHTt24OBnSm3cuDEStXfv3uBWQrmJgAiIgAiIgE8CgVXq4sWLmTNnNjezgh/fSF24cMFn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ZWMUEAEREAEREAEIuP1eCr8G1uvj49xwoBbQvz4cKqk6iIAIiEBkEwiv76Vy586dJ0+eyCau1omACIiACIQbAbfeE6+88sqAAQPOnj0bbg1QfURABERABCKYgNt5qREjRmzZsgU/8pIlS6ZPn94SWbVqlQ0rIAIiIAIiIALBJeBWpeL62Da4tVFuIiACIiACIuAk4FalBg4c6LxNYREQAREQARFIAgJuVcpUhdVj169fjyd6pUqV2GIqCeqnIkRABERABFIzAbcqxce8bMv7008/4ZLOakZ84dSgQYNPP/00f/78qRmf2i4CIiACIhBSAm59/J599lm+Uvrrr7+OHj167NixtWvXctq1a9eQVk6Zi4AIiIAIpHICbm2pefPmff/992xjaHgx4jdu3Djn3lGpnKOaLwIiIAIiEAoCbm0p1u5zOqBTFU6dC/qFonLKUwREQAREIJUTcKtSt99+e7du3fbu3Wt4sVZsjx497rjjjlSOT80XAREQAREIKQG3KjV27NhTp07xSW+ZMmXKli1bqlQpTseMGRPSyilzERABERCBVE7A7bwU2+OyzAQbRG3YsAEfP+alGjZsmMrZqfkiIAIiIAKhJuBWpUw97rx6hLpOyl8EREAEREAEDIEAKjV69OgnnngiU6ZMBHwikzO6TyyKFAEREAERCAqBACo1atSotm3bolIEvMtjEQqplDcWxYiACIiACASLQACV2rZtmynJBoJVsPIRAREQAREQgYAE3Pr4OTOKiYn5448/WIHCGamwCIiACIiACASdgFuV6t69++TJkykeibrllluuv/56vP5Y1i/oFVKGIiACIiACImAJuFWpL774olq1atz29ddfb9++HX90dKtfv342IwVEQAREQAREIOgE3KrU4cOHCxUqRPFz5sx54IEHypcv36lTpzVr1gS9QspQBERABERABCwBtyrFXvLr1q1juI9lZ833vGfPno2KirIZKSACIiACIiACQScQwMfPltexY8cHH3ywcOHCeJ/zaS/xy5Ytq1Chgk2ggAiIgAiIgAgEnYBblXr55ZerVKmya9cuhvsyZsxIPTCkevfuHfQKKUMREAEREAERsATcqhQ33H///fY2Au3bt3eeKiwCIiACIiACQScQQKW0QlLQiStDERABERAB9wQCqJRWSHKPUilFQAREQASCTiCAStmFkWwg6DVQhiIgAiIgAiIQFwG3nuhx3a94ERABERABEQgdAbcqhevEa6+95qzHG2+8gb+fM0ZhERABERABEQguAbcqtXDhwmbNmjnLvuuuuxYtWuSMUVgEREAEREAEgkvArUqdPn06Q4YMzrLTp09/8uRJZ4zCIiACIiACIhBcAm5Vik96p0+f7iz7008/rVSpkjNGYREQAREQAREILoEAPn62sP79+993331btmy5/fbbifzhhx8++eSTzz//3CZQQAREQAREQASCTsCtSrVo0eLLL78cOnQoW3hkzpy5atWq33///a233hr0CilDERABERABEbAE3KoUN+A94eFAYXNRQAREQAREQARCQcDtvBRlHz9+/L333uvbt+/Ro0c5XbVq1Z49e0JRJ+UpAiIgAiIgAoaAW1vqzz//ZFupnDlzslFv586d8+TJM2vWrB07dnz44YdCKQIiIAIiIAIhIuDWlurZs2eHDh3+/vvvTJkymao0adJE30uF6KkoWxEQAREQAUPArUr99ttvTz75pJNa0aJF9+/f74xRWAREQAREQASCS8CtSmFCeXzDu3Hjxvz58we3NspNBERABERABJwE3KpUy5YtBw8eHB0dzc1sKr9z50426uULKmdeCouACIiACIhAcAm4Vak333zz0KFDBQoUOHfuHJ9JlS1bNnv27EOGDAlubZSbCIiACIiACDgJuPXxy5Ejx88//7xgwQIc0GNjY6+//npc/pwZKSwCIiACIiACQSfgSqUuXbrEvNQff/zB8khmhaSg10MZioAIiIAIiIA3AVcjfunSpStRokRMTIz3/YoRAREQAREQgdARcKVSFP/SSy/16dPHrDoRutooZxEQAREQARFwEnA14scNo0eP3rx5c5EiRTCqsmbNarNgmsqGFRABERABERCB4BJwq1J4ouOAHtyylZsIiIAIiIAI+CfgVqVefvll/xnpqgiIgAiIgAgEnUDgeamzZ8/++9//Zj0kPpZ6+OGHDx8+HPRKKEMREAEREAER8EkgsEoNHDhw6tSp7CzVpk2b+fPnP/XUUz4zUqQIiIAIiIAIBJ1A4BG/mTNnTp48GYmi7EceeaRevXq4pEdFRQW9KspQBERAB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g5Co1fvz4UqVKMSZes2bNxYsXe9f7p59+oj9yHhs2bPBOlrJiOnTo0KpVq6DU+bfffnviiSf8ZOUhY61bt960aZOf9Fy67bbbDHDcTMqUKdOnT58LFy74vyWJrzK/iLtmlSpVglXuO++8U6JEiXr16jkzBCzuNp9++qkz8uWXXzZwuEQ1OnfujAOCM0GCwzNmzKhUqVLGjBn5d9asWXHl89lnn1WvXp3pVSr8xhtvOJONGzeuYsWKzDZde+21H374ob30wgsvvP/++3hJ2BgFRCBiCIRWpaZPn969e/d+/fr9/vvv9evXb9Kkyc6dO32y27hxI72SOfBH8pkmdUbmz58/Xv4gdGEFChQIyOrxxx+H9ubNm19//XX6PrrmgLe4ScCXaviwuEnpPw0KUahQIb718Z/M/dUxY8agN870fLHA77NXr16TJ092xhOuXLkycPitTpgw4euvv27Xrp1HggSc/vrrr7xAPProo6tXr+bfBx98cNmyZd75zJ07t23btl26dFm7di1veCNHjhw7dqxJRmV4n+BJ/fXXX4MGDfr3v/9N3cwlnnijRo0mTpzonaFiRCDFE8BdNXTHjTfeyN+bzb9ChQq9e/e2pybw448/AvHYsWMe8X5OT5w4wS3860xz7ty5devW8a8zMrnC7du3b9mypXNaaf8AABwUSURBVHfpGI433HADFgxd8IsvvhgdHW3SnDx58uGHH0aNiKdjuvXWW7t162Yu8UI9atQoEx44cCBv99zOFzDPPvsskaR0/gSJ4Z06Z86cJj3//ve//8WK5f09b96899xzj4l35k/Mvffee/3115tLaMzw4cON+Vu1atXPP//cxPMvWTFohlmMKca4on1qpkR6TF7zUZetW7dimdH780kALeI3wCM2mTCOd/fddzMgSTz2xDfffEP80aNHaXu+fPnImfynTJlCpDELeLkxN8bFjYbAgbJy585dsGBB+Jj0Hv+uXLkSJwKPHwxNuOmmm44fP46uU5y9hUyqVatmT1999VXuRdJsTMICyNJdd91l723cuHGbNm3sqQ089NBD999/vz3l0V9zzTU8FGLq1KnDyJ69xC8E09Ce0hx+G/bUBsLq78LWSoHIIPDXnhMlXpx9w6vz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kCOpDiRo9YmqwYFaRcBBKjh3ZhkuIqwiWn94RhQlnmFo9/PXpYmNsEAEEU7akCIgCBNPzP40ejUxEQAf8EsB5YzofhKWwj/yl11T0BnBVRXzTPzLS5v1EpI5uA5qUi+/mqdSEhgNM2sziMazk/ZgpJSakpU3wvMcgkUanpmbtqq2wpV5iUSAREQAREIFkIaLwiWbCrUBEQAREQAVcEpFKuMCmRCIiACIhAshCQSiULdhUqAiIgAiLgioBUyhUmJRIBERABEUgWAlKpZMGuQkVABERABFwRkEq5wqREIiACIiACyUJAKpUs2FWoCIiACIiAKwJSKVeYlEgEREAERCBZCEilkgW7ChUBERABEXBF4P8AuRwuVEedncgAAAAASUVORK5CYII=" 57 | } 58 | }, 59 | "cell_type": "markdown", 60 | "id": "e1486424", 61 | "metadata": {}, 62 | "source": [ 63 | "![image.png](attachment:image.png)" 64 | ] 65 | }, 66 | { 67 | "cell_type": "code", 68 | "execution_count": null, 69 | "id": "668856bf", 70 | "metadata": {}, 71 | "outputs": [], 72 | "source": [] 73 | }, 74 | { 75 | "cell_type": "code", 76 | "execution_count": null, 77 | "id": "c87326bd", 78 | "metadata": {}, 79 | "outputs": [], 80 | "source": [] 81 | }, 82 | { 83 | "cell_type": "code", 84 | "execution_count": null, 85 | "id": "decdbf09", 86 | "metadata": {}, 87 | "outputs": [], 88 | "source": [] 89 | } 90 | ], 91 | "metadata": { 92 | "kernelspec": { 93 | "display_name": "Python 3 (ipykernel)", 94 | "language": "python", 95 | "name": "python3" 96 | }, 97 | "language_info": { 98 | "codemirror_mode": { 99 | "name": "ipython", 100 | "version": 3 101 | }, 102 | "file_extension": ".py", 103 | "mimetype": "text/x-python", 104 | "name": "python", 105 | "nbconvert_exporter": "python", 106 | "pygments_lexer": "ipython3", 107 | "version": "3.8.15" 108 | } 109 | }, 110 | "nbformat": 4, 111 | "nbformat_minor": 5 112 | } 113 | --------------------------------------------------------------------------------