jamalsenouci commited on
Commit
c6919c4
1 Parent(s): 17f6ac6

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .devcontainer/devcontainer.json +22 -0
  2. .gitignore +27 -0
  3. .ipynb_checkpoints/Untitled-checkpoint.ipynb +6 -0
  4. Dockerfile +35 -0
  5. LICENSE +21 -0
  6. README.docker.md +15 -0
  7. README.md +737 -7
  8. Untitled.ipynb +486 -0
  9. bark/__init__.py +2 -0
  10. bark/__main__.py +4 -0
  11. bark/api.py +125 -0
  12. bark/assets/prompts/announcer.npz +3 -0
  13. bark/assets/prompts/de_speaker_0.npz +3 -0
  14. bark/assets/prompts/de_speaker_1.npz +3 -0
  15. bark/assets/prompts/de_speaker_2.npz +3 -0
  16. bark/assets/prompts/de_speaker_3.npz +3 -0
  17. bark/assets/prompts/de_speaker_4.npz +3 -0
  18. bark/assets/prompts/de_speaker_5.npz +3 -0
  19. bark/assets/prompts/de_speaker_6.npz +3 -0
  20. bark/assets/prompts/de_speaker_7.npz +3 -0
  21. bark/assets/prompts/de_speaker_8.npz +3 -0
  22. bark/assets/prompts/de_speaker_9.npz +3 -0
  23. bark/assets/prompts/en_speaker_0.npz +3 -0
  24. bark/assets/prompts/en_speaker_1.npz +3 -0
  25. bark/assets/prompts/en_speaker_2.npz +3 -0
  26. bark/assets/prompts/en_speaker_3.npz +3 -0
  27. bark/assets/prompts/en_speaker_4.npz +3 -0
  28. bark/assets/prompts/en_speaker_5.npz +3 -0
  29. bark/assets/prompts/en_speaker_6.npz +3 -0
  30. bark/assets/prompts/en_speaker_7.npz +3 -0
  31. bark/assets/prompts/en_speaker_8.npz +3 -0
  32. bark/assets/prompts/en_speaker_9.npz +3 -0
  33. bark/assets/prompts/es_speaker_0.npz +3 -0
  34. bark/assets/prompts/es_speaker_1.npz +3 -0
  35. bark/assets/prompts/es_speaker_2.npz +3 -0
  36. bark/assets/prompts/es_speaker_3.npz +3 -0
  37. bark/assets/prompts/es_speaker_4.npz +3 -0
  38. bark/assets/prompts/es_speaker_5.npz +3 -0
  39. bark/assets/prompts/es_speaker_6.npz +3 -0
  40. bark/assets/prompts/es_speaker_7.npz +3 -0
  41. bark/assets/prompts/es_speaker_8.npz +3 -0
  42. bark/assets/prompts/es_speaker_9.npz +3 -0
  43. bark/assets/prompts/fr_speaker_0.npz +3 -0
  44. bark/assets/prompts/fr_speaker_1.npz +3 -0
  45. bark/assets/prompts/fr_speaker_2.npz +3 -0
  46. bark/assets/prompts/fr_speaker_3.npz +3 -0
  47. bark/assets/prompts/fr_speaker_4.npz +3 -0
  48. bark/assets/prompts/fr_speaker_5.npz +3 -0
  49. bark/assets/prompts/fr_speaker_6.npz +3 -0
  50. bark/assets/prompts/fr_speaker_7.npz +3 -0
.devcontainer/devcontainer.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/python
3
+ {
4
+ "name": "Python 3",
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "image": "mcr.microsoft.com/devcontainers/python:1-3.10-bookworm"
7
+
8
+ // Features to add to the dev container. More info: https://containers.dev/features.
9
+ // "features": {},
10
+
11
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
12
+ // "forwardPorts": [],
13
+
14
+ // Use 'postCreateCommand' to run commands after the container is created.
15
+ // "postCreateCommand": "pip3 install --user -r requirements.txt",
16
+
17
+ // Configure tool-specific properties.
18
+ // "customizations": {},
19
+
20
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21
+ // "remoteUser": "root"
22
+ }
.gitignore ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ __pycache__/
2
+
3
+ # Ignore all directories
4
+ */
5
+
6
+ *.json
7
+ *.mp4
8
+ *.wav
9
+ # But don't ignore these specific directories
10
+ !/bark/
11
+ !/bark_infinity/
12
+ !/notebooks/
13
+ !/webui/
14
+ !/old_setup_files/
15
+ !/bark_infinity/hubert/
16
+ !/one-click-bark-installer/
17
+
18
+ bark_samples/
19
+ bark/assets/prompts/*.wav
20
+ bark_infinity/assets/prompts/*.wav
21
+ *.wav
22
+
23
+ custom_speakers/
24
+ .vscode
25
+ bark_infinity.egg-info/
26
+ .history/
27
+ *.log
.ipynb_checkpoints/Untitled-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:11.8.0-base-ubuntu22.04 as cuda
2
+
3
+ ENV PYTHON_VERSION=3.10
4
+
5
+ RUN export DEBIAN_FRONTEND=noninteractive \
6
+ && apt-get -qq update \
7
+ && apt-get -qq install --no-install-recommends \
8
+ libsndfile1-dev \
9
+ git \
10
+ python${PYTHON_VERSION} \
11
+ python${PYTHON_VERSION}-venv \
12
+ python3-pip \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \
16
+ ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python && \
17
+ ln -s -f /usr/bin/pip3 /usr/bin/pip
18
+
19
+ RUN pip install --upgrade pip
20
+
21
+ RUN pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
22
+
23
+ FROM cuda as app
24
+ # 2. Copy files
25
+ COPY . /src
26
+
27
+ WORKDIR /src
28
+ # 3. Install dependencies
29
+ RUN pip install -r requirements-pip.txt
30
+
31
+ # 4. Install notebook
32
+ RUN pip install encodec rich-argparse
33
+
34
+ EXPOSE 8082
35
+ CMD ["python", "bark_webui.py"]
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Suno, Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.docker.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Instructions for Docker
2
+
3
+ Building the Docker image
4
+
5
+ ```bash
6
+ docker build -t bark-infinity:latest .
7
+ ```
8
+
9
+ Running the image
10
+
11
+ ```bash
12
+ docker run --gpus all -p 7860:7860 -v "$(pwd)/.cache:/root/.cache" -v "$(pwd):/src" --rm -e GRADIO_SERVER_NAME=0.0.0.0 bark-infinity:latest
13
+ ```
14
+
15
+ You can now use it at http://localhost:7860
README.md CHANGED
@@ -1,12 +1,742 @@
1
  ---
2
- title: Bark
3
- emoji: 🌖
4
- colorFrom: red
5
- colorTo: green
6
  sdk: gradio
7
  sdk_version: 3.39.0
8
- app_file: app.py
9
- pinned: false
10
  ---
 
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: bark
3
+ app_file: bark_webui.py
 
 
4
  sdk: gradio
5
  sdk_version: 3.39.0
 
 
6
  ---
7
+ # 🚀 BARK INFINITY, Voices are Just Sounds. 🎶 🌈✨🚀
8
 
9
+ #### Why this fork ?
10
+
11
+ I do not have a GPU so I need Google Colab for running the python code, as there are notebooks available in this project my focus is here.
12
+
13
+ [![Open In Colab](https://tinyurl.com/3m5bcd9h)](https://colab.research.google.com/github/steinhaug/bark-infinity/blob/main/notebooks/Bark-Infinity.ipynb)
14
+ [![Open In Colab](https://tinyurl.com/jjbfsbk2)](https://colab.research.google.com/github/steinhaug/bark-infinity/blob/main/notebooks/Bark_Infinity_Long_Form_Audio_Colab.ipynb)
15
+
16
+ <br><br><br><br>
17
+
18
+
19
+ # 🎉 Bark INFINITY Automatic Windows Installer, NVIDIA (CPU update soon) 🎉
20
+
21
+
22
+ ### ⚠️ Note: make sure you fully extract the .zip file before running the .bat files. Check this image if you aren't sure: [install_help.PNG](https://raw.githubusercontent.com/JonathanFly/bark/main/one-click-bark-installer/install_help.PNG)
23
+
24
+ ## Install Prerequisites:
25
+
26
+ 1. **Just the regular Windows NVIDIA drivers**. You don't need anything else installed ahead of time. Not Pytorch. Nothing with `Cuda` in the name. Not even Python. In fact if you installed anything on your Windows system without using a venv or conda, it may cause a problem.
27
+ 2. *(Optional But Recommended)* The Windows Terminal https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701 -- Bark still has a lot of text output and it's looks nicer and is easier to read in the Windows Terminal. But you can also use the regular Windows Command Prompt.
28
+
29
+ ## Install Steps
30
+
31
+ 1. Download the latest zip file from the releases page: https://github.com/JonathanFly/bark/releases
32
+ 2. Extract the zip file into a directory. Choose a place where Bark will be installed. You will unzip about six small files.
33
+ 3. Click on `INSTALL_bark_infinity_windows.bat` (you should not need to be administrator)
34
+ 4. If the install finished with no errors, close that terminal window. Close any other open command line windows as well.
35
+ 5. Click `LAUNCH_already_installed_bark_infinity_windows.bat`
36
+
37
+ ## Install Problems
38
+
39
+ 1. If you get a Windows permissions error, I seemed to get it randomly. Just trying again usually fixed it. You don't even need to restart from scratch, just rerun the script that threw the error.
40
+
41
+
42
+ ### Command Line:
43
+ Click `TROUBLESHOOT_bark_setup_manually_by_entering_the_conda_environment.bat`
44
+ ```
45
+ cd bark
46
+ python bark_perform.py
47
+ python bark_perform.py --help
48
+ ```
49
+ ### Trouble Shooting:
50
+ Click `TROUBLESHOOT_bark_setup_manually_by_entering_the_conda_environment.bat`
51
+
52
+ ```
53
+ -----Manual Updates-----
54
+ Type `conda update -y -n base conda` to update conda.
55
+ Type `conda update -y --all --solver=libmamba` to update all packages.
56
+ Type `conda clean --all` to free up disk space from unused versions.
57
+ Type `ffdl install -U --add-path` to try to fix ffmpeg not not problems.
58
+ Type `pip install -r requirements-extra.txt` to try to manually install pip requirements.
59
+
60
+ Type `conda env update -y -f environment-cuda-installer.yml --prune --solver=libmamba` to update your env manually, if the .yml changed.
61
+ Type `cd bark` to enter the bark directory and then `git pull` to update the repo code.
62
+ Type `git branch` to view branches and then
63
+ Type `git checkout <branch_name>` to switch branches.
64
+ (You can try `git checkout bark_amd_directml_test` branch if you have an AMD GPU)
65
+
66
+ -----Still Not Working?-----
67
+ Go ahead and @ me on Bark Official Discord, username "Jonathan Fly" jonathanfly.
68
+ Don't worry about waking me up with a message, my Discord never makes audible alerts.
69
+
70
+ -----How do I get out of here?-----
71
+ Type 'conda deactivate' to exit this environment and go back to normal terminal.
72
+ ```
73
+
74
+ ![LAUNCH_already_installed_bark_infinity_windows.bat](https://github.com/JonathanFly/bark/assets/163408/fcd91d15-6bee-44c7-8c99-95ca48fbc1d5)
75
+
76
+
77
+
78
+ # 🎉 Pytorch 2.0 Bark AMD Install Test Pytorch 2.0 🎉
79
+
80
+
81
+ **DirectML works on AMD in Pytorch 2.0 Confirmed works.**
82
+ It's not super fast but it's a lot faster than CPU.
83
+
84
+ Bark AMD DirectML Instructions.
85
+
86
+ What is DirectML?
87
+ https://learn.microsoft.com/en-us/windows/ai/directml/gpu-pytorch-windows
88
+
89
+ Install Miniconda. https://repo.anaconda.com/miniconda/Miniconda3-py310_23.3.1-0-Windows-x86_64.exe
90
+
91
+ Then go to start menu and start a new "Ananconda Prompt" not regular windows command line
92
+
93
+
94
+ ```
95
+ conda update -y conda
96
+ conda update -y -n base conda
97
+ conda install -y -n base conda-libmamba-solver
98
+ conda create --name pydml_torch2 -y python=3.10.6
99
+ conda activate pydml_torch2
100
+ ```
101
+
102
+ make sure you see (pydml_torch2) in the corner of of your prompt.
103
+ ***(pydml_torch2) C:\Users\YourName***
104
+
105
+ ```
106
+ conda install -y pip git --solver=libmamba
107
+ conda update -y --all --solver=libmamba
108
+
109
+ pip install ffmpeg_downloader
110
+ ffdl install -U --add-path
111
+ ```
112
+ Now quit out of the terminal and restart. We need ffmpeg in the path, which means you need to be able to type `ffmpeg -version` and have it work. If you close and restart, you should be able to do that.
113
+
114
+ So close the terminal, close all window command lines or terminals to be sure.
115
+ Then go back start menu and start a new "Ananaconda Prompt". This should be same you started the install.
116
+
117
+ ```
118
+ conda activate pydml_torch2
119
+ ```
120
+ make sure you see (pydml_torch2) in the corner again. ***(pydml_torch2) C:\Users\YourName*** etc.
121
+
122
+ Now try typing
123
+ ```
124
+ ffmpeg -version
125
+ ```
126
+
127
+ Do you see ffmpeg 6.0? If it doesn't work you can keep going and you can use .wav file outputs, and fix it later.
128
+
129
+ Now the big conda install command. This could take 5 to 15 minutes, and if you have a slow internet it could even take hours, because it downloads multiple gigabytes. So if looks like it's frozen, let it go. Check your task manager and see if it's downloading.
130
+
131
+ ### For testing torch 2.0, just some giant pip installs:
132
+ ```
133
+ pip install torch==2.0.0 torchvision==0.15.1 torch-directml==0.2.0.dev230426 opencv-python torchvision==0.15.1 wget torch-directml==0.2.0.dev230426 pygments numpy pandas tensorboard matplotlib tqdm pyyaml boto3 funcy torchaudio transformers pydub pathvalidate rich nltk chardet av hydra-core>=1.1 einops scipy num2words pywin32 ffmpeg ffmpeg-python sentencepiece spacy==3.5.2 librosa jsonschema pytorch_lightning==1.9.4
134
+
135
+ pip install encodec flashy>=0.0.1 audiolm_pytorch==1.1.4 demucs
136
+
137
+ pip install universal-startfile hydra_colorlog julius soundfile==0.12.1 gradio>=3.35.2 rich_argparse flashy>=0.0.1 ffmpeg_downloader rich_argparse devtools vector_quantize_pytorch
138
+
139
+ pip install https://github.com/Sharrnah/fairseq/releases/download/v0.12.4/fairseq-0.12.4-cp310-cp310-win_amd64.whl
140
+ ``````
141
+
142
+ First set a SUNO_USE_DIRECTML variable. This tells Bark to use DirectML. If this doesn't work you can edit `/bark_infinity/config.py`` and set `SUNO_USE_DIRECTML`` to `True`` in the `DEFAULTS`` section.
143
+ ```
144
+ set SUNO_USE_DIRECTML=1
145
+ ```
146
+
147
+ Download Bark:
148
+ ```
149
+ git clone https://github.com/JonathanFly/bark.git
150
+ cd bark
151
+ ```
152
+ Change to the AMD Test Version
153
+ ```
154
+ git checkout bark_amd_directml_test
155
+ ```
156
+
157
+ Now try running it. Bark has to download all the models the first time it runs, so it might look frozen for awhile. It's another 10 gigs of files.
158
+ ```
159
+ python bark_perform.py
160
+ ```
161
+ When I tested this install, `bark_perform.py` seemed to freeze at downloading models without making progress. I don't know if was a fluke, but I ran `python bark_webui.py` and it downloaded them fine.
162
+
163
+ Start the Bark UI
164
+ ```
165
+ python bark_webui.py
166
+ ```
167
+
168
+ Things that don't work:
169
+ 1. Voice Cloning (might work?)
170
+ 2. Top_k and top_p
171
+ 3. Probably more things I haven't tested.
172
+
173
+ ### Start Back UI Later
174
+ 1. Click Anaconda Prompt in start menu
175
+ 2. `conda activate pydml_torch2`
176
+ 3. cd bark
177
+ 4. `python bark_webui.py`
178
+
179
+ ### Make it faster? (Note for later, don't try yet)
180
+
181
+ 1. Install MKL exe https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-download.html
182
+ ```
183
+ conda install -y mkl mkl-service mkl_fft libcblas liblapacke liblapack blas-devel mkl-include mkl_random mkl-devel mkl-include libblas=*=*mkl mkl-static intel-openmp blas=*=*mkl -c intel -c conda-forge --solver=libmamba
184
+ ```
185
+
186
+ # 🏹↗️ This AMD Pytorch 1.13.1 (slower)
187
+
188
+ ```
189
+ conda update -y conda
190
+ conda update -y -n base conda
191
+ conda install -y -n base conda-libmamba-solver
192
+ conda create --name pydml -y python=3.10.6
193
+ conda activate pydml
194
+ ```
195
+
196
+ make sure you see (pydml) in the corner of of your prompt.
197
+ ***(pydml) C:\Users\YourName***
198
+
199
+ ```
200
+ conda install -y pip git --solver=libmamba
201
+ conda update -y --all --solver=libmamba
202
+
203
+ pip install ffmpeg_downloader
204
+ ffdl install -U --add-path
205
+ ```
206
+ Now quit out of the terminal and restart. We need ffmpeg in the path, which means you need to be able to type `ffmpeg -version` and have it work. If you close and restart, you should be able to do that.
207
+
208
+ So close the terminal, close all window command lines or terminals to be sure.
209
+ Then go back start menu and start a new "Ananaconda Prompt". This should be same you started the install.
210
+
211
+ ```
212
+ conda activate pydml
213
+ ```
214
+ make sure you see (pydml) in the corner again. ***(pydml) C:\Users\YourName*** etc.
215
+
216
+ Now try typing
217
+ ```
218
+ ffmpeg -version
219
+ ```
220
+
221
+ Do you see ffmpeg 6.0? If it doesn't work you can keep going and you can use .wav file outputs, and fix it later.
222
+
223
+ Now the big conda install command. This could take 5 to 15 minutes, and if you have a slow internet it could even take hours, because it downloads multiple gigabytes. So if looks like it's frozen, let it go. Check your task manager and see if it's downloading.
224
+
225
+ ```
226
+ conda install -y pytorch==1.13.1 pygments numpy pandas tensorboard matplotlib tqdm pyyaml boto3 funcy torchvision==0.14.1 torchaudio==0.13.1 cpuonly transformers pydub pathvalidate rich nltk chardet av hydra-core>=1.1 einops scipy num2words pywin32 ffmpeg ffmpeg-python sentencepiece spacy==3.5.2 librosa jsonschema -c pytorch -c conda-forge --solver=libmamba
227
+ ```
228
+ Now that's done a few more things we need, that are not in conda. So we have to use pip.
229
+
230
+ This is where the instal can go wrong up. **We don't want anything to upgrade either torch or torchaudio to torch 2.0**, and it often happens by accident. (As far I know AMD DirectML Windows only works in Torch 1.13, not 2.0. If anyone knows different let me know!)
231
+
232
+ If you somehow end up installing torch 2.0. Try `pip uninstall torch torchaudio` and then redo the big long conda install command (the one with `pytorch==1.13.1` in it).
233
+
234
+ ```
235
+ pip install universal-startfile hydra_colorlog julius soundfile==0.12.1 gradio>=3.35.2 rich_argparse flashy>=0.0.1 ffmpeg_downloader rich_argparse devtools
236
+ ```
237
+
238
+
239
+ ```
240
+ pip install encodec flashy>=0.0.1 audiolm_pytorch==1.1.4 demucs --no-dependencies
241
+
242
+ pip install https://github.com/Sharrnah/fairseq/releases/download/v0.12.4/fairseq-0.12.4-cp310-cp310-win_amd64.whl --no-dependencies
243
+ ```
244
+
245
+ And now finally the actual `torch-directml` that has GPU support. I found installing this last seems best, but you could try doing it earlier.
246
+ ```
247
+ pip install torch-directml==0.1.13.1.dev230413
248
+ ```
249
+ If everything worked, you might be done.
250
+ Now we install Bark. And then run one command line test first with bark_perform.py
251
+
252
+ First set a SUNO_USE_DIRECTML variable. This tells Bark to use DirectML. If this doesn't work you can edit `/bark_infinity/config.py`` and set `SUNO_USE_DIRECTML`` to `True`` in the `DEFAULTS`` section.
253
+ ```
254
+ set SUNO_USE_DIRECTML=1
255
+ ```
256
+
257
+ Download Bark:
258
+ ```
259
+ git clone https://github.com/JonathanFly/bark.git
260
+ cd bark
261
+ ```
262
+ Change to the AMD Test Version
263
+ ```
264
+ git checkout bark_amd_directml_test
265
+ ```
266
+
267
+ Now try running it. Bark has to download all the models the first time it runs, so it might look frozen for awhile. It's another 10 gigs of files.
268
+ ```
269
+ python bark_perform.py
270
+ ```
271
+ When I tested this install, `bark_perform.py` seemed to freeze at downloading models without making progress. I don't know if was a fluke, but I ran `python bark_webui.py` and it downloaded them fine.
272
+
273
+ Start the Bark UI
274
+ ```
275
+ python bark_webui.py
276
+ ```
277
+
278
+ Things that don't work:
279
+ 1. Voice Cloning
280
+ 2. Top_k and top_p
281
+ 3. Probably more things I haven't tested.
282
+
283
+ ### Start Back UI Later
284
+ 1. Click Anaconda Prompt in start menu
285
+ 2. `conda activate pydml`
286
+ 3. cd bark
287
+ 4. `python bark_webui.py`
288
+
289
+ ### Make it faster? (Note for later, don't try yet)
290
+
291
+ 1. Install MKL exe https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-download.html
292
+ ```
293
+ conda install -y mkl mkl-service mkl_fft libcblas liblapacke liblapack blas-devel mkl-include mkl_random mkl-devel mkl-include libblas=*=*mkl mkl-static intel-openmp blas=*=*mkl -c intel -c conda-forge --solver=libmamba
294
+ ```
295
+
296
+
297
+ ⚡ Low GPU memory? No problem. CPU offloading. ⚡ Somewhat easy install?
298
+
299
+ # 🎉 Install Bark Infinity Any OS With Mamba (or Conda) 🎉
300
+
301
+
302
+ ## Mamba Install (Still Works) (Should work...)
303
+
304
+
305
+
306
+ (Mamba is a fast version of conda. They should work the same if you install either one, just change mamba to conda or vice-versa.)
307
+
308
+ Pip and conda/mamba are two _different_ ways of installing Bark Infinity. If you use **Mamba** do not install anything. Don't install _pytorch_, do not install anything with 'CUDA' in the same. You don't need to lookup a YouTube tutorial. Just type the commands. The only thing you need installed is the NVIDIA drivers.
309
+
310
+ **Take note of which lines are for NVIDIA or CPU, or Linux or Windows.**
311
+
312
+ There is one exception, on Windows if you don't have the better Windows Terminal installed, that is a nice to have feature https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701
313
+
314
+ You don't have to but it may display the output from the bark commands better. When you start **Anaconda Prompt (miniconda3)** you can do it from the new Windows Terminal app, clicking on the down arrow next to the plus, should let you pick **Anaconda Prompt (miniconda3)**
315
+
316
+ 1. Go here: [https://github.com/conda-forge/miniforge#mambaforge](https://github.com/conda-forge/miniforge#mambaforge)
317
+
318
+ 2.
319
+ 3. Download a **Python 3.10 Miniconda3** installer for your OS. Windows 64-bit, macOS, and Linux probably don't need a guide.
320
+ a. Install the **Mambaforge** for your OS, not specifically Windows. OSX for OSX etc.
321
+ b. Don't install Mambaforge-pypy3. (It probably works fine, it is just not what I tested.) Install the one above that, just plain **Mambaforge**. Or you can use **Conda**, Mamba should faster but sometimes Conda may be more compatible.
322
+
323
+ 1. Install the **Python 3.10 Miniconda3** exe. Then start the miniforge **'Miniforge Prompt** Terminal which is a new program it installed. You will always use this program for Bark.
324
+
325
+ 2. Start **'Miniforge Prompt** Be careful not to start the regular windows command line. (Unless you installed the new Terminal and know how to switch.) It should say **"Anaconda Prompt (miniconda3)**"
326
+
327
+ You should see also terminal that says "**(base)**".
328
+
329
+ ### Do not move forward until you see _(base)_.
330
+
331
+ 5. **Choose the place to install Bark Infinity directory.** You can also just leave it at default. If you make a LOT of audio you think about a place with a lot of space.
332
+
333
+ When you start **"Anaconda Prompt (miniconda3)"** you will be in a directory, in Windows, probably something like** "C:\Users\YourName"**. Okay to install there. Just remember where you put it. It will be in **/bark.** (If you already had bark-infinity installed and want to update instead of reinstalling, skip to the end.)
334
+
335
+ 6. Type the next commands _exactly_. Hit "Y" for yes where you need to:
336
+
337
+
338
+
339
+ ```
340
+ mamba update -y mamba
341
+ mamba create --name bark-infinity python=3.10
342
+ mamba activate bark-infinity
343
+
344
+ ## NVIDIA GPU ONLY
345
+ mamba install -y -k cuda ninja git pip -c nvidia/label/cuda-11.7.0 -c nvidia
346
+ pip install torch==2.0.1+cu117 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
347
+ ## END NVIDIA GPU ONLY
348
+
349
+ ## CPU ONLY, Or MacOS
350
+ mamba install -y -k ninja git
351
+ pip install torch torchvision torchaudio
352
+ ## END CPU ONLY, Or MacOS
353
+
354
+
355
+ ## WINDOWS ONLY fairseq
356
+ pip install fairseq@https://github.com/Sharrnah/fairseq/releases/download/v0.12.4/fairseq-0.12.4-cp310-cp310-win_amd64.whl
357
+
358
+ ## NON-WINDOWS fairseq
359
+ mamba install fairseq
360
+
361
+ pip install audiolm_pytorch==1.1.4 --no-deps
362
+
363
+ git clone https://github.com/JonathanFly/bark.git
364
+ cd bark
365
+
366
+ pip install -r barki-allpip.txt --upgrade
367
+ ffdl install -U --add-path
368
+ ```
369
+
370
+ # Run Bark Infinity
371
+
372
+ ## Run command line version
373
+ ```
374
+ python bark_perform.py
375
+ ```
376
+ ## Run web ui version
377
+ ```
378
+ python bark_webui.py
379
+ ```
380
+
381
+ (If you see a warning that "No GPU being used. Careful, inference might be very slow!" after `python bark_perform.py` then something may be wrong, if you have GPU. If you *don't* see that then the GPU is working.)
382
+
383
+ # Start Bark Infinity At A Later Time
384
+
385
+ To restart later, start **Miniforge Prompt.** Not Regular Prompt. Make sure you see (base) You will type a command to activate **bark-infinity** and of base, like this:
386
+
387
+ ```
388
+ mamba activate bark-infinity
389
+ cd bark
390
+ python bark_webui.py
391
+ ```
392
+
393
+ # Update Bark Infinity
394
+
395
+ ```
396
+ git pull
397
+ pip install -r barki-allpip.txt --upgrade
398
+ ```
399
+
400
+ I have so much good Bark I need to post at [twitter.com/jonathanfly](https://twitter.com/jonathanfly)
401
+
402
+
403
+ # 🌠 The Past: 🌠
404
+
405
+ Bark Infinity started as a humble 💻 command line wrapper, a CLI 💬. Built from simple keyword commands, it was a proof of concept 🧪, a glimmer of potential 💡.
406
+
407
+ # 🌟 The Present: 🌟
408
+
409
+ Bark Infinity _evolved_ 🧬, expanding across dimensions 🌐. Infinite Length 🎵🔄, Infinite Voices 🔊🌈, and a true high point in human history: [🌍 Infinite Awkwardness 🕺](https://twitter.com/jonathanfly/status/1650001584485552130). But for some people, the time-tested command line interface was not a good fit. Many couldn't even try Bark 😞, struggling with CUDA gods 🌩 and being left with cryptic error messages 🧐 and a chaotic computer 💾. Many people felt very… UN INFINITE.
410
+
411
+ # 🔜🚀 The Future: 🚀
412
+
413
+ 🚀 Bark Infinity 🐾 was born in the command line, and Bark Infinity grew within the command line. We live in the era where old fashioned command line applications are wrapped in ✨fancy Gradio Uis🌈 and 🖱️One Click Installers. We all must adapt to a changing world, right? *Or do we?*
414
+
415
+
416
+
417
+ ## 🌟 (OLD NOT UPDATED) README 🌟 __
418
+
419
+ ### 1. INFINITY VOICES 🔊🌈
420
+ Discover cool new voices and reuse them. Performers, musicians, sound effects, two party dialog scenes. Save and share them. Every audio clip saves a speaker.npz file with the voice. To reuse a voice, move the generated speaker.npz file (named the same as the .wav file) to the "prompts" directory inside "bark" where all the other .npz files are.
421
+
422
+ 🔊 With random celebrity appearances!
423
+
424
+ (I accidentally left a bunch of voices in the repo, some of them are pretty good. Use --history_prompt 'en_fiery' for the same voice as the audio sample right after this sentence.)
425
+
426
+ https://user-images.githubusercontent.com/163408/233747981-173b5f03-654e-4a0e-b71b-5d220601fcc7.mp4
427
+
428
+
429
+ ### 2. INFINITY LENGTH 🎵🔄
430
+ Any length prompt and audio clips. Sometimes the final result is seamless, sometimes it's stable (but usually not both!).
431
+
432
+ 🎵 Now with Slowly Morphing Rick Rolls! Can you even spot the seams in the most earnest Rick Rolls you've ever heard in your life?
433
+
434
+ https://user-images.githubusercontent.com/163408/233747400-b18411f8-afcb-437d-9288-c54cc2c95e62.mp4
435
+
436
+ ### 🕺 Confused Travolta Mode 🕺
437
+ Confused Travolta GIF
438
+ ![confused_travolta](https://user-images.githubusercontent.com/163408/233747428-c6bf03e2-b3ce-4ce3-a29d-836bf73a4ec2.gif)
439
+
440
+ Can your text-to-speech model stammer and stall like a student answering a question about a book they didn't read? Bark can. That's the human touch. The *semantic* touch. You can almost feel the awkward silence through the screen.
441
+
442
+ ## 💡 But Wait, There's More: Travolta Mode Isn't Just A Joke 💡
443
+
444
+ Are you tired of telling your TTS model what to say? Why not take a break and let your TTS model do the work for you. With enough patience and Confused Travolta Mode, Bark can finish your jokes for you.
445
+
446
+ https://user-images.githubusercontent.com/163408/233746957-f3bbe25f-c8f0-4570-97b1-1005e1b40cbe.mp4
447
+
448
+ Truly we live in the future. It might take 50 tries to get a joke and it's probably an accident, but all 49 failures are also *very* amusing so it's a win/win. (That's right, I set a single function flag to False in a Bark and raved about the amazing new feature. Everything here is small potatoes really.)
449
+
450
+ https://user-images.githubusercontent.com/163408/233746872-cac78447-8e87-49e7-b79b-28ec51264019.mp4
451
+
452
+
453
+
454
+ _**BARK INFINITY** is possible because Bark is such an amazingly simple and powerful model that even I could poke around easily._
455
+
456
+ _For music, I recommend using the --split_by_lines and making sure you use a multiline string as input. You'll generally get better results if you manually split your text, which I neglected to provide an easy way to do because I stayed too late listening to 100 different Bark versions of a scene an Andor and failed Why was 6 afraid of 7 jokes._
457
+
458
+ ## 📝 Command Line Options 📝 (Some of these parameters are not implemented.)
459
+
460
+ Type --help or use the GUI
461
+ ```
462
+ python bark_perform.py --help
463
+ ```
464
+ ### prompt_file input text file example
465
+ ```myprompts.txt
466
+ This is the first prompt.
467
+ Lots of text here maybe.
468
+ As long as you want.
469
+
470
+ AAAAA
471
+
472
+ This is the second prompt.
473
+
474
+ AAAAA
475
+
476
+ This is the third prompt.
477
+ ```
478
+
479
+ ```
480
+ python bark_perform.py --prompt_file myprompts.txt --split_input_into_separate_prompts_by string --split_input_into_separate_prompts_by_value AAAAA --output_dir myprompts_samples
481
+ ```
482
+
483
+
484
+ # 🐶 Bark Original Readme 🐶
485
+
486
+ [![](https://dcbadge.vercel.app/api/server/J2B2vsjKuE?style=flat&compact=True)](https://discord.gg/J2B2vsjKuE)
487
+ [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/OnusFM.svg?style=social&label=@OnusFM)](https://twitter.com/OnusFM)
488
+ <a href="http://www.repostatus.org/#active"><img src="http://www.repostatus.org/badges/latest/active.svg" /></a>
489
+
490
+ [Examples](https://suno-ai.notion.site/Bark-Examples-5edae8b02a604b54a42244ba45ebc2e2) • [Suno Studio Waitlist](https://3os84zs17th.typeform.com/suno-studio) • [Updates](#-updates) • [How to Use](#-usage-in-python) • [Installation](#-installation) • [FAQ](#-faq)
491
+
492
+ [//]: <br> (vertical spaces around image)
493
+ <br>
494
+ <p align="center">
495
+ <img src="https://user-images.githubusercontent.com/5068315/235310676-a4b3b511-90ec-4edf-8153-7ccf14905d73.png" width="500"></img>
496
+ </p>
497
+ <br>
498
+
499
+ Bark is a transformer-based text-to-audio model created by [Suno](https://suno.ai). Bark can generate highly realistic, multilingual speech as well as other audio - including music, background noise and simple sound effects. The model can also produce nonverbal communications like laughing, sighing and crying. To support the research community, we are providing access to pretrained model checkpoints, which are ready for inference and available for commercial use.
500
+
501
+ ## ⚠ Disclaimer
502
+ Bark was developed for research purposes. It is not a conventional text-to-speech model but instead a fully generative text-to-audio model, which can deviate in unexpected ways from provided prompts. Suno does not take responsibility for any output generated. Use at your own risk, and please act responsibly.
503
+
504
+ ## 🎧 Demos
505
+
506
+ [![Open in Spaces](https://img.shields.io/badge/🤗-Open%20in%20Spaces-blue.svg)](https://huggingface.co/spaces/suno/bark)
507
+ [![Open on Replicate](https://img.shields.io/badge/®️-Open%20on%20Replicate-blue.svg)](https://replicate.com/suno-ai/bark)
508
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1eJfA2XUa-mXwdMy7DoYKVYHI1iTd9Vkt?usp=sharing)
509
+
510
+ ## 🚀 Updates
511
+
512
+ **2023.05.01**
513
+ - ©️ Bark is now licensed under the MIT License, meaning it's now available for commercial use!
514
+ - ⚡ 2x speed-up on GPU. 10x speed-up on CPU. We also added an option for a smaller version of Bark, which offers additional speed-up with the trade-off of slightly lower quality.
515
+ - 📕 [Long-form generation](notebooks/long_form_generation.ipynb), voice consistency enhancements and other examples are now documented in a new [notebooks](./notebooks) section.
516
+ - 👥 We created a [voice prompt library](https://suno-ai.notion.site/8b8e8749ed514b0cbf3f699013548683?v=bc67cff786b04b50b3ceb756fd05f68c). We hope this resource helps you find useful prompts for your use cases! You can also join us on [Discord](https://discord.gg/J2B2vsjKuE), where the community actively shares useful prompts in the **#audio-prompts** channel.
517
+ - 💬 Growing community support and access to new features here:
518
+
519
+ [![](https://dcbadge.vercel.app/api/server/J2B2vsjKuE)](https://discord.gg/J2B2vsjKuE)
520
+
521
+ - 💾 You can now use Bark with GPUs that have low VRAM (<4GB).
522
+
523
+ **2023.04.20**
524
+ - 🐶 Bark release!
525
+
526
+ ## 🐍 Usage in Python
527
+
528
+ <details open>
529
+ <summary><h3>🪑 Basics</h3></summary>
530
+
531
+ ```python
532
+ from bark import SAMPLE_RATE, generate_audio, preload_models
533
+ from scipy.io.wavfile import write as write_wav
534
+ from IPython.display import Audio
535
+
536
+ # download and load all models
537
+ preload_models()
538
+
539
+ # generate audio from text
540
+ text_prompt = """
541
+ Hello, my name is Suno. And, uh — and I like pizza. [laughs]
542
+ But I also have other interests such as playing tic tac toe.
543
+ """
544
+ audio_array = generate_audio(text_prompt)
545
+
546
+ # save audio to disk
547
+ write_wav("bark_generation.wav", SAMPLE_RATE, audio_array)
548
+
549
+ # play text in notebook
550
+ Audio(audio_array, rate=SAMPLE_RATE)
551
+ ```
552
+
553
+ [pizza.webm](https://user-images.githubusercontent.com/5068315/230490503-417e688d-5115-4eee-9550-b46a2b465ee3.webm)
554
+
555
+ </details>
556
+
557
+ <details open>
558
+ <summary><h3>🌎 Foreign Language</h3></summary>
559
+ <br>
560
+ Bark supports various languages out-of-the-box and automatically determines language from input text. When prompted with code-switched text, Bark will attempt to employ the native accent for the respective languages. English quality is best for the time being, and we expect other languages to further improve with scaling.
561
+ <br>
562
+ <br>
563
+
564
+ ```python
565
+
566
+ text_prompt = """
567
+ 추석은 내가 가장 좋아하는 명절이다. 나는 며칠 동안 휴식을 취하고 친구 및 가족과 시간을 보낼 수 있습니다.
568
+ """
569
+ audio_array = generate_audio(text_prompt)
570
+ ```
571
+ [suno_korean.webm](https://user-images.githubusercontent.com/32879321/235313033-dc4477b9-2da0-4b94-9c8b-a8c2d8f5bb5e.webm)
572
+
573
+ *Note: since Bark recognizes languages automatically from input text, it is possible to use for example a german history prompt with english text. This usually leads to english audio with a german accent.*
574
+
575
+ </details>
576
+
577
+ <details open>
578
+ <summary><h3>🎶 Music</h3></summary>
579
+ Bark can generate all types of audio, and, in principle, doesn't see a difference between speech and music. Sometimes Bark chooses to generate text as music, but you can help it out by adding music notes around your lyrics.
580
+ <br>
581
+ <br>
582
+
583
+ ```python
584
+ text_prompt = """
585
+ ♪ In the jungle, the mighty jungle, the lion barks tonight ♪
586
+ """
587
+ audio_array = generate_audio(text_prompt)
588
+ ```
589
+ [lion.webm](https://user-images.githubusercontent.com/5068315/230684766-97f5ea23-ad99-473c-924b-66b6fab24289.webm)
590
+ </details>
591
+
592
+ <details open>
593
+ <summary><h3>🎤 Voice Presets</h3></summary>
594
+
595
+ Bark supports 100+ speaker presets across [supported languages](#supported-languages). You can browse the library of speaker presets [here](https://suno-ai.notion.site/8b8e8749ed514b0cbf3f699013548683?v=bc67cff786b04b50b3ceb756fd05f68c), or in the [code](bark/assets/prompts). The community also often shares presets in [Discord](https://discord.gg/J2B2vsjKuE).
596
+
597
+ Bark tries to match the tone, pitch, emotion and prosody of a given preset, but does not currently support custom voice cloning. The model also attempts to preserve music, ambient noise, etc.
598
+ <br>
599
+ <br>
600
+
601
+ ```python
602
+ text_prompt = """
603
+ I have a silky smooth voice, and today I will tell you about
604
+ the exercise regimen of the common sloth.
605
+ """
606
+ audio_array = generate_audio(text_prompt, history_prompt="v2/en_speaker_1")
607
+ ```
608
+
609
+ [sloth.webm](https://user-images.githubusercontent.com/5068315/230684883-a344c619-a560-4ff5-8b99-b4463a34487b.webm)
610
+ </details>
611
+
612
+ ### Generating Longer Audio
613
+
614
+ By default, `generate_audio` works well with around 13 seconds of spoken text. For an example of how to do long-form generation, see this [example notebook](notebooks/long_form_generation.ipynb).
615
+
616
+ <details>
617
+ <summary>Click to toggle example long-form generations (from the example notebook)</summary>
618
+
619
+ [dialog.webm](https://user-images.githubusercontent.com/2565833/235463539-f57608da-e4cb-4062-8771-148e29512b01.webm)
620
+
621
+ [longform_advanced.webm](https://user-images.githubusercontent.com/2565833/235463547-1c0d8744-269b-43fe-9630-897ea5731652.webm)
622
+
623
+ [longform_basic.webm](https://user-images.githubusercontent.com/2565833/235463559-87efe9f8-a2db-4d59-b764-57db83f95270.webm)
624
+
625
+ </details>
626
+
627
+
628
+
629
+
630
+ ## 💻 Installation
631
+
632
+ ```
633
+ pip install git+https://github.com/suno-ai/bark.git
634
+ ```
635
+
636
+ or
637
+
638
+ ```
639
+ git clone https://github.com/suno-ai/bark
640
+ cd bark && pip install .
641
+ ```
642
+ *Note: Do NOT use 'pip install bark'. It installs a different package, which is not managed by Suno.*
643
+
644
+
645
+ ## 🛠️ Hardware and Inference Speed
646
+
647
+ Bark has been tested and works on both CPU and GPU (`pytorch 2.0+`, CUDA 11.7 and CUDA 12.0).
648
+
649
+ On enterprise GPUs and PyTorch nightly, Bark can generate audio in roughly real-time. On older GPUs, default colab, or CPU, inference time might be significantly slower. For older GPUs or CPU you might want to consider using smaller models. Details can be found in out tutorial sections here.
650
+
651
+ The full version of Bark requires around 12GB of VRAM to hold everything on GPU at the same time.
652
+ To use a smaller version of the models, which should fit into 8GB VRAM, set the environment flag `SUNO_USE_SMALL_MODELS=True`.
653
+
654
+ If you don't have hardware available or if you want to play with bigger versions of our models, you can also sign up for early access to our model playground [here](https://3os84zs17th.typeform.com/suno-studio).
655
+
656
+ ## ⚙️ Details
657
+
658
+ Bark is fully generative tex-to-audio model devolved for research and demo purposes. It follows a GPT style architecture similar to [AudioLM](https://arxiv.org/abs/2209.03143) and [Vall-E](https://arxiv.org/abs/2301.02111) and a quantized Audio representation from [EnCodec](https://github.com/facebookresearch/encodec). It is not a conventional TTS model, but instead a fully generative text-to-audio model capable of deviating in unexpected ways from any given script. Different to previous approaches, the input text prompt is converted directly to audio without the intermediate use of phonemes. It can therefore generalize to arbitrary instructions beyond speech such as music lyrics, sound effects or other non-speech sounds.
659
+
660
+ Below is a list of some known non-speech sounds, but we are finding more every day. Please let us know if you find patterns that work particularly well on [Discord](https://discord.gg/J2B2vsjKuE)!
661
+
662
+ - `[laughter]`
663
+ - `[laughs]`
664
+ - `[sighs]`
665
+ - `[music]`
666
+ - `[gasps]`
667
+ - `[clears throat]`
668
+ - `—` or `...` for hesitations
669
+ - `♪` for song lyrics
670
+ - CAPITALIZATION for emphasis of a word
671
+ - `[MAN]` and `[WOMAN]` to bias Bark toward male and female speakers, respectively
672
+
673
+ ### Supported Languages
674
+
675
+ | Language | Status |
676
+ | --- | --- |
677
+ | English (en) | ✅ |
678
+ | German (de) | ✅ |
679
+ | Spanish (es) | ✅ |
680
+ | French (fr) | ✅ |
681
+ | Hindi (hi) | ✅ |
682
+ | Italian (it) | ✅ |
683
+ | Japanese (ja) | ✅ |
684
+ | Korean (ko) | ✅ |
685
+ | Polish (pl) | ✅ |
686
+ | Portuguese (pt) | ✅ |
687
+ | Russian (ru) | ✅ |
688
+ | Turkish (tr) | ✅ |
689
+ | Chinese, simplified (zh) | ✅ |
690
+
691
+ Requests for future language support [here](https://github.com/suno-ai/bark/discussions/111) or in the **#forums** channel on [Discord](https://discord.com/invite/J2B2vsjKuE).
692
+
693
+ ## 🙏 Appreciation
694
+
695
+ - [nanoGPT](https://github.com/karpathy/nanoGPT) for a dead-simple and blazing fast implementation of GPT-style models
696
+ - [EnCodec](https://github.com/facebookresearch/encodec) for a state-of-the-art implementation of a fantastic audio codec
697
+ - [AudioLM](https://github.com/lucidrains/audiolm-pytorch) for related training and inference code
698
+ - [Vall-E](https://arxiv.org/abs/2301.02111), [AudioLM](https://arxiv.org/abs/2209.03143) and many other ground-breaking papers that enabled the development of Bark
699
+
700
+ ## © License
701
+
702
+ Bark is licensed under the MIT License.
703
+
704
+ Please contact us at `bark@suno.ai` to request access to a larger version of the model.
705
+
706
+ ## 📱 Community
707
+
708
+ - [Twitter](https://twitter.com/OnusFM)
709
+ - [Discord](https://discord.gg/J2B2vsjKuE)
710
+
711
+ ## 🎧 Suno Studio (Early Access)
712
+
713
+ We’re developing a playground for our models, including Bark.
714
+
715
+ If you are interested, you can sign up for early access [here](https://3os84zs17th.typeform.com/suno-studio).
716
+
717
+ ## ❓ FAQ
718
+
719
+ #### How do I specify where models are downloaded and cached?
720
+ * Bark uses Hugging Face to download and store models. You can see find more info [here](https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfhome).
721
+
722
+
723
+ #### Bark's generations sometimes differ from my prompts. What's happening?
724
+ * Bark is a GPT-style model. As such, it may take some creative liberties in its generations, resulting in higher-variance model outputs than traditional text-to-speech approaches.
725
+
726
+ #### What voices are supported by Bark?
727
+ * Bark supports 100+ speaker presets across [supported languages](#supported-languages). You can browse the library of speaker presets [here](https://suno-ai.notion.site/8b8e8749ed514b0cbf3f699013548683?v=bc67cff786b04b50b3ceb756fd05f68c). The community also shares presets in [Discord](https://discord.gg/J2B2vsjKuE). Bark also supports generating unique random voices that fit the input text. Bark does not currently support custom voice cloning.
728
+
729
+ #### Why is the output limited to ~13-14 seconds?
730
+ * Bark is a GPT-style model, and its architecture/context window is optimized to output generations with roughly this length.
731
+
732
+ #### How much VRAM do I need?
733
+ * The full version of Bark requires around 12Gb of memory to hold everything on GPU at the same time. However, even smaller cards down to ~2Gb work with some additional settings. Simply add the following code snippet before your generation:
734
+
735
+ ```python
736
+ import os
737
+ os.environ["SUNO_OFFLOAD_CPU"] = True
738
+ os.environ["SUNO_USE_SMALL_MODELS"] = True
739
+ ```
740
+
741
+ #### My generated audio sounds like a 1980s phone call. What's happening?
742
+ * Bark generates audio from scratch. It is not meant to create only high-fidelity, studio-quality speech. Rather, outputs could be anything from perfect speech to multiple people arguing at a baseball game recorded with bad microphones.
Untitled.ipynb ADDED
@@ -0,0 +1,486 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "id": "9c4c1f56",
7
+ "metadata": {},
8
+ "outputs": [
9
+ {
10
+ "name": "stdout",
11
+ "output_type": "stream",
12
+ "text": [
13
+ "Ignoring sox: markers 'platform_system == \"Darwin\"' don't match your environment\n",
14
+ "Ignoring soundfile: markers 'platform_system == \"Windows\"' don't match your environment\n",
15
+ "Ignoring fairseq: markers 'platform_system == \"Windows\"' don't match your environment\n",
16
+ "Ignoring fairseq: markers 'platform_system == \"Darwin\"' don't match your environment\n",
17
+ "Ignoring pywin32: markers 'platform_system == \"Windows\"' don't match your environment\n",
18
+ "Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from -r old_setup_files/requirements-pip.txt (line 1)) (45.2.0)\n",
19
+ "Collecting transformers\n",
20
+ " Downloading transformers-4.31.0-py3-none-any.whl (7.4 MB)\n",
21
+ "\u001b[K |████████████████████████████████| 7.4 MB 40 kB/s eta 0:00:01\n",
22
+ "\u001b[?25hCollecting diffusers\n",
23
+ " Downloading diffusers-0.19.3-py3-none-any.whl (1.3 MB)\n",
24
+ "\u001b[K |████████████████████████████████| 1.3 MB 14 kB/s eta 0:00:01\n",
25
+ "\u001b[?25hCollecting ffmpeg-downloader\n",
26
+ " Downloading ffmpeg_downloader-0.2.0-py3-none-any.whl (27 kB)\n",
27
+ "Collecting ffmpeg\n",
28
+ " Downloading ffmpeg-1.4.tar.gz (5.1 kB)\n",
29
+ "Collecting ffmpeg-python\n",
30
+ " Downloading ffmpeg_python-0.2.0-py3-none-any.whl (25 kB)\n",
31
+ "Collecting sox\n",
32
+ " Downloading sox-1.4.1-py2.py3-none-any.whl (39 kB)\n",
33
+ "Collecting fairseq\n",
34
+ " Downloading fairseq-0.12.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (11.0 MB)\n",
35
+ "\u001b[K |████████████████████████████████| 11.0 MB 1.1 kB/s eta 0:00:01\n",
36
+ "\u001b[?25hRequirement already satisfied: librosa in /home/jamal/.local/lib/python3.8/site-packages (from -r old_setup_files/requirements-pip.txt (line 13)) (0.8.1)\n",
37
+ "Collecting boto3\n",
38
+ " Downloading boto3-1.28.18-py3-none-any.whl (135 kB)\n",
39
+ "\u001b[K |████████████████████████████████| 135 kB 3.2 MB/s eta 0:00:01\n",
40
+ "\u001b[?25hCollecting funcy\n",
41
+ " Downloading funcy-2.0-py2.py3-none-any.whl (30 kB)\n",
42
+ "Requirement already satisfied: numpy in /home/jamal/.local/lib/python3.8/site-packages (from -r old_setup_files/requirements-pip.txt (line 16)) (1.20.3)\n",
43
+ "Requirement already satisfied: scipy in /home/jamal/.local/lib/python3.8/site-packages (from -r old_setup_files/requirements-pip.txt (line 17)) (1.7.3)\n",
44
+ "Collecting tokenizers\n",
45
+ " Downloading tokenizers-0.13.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)\n",
46
+ "\u001b[K |████████████████████████████████| 7.8 MB 5.1 MB/s eta 0:00:01\n",
47
+ "\u001b[?25hRequirement already satisfied: tqdm in /home/jamal/.local/lib/python3.8/site-packages (from -r old_setup_files/requirements-pip.txt (line 19)) (4.62.3)\n",
48
+ "Requirement already satisfied: ipython in /home/jamal/.local/lib/python3.8/site-packages (from -r old_setup_files/requirements-pip.txt (line 20)) (8.9.0)\n",
49
+ "Collecting huggingface_hub>0.15\n",
50
+ " Downloading huggingface_hub-0.16.4-py3-none-any.whl (268 kB)\n",
51
+ "\u001b[K |████████████████████████████████| 268 kB 2.5 MB/s eta 0:00:01\n",
52
+ "\u001b[?25hRequirement already satisfied: rich in /home/jamal/.local/lib/python3.8/site-packages (from -r old_setup_files/requirements-pip.txt (line 22)) (13.3.5)\n",
53
+ "Collecting pathvalidate\n",
54
+ " Downloading pathvalidate-3.1.0-py3-none-any.whl (21 kB)\n",
55
+ "Collecting rich-argparse\n",
56
+ " Downloading rich_argparse-1.2.0-py3-none-any.whl (16 kB)\n",
57
+ "Collecting encodec\n",
58
+ " Downloading encodec-0.1.1.tar.gz (3.7 MB)\n",
59
+ "\u001b[K |████████████████████████████████| 3.7 MB 2.8 MB/s eta 0:00:01\n",
60
+ "\u001b[?25hRequirement already satisfied: chardet in /usr/lib/python3/dist-packages (from -r old_setup_files/requirements-pip.txt (line 26)) (3.0.4)\n",
61
+ "Collecting pydub\n",
62
+ " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
63
+ "Requirement already satisfied: requests in /home/jamal/.local/lib/python3.8/site-packages (from -r old_setup_files/requirements-pip.txt (line 28)) (2.28.2)\n",
64
+ "Collecting audio2numpy\n",
65
+ " Downloading audio2numpy-0.1.2-py3-none-any.whl (10 kB)\n",
66
+ "Collecting faiss-cpu\n",
67
+ " Downloading faiss_cpu-1.7.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.6 MB)\n",
68
+ "\u001b[K |████████████████████████████████| 17.6 MB 69 kB/s eta 0:00:01 |███████████▍ | 6.2 MB 13.9 MB/s eta 0:00:01\n",
69
+ "\u001b[?25hRequirement already satisfied: joblib in /home/jamal/.local/lib/python3.8/site-packages (from -r old_setup_files/requirements-pip.txt (line 31)) (1.3.1)\n",
70
+ "Collecting audiolm-pytorch\n",
71
+ " Downloading audiolm_pytorch-1.2.24-py3-none-any.whl (40 kB)\n",
72
+ "\u001b[K |████████████████████████████████| 40 kB 192 kB/s eta 0:00:01\n",
73
+ "\u001b[?25hCollecting universal-startfile\n",
74
+ " Downloading universal_startfile-0.2-py3-none-any.whl (3.4 kB)\n",
75
+ "Collecting gradio>=3.34.0\n",
76
+ " Downloading gradio-3.39.0-py3-none-any.whl (19.9 MB)\n",
77
+ "\u001b[K |████████████████████████████████| 19.9 MB 2.9 MB/s eta 0:00:01\n",
78
+ "\u001b[?25hRequirement already satisfied: pyyaml>=5.1 in /usr/lib/python3/dist-packages (from transformers->-r old_setup_files/requirements-pip.txt (line 2)) (5.3.1)\n",
79
+ "Requirement already satisfied: filelock in /home/jamal/.local/lib/python3.8/site-packages (from transformers->-r old_setup_files/requirements-pip.txt (line 2)) (3.12.2)\n",
80
+ "Collecting regex!=2019.12.17\n",
81
+ " Downloading regex-2023.6.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (772 kB)\n",
82
+ "\u001b[K |████████████████████████████████| 772 kB 3.0 MB/s eta 0:00:01\n",
83
+ "\u001b[?25hCollecting safetensors>=0.3.1\n",
84
+ " Downloading safetensors-0.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
85
+ "\u001b[K |████████████████████████████████| 1.3 MB 3.1 MB/s eta 0:00:01\n",
86
+ "\u001b[?25hRequirement already satisfied: packaging>=20.0 in /home/jamal/.local/lib/python3.8/site-packages (from transformers->-r old_setup_files/requirements-pip.txt (line 2)) (23.0)\n",
87
+ "Requirement already satisfied: importlib-metadata in /home/jamal/.local/lib/python3.8/site-packages (from diffusers->-r old_setup_files/requirements-pip.txt (line 3)) (6.0.0)\n",
88
+ "Requirement already satisfied: Pillow in /home/jamal/.local/lib/python3.8/site-packages (from diffusers->-r old_setup_files/requirements-pip.txt (line 3)) (8.4.0)\n",
89
+ "Collecting appdirs\n",
90
+ " Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)\n",
91
+ "Requirement already satisfied: future in /usr/lib/python3/dist-packages (from ffmpeg-python->-r old_setup_files/requirements-pip.txt (line 6)) (0.18.2)\n",
92
+ "Collecting omegaconf<2.1\n",
93
+ " Downloading omegaconf-2.0.6-py3-none-any.whl (36 kB)\n",
94
+ "Collecting cython\n",
95
+ " Downloading Cython-3.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB)\n",
96
+ "\u001b[K |████████████████████████████████| 3.6 MB 3.6 MB/s eta 0:00:01\n",
97
+ "\u001b[?25hRequirement already satisfied: cffi in /home/jamal/.local/lib/python3.8/site-packages (from fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (1.15.1)\n",
98
+ "Requirement already satisfied: torch in /home/jamal/.local/lib/python3.8/site-packages (from fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (2.0.1)\n",
99
+ "Collecting sacrebleu>=1.4.12\n",
100
+ " Downloading sacrebleu-2.3.1-py3-none-any.whl (118 kB)\n",
101
+ "\u001b[K |████████████████████████████████| 118 kB 3.1 MB/s eta 0:00:01\n",
102
+ "\u001b[?25hCollecting torchaudio>=0.8.0\n",
103
+ " Downloading torchaudio-2.0.2-cp38-cp38-manylinux1_x86_64.whl (4.4 MB)\n",
104
+ "\u001b[K |████████████████████████████████| 4.4 MB 572 kB/s eta 0:00:01 |█████████████████████ | 2.9 MB 2.0 MB/s eta 0:00:01\n",
105
+ "\u001b[?25hCollecting hydra-core<1.1,>=1.0.7\n",
106
+ " Downloading hydra_core-1.0.7-py3-none-any.whl (123 kB)\n",
107
+ "\u001b[K |████████████████████████████████| 123 kB 1.9 MB/s eta 0:00:01\n",
108
+ "\u001b[?25hCollecting bitarray\n",
109
+ " Downloading bitarray-2.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (283 kB)\n",
110
+ "\u001b[K |████████████████████████████████| 283 kB 2.4 MB/s eta 0:00:01\n",
111
+ "\u001b[?25hRequirement already satisfied: audioread>=2.0.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa->-r old_setup_files/requirements-pip.txt (line 13)) (3.0.0)\n",
112
+ "Requirement already satisfied: soundfile>=0.10.2 in /home/jamal/.local/lib/python3.8/site-packages (from librosa->-r old_setup_files/requirements-pip.txt (line 13)) (0.10.3.post1)\n",
113
+ "Requirement already satisfied: pooch>=1.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa->-r old_setup_files/requirements-pip.txt (line 13)) (1.7.0)\n",
114
+ "Requirement already satisfied: scikit-learn!=0.19.0,>=0.14.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa->-r old_setup_files/requirements-pip.txt (line 13)) (1.0.2)\n",
115
+ "Requirement already satisfied: numba>=0.43.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa->-r old_setup_files/requirements-pip.txt (line 13)) (0.57.1)\n",
116
+ "Requirement already satisfied: decorator>=3.0.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa->-r old_setup_files/requirements-pip.txt (line 13)) (5.1.1)\n",
117
+ "Requirement already satisfied: resampy>=0.2.2 in /home/jamal/.local/lib/python3.8/site-packages (from librosa->-r old_setup_files/requirements-pip.txt (line 13)) (0.4.2)\n"
118
+ ]
119
+ },
120
+ {
121
+ "name": "stdout",
122
+ "output_type": "stream",
123
+ "text": [
124
+ "Collecting botocore<1.32.0,>=1.31.18\n",
125
+ " Downloading botocore-1.31.18-py3-none-any.whl (11.1 MB)\n",
126
+ "\u001b[K |████████████████████████████████| 11.1 MB 1.2 kB/s eta 0:00:01\n",
127
+ "\u001b[?25hCollecting s3transfer<0.7.0,>=0.6.0\n",
128
+ " Downloading s3transfer-0.6.1-py3-none-any.whl (79 kB)\n",
129
+ "\u001b[K |████████████████████████████████| 79 kB 964 kB/s eta 0:00:01\n",
130
+ "\u001b[?25hCollecting jmespath<2.0.0,>=0.7.1\n",
131
+ " Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)\n",
132
+ "Requirement already satisfied: backcall in /home/jamal/.local/lib/python3.8/site-packages (from ipython->-r old_setup_files/requirements-pip.txt (line 20)) (0.2.0)\n",
133
+ "Requirement already satisfied: pygments>=2.4.0 in /home/jamal/.local/lib/python3.8/site-packages (from ipython->-r old_setup_files/requirements-pip.txt (line 20)) (2.14.0)\n",
134
+ "Requirement already satisfied: jedi>=0.16 in /home/jamal/.local/lib/python3.8/site-packages (from ipython->-r old_setup_files/requirements-pip.txt (line 20)) (0.18.2)\n",
135
+ "Requirement already satisfied: stack-data in /home/jamal/.local/lib/python3.8/site-packages (from ipython->-r old_setup_files/requirements-pip.txt (line 20)) (0.6.2)\n",
136
+ "Requirement already satisfied: traitlets>=5 in /home/jamal/.local/lib/python3.8/site-packages (from ipython->-r old_setup_files/requirements-pip.txt (line 20)) (5.9.0)\n",
137
+ "Requirement already satisfied: pexpect>4.3; sys_platform != \"win32\" in /usr/lib/python3/dist-packages (from ipython->-r old_setup_files/requirements-pip.txt (line 20)) (4.6.0)\n",
138
+ "Requirement already satisfied: matplotlib-inline in /home/jamal/.local/lib/python3.8/site-packages (from ipython->-r old_setup_files/requirements-pip.txt (line 20)) (0.1.6)\n",
139
+ "Requirement already satisfied: pickleshare in /home/jamal/.local/lib/python3.8/site-packages (from ipython->-r old_setup_files/requirements-pip.txt (line 20)) (0.7.5)\n",
140
+ "Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.30 in /home/jamal/.local/lib/python3.8/site-packages (from ipython->-r old_setup_files/requirements-pip.txt (line 20)) (3.0.36)\n",
141
+ "Collecting fsspec\n",
142
+ " Downloading fsspec-2023.6.0-py3-none-any.whl (163 kB)\n",
143
+ "\u001b[K |████████████████████████████████| 163 kB 3.0 MB/s eta 0:00:01\n",
144
+ "\u001b[?25hRequirement already satisfied: typing-extensions>=3.7.4.3 in /home/jamal/.local/lib/python3.8/site-packages (from huggingface_hub>0.15->-r old_setup_files/requirements-pip.txt (line 21)) (4.5.0)\n",
145
+ "Requirement already satisfied: markdown-it-py<3.0.0,>=2.2.0 in /home/jamal/.local/lib/python3.8/site-packages (from rich->-r old_setup_files/requirements-pip.txt (line 22)) (2.2.0)\n",
146
+ "Collecting einops\n",
147
+ " Downloading einops-0.6.1-py3-none-any.whl (42 kB)\n",
148
+ "\u001b[K |████████████████████████████████| 42 kB 143 kB/s eta 0:00:01\n",
149
+ "\u001b[?25hRequirement already satisfied: charset-normalizer<4,>=2 in /home/jamal/.local/lib/python3.8/site-packages (from requests->-r old_setup_files/requirements-pip.txt (line 28)) (3.0.1)\n",
150
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests->-r old_setup_files/requirements-pip.txt (line 28)) (2.8)\n",
151
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->-r old_setup_files/requirements-pip.txt (line 28)) (2019.11.28)\n",
152
+ "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/jamal/.local/lib/python3.8/site-packages (from requests->-r old_setup_files/requirements-pip.txt (line 28)) (1.26.7)\n",
153
+ "Collecting sentencepiece\n",
154
+ " Downloading sentencepiece-0.1.99-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
155
+ "\u001b[K |████████████████████████████████| 1.3 MB 3.1 MB/s eta 0:00:01\n",
156
+ "\u001b[?25hCollecting lion-pytorch\n",
157
+ " Downloading lion_pytorch-0.1.2-py3-none-any.whl (4.4 kB)\n",
158
+ "Collecting ema-pytorch>=0.2.2\n",
159
+ " Downloading ema_pytorch-0.2.3-py3-none-any.whl (4.4 kB)\n",
160
+ "Collecting vector-quantize-pytorch>=1.5.14\n",
161
+ " Downloading vector_quantize_pytorch-1.6.30-py3-none-any.whl (13 kB)\n",
162
+ "Collecting local-attention>=1.8.4\n",
163
+ " Downloading local_attention-1.8.6-py3-none-any.whl (8.1 kB)\n",
164
+ "Collecting beartype\n",
165
+ " Downloading beartype-0.15.0-py3-none-any.whl (777 kB)\n",
166
+ "\u001b[K |████████████████████████████████| 777 kB 3.2 MB/s eta 0:00:01\n",
167
+ "\u001b[?25hCollecting accelerate\n",
168
+ " Downloading accelerate-0.21.0-py3-none-any.whl (244 kB)\n",
169
+ "\u001b[K |████████████████████████████████| 244 kB 2.4 MB/s eta 0:00:01\n",
170
+ "\u001b[?25hCollecting aiohttp~=3.0\n",
171
+ " Downloading aiohttp-3.8.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)\n",
172
+ "\u001b[K |████████████████████████████████| 1.1 MB 2.7 MB/s eta 0:00:01\n",
173
+ "\u001b[?25hRequirement already satisfied: pandas<3.0,>=1.0 in /home/jamal/.local/lib/python3.8/site-packages (from gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (1.5.3)\n",
174
+ "Collecting orjson~=3.0\n",
175
+ " Downloading orjson-3.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (138 kB)\n",
176
+ "\u001b[K |████████████████████████████████| 138 kB 2.8 MB/s eta 0:00:01\n",
177
+ "\u001b[?25hCollecting python-multipart\n",
178
+ " Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)\n",
179
+ "\u001b[K |████████████████████████████████| 45 kB 486 kB/s eta 0:00:01\n",
180
+ "\u001b[?25hCollecting fastapi\n",
181
+ " Downloading fastapi-0.100.1-py3-none-any.whl (65 kB)\n",
182
+ "\u001b[K |████████████████████████████████| 65 kB 530 kB/s eta 0:00:01\n",
183
+ "\u001b[?25hCollecting uvicorn>=0.14.0\n",
184
+ " Downloading uvicorn-0.23.2-py3-none-any.whl (59 kB)\n",
185
+ "\u001b[K |████████████████████████████████| 59 kB 1.0 MB/s eta 0:00:01\n",
186
+ "\u001b[?25hRequirement already satisfied: jinja2<4.0 in /home/jamal/.local/lib/python3.8/site-packages (from gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (3.1.2)\n",
187
+ "Collecting aiofiles<24.0,>=22.0\n",
188
+ " Downloading aiofiles-23.1.0-py3-none-any.whl (14 kB)\n",
189
+ "Collecting altair<6.0,>=4.2.0\n",
190
+ " Downloading altair-5.0.1-py3-none-any.whl (471 kB)\n",
191
+ "\u001b[K |████████████████████████████████| 471 kB 3.0 MB/s eta 0:00:01\n",
192
+ "\u001b[?25hCollecting mdit-py-plugins<=0.3.3\n",
193
+ " Downloading mdit_py_plugins-0.3.3-py3-none-any.whl (50 kB)\n",
194
+ "\u001b[K |████████████████████████████████| 50 kB 777 kB/s eta 0:00:01\n",
195
+ "\u001b[?25hCollecting ffmpy\n",
196
+ " Downloading ffmpy-0.3.1.tar.gz (5.5 kB)\n",
197
+ "Collecting pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4\n",
198
+ " Downloading pydantic-2.1.1-py3-none-any.whl (370 kB)\n",
199
+ "\u001b[K |████████████████████████████████| 370 kB 3.2 MB/s eta 0:00:01\n",
200
+ "\u001b[?25hCollecting httpx\n",
201
+ " Downloading httpx-0.24.1-py3-none-any.whl (75 kB)\n",
202
+ "\u001b[K |████████████████████████████████| 75 kB 593 kB/s eta 0:00:01\n",
203
+ "\u001b[?25hRequirement already satisfied: websockets<12.0,>=10.0 in /home/jamal/.local/lib/python3.8/site-packages (from gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (11.0.3)\n",
204
+ "Requirement already satisfied: markupsafe~=2.0 in /home/jamal/.local/lib/python3.8/site-packages (from gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (2.1.2)\n",
205
+ "Collecting gradio-client>=0.3.0\n",
206
+ " Downloading gradio_client-0.3.0-py3-none-any.whl (294 kB)\n",
207
+ "\u001b[K |████████████████████████████████| 294 kB 2.2 MB/s eta 0:00:01\n",
208
+ "\u001b[?25hCollecting semantic-version~=2.0\n",
209
+ " Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
210
+ "Requirement already satisfied: matplotlib~=3.0 in /home/jamal/.local/lib/python3.8/site-packages (from gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (3.5.1)\n",
211
+ "Requirement already satisfied: zipp>=0.5 in /usr/lib/python3/dist-packages (from importlib-metadata->diffusers->-r old_setup_files/requirements-pip.txt (line 3)) (1.0.0)\n",
212
+ "Requirement already satisfied: pycparser in /home/jamal/.local/lib/python3.8/site-packages (from cffi->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (2.21)\n",
213
+ "Requirement already satisfied: sympy in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (1.12)\n",
214
+ "Requirement already satisfied: nvidia-curand-cu11==10.2.10.91; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (10.2.10.91)\n",
215
+ "Requirement already satisfied: nvidia-cusparse-cu11==11.7.4.91; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (11.7.4.91)\n",
216
+ "Requirement already satisfied: nvidia-cuda-runtime-cu11==11.7.99; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (11.7.99)\n",
217
+ "Requirement already satisfied: nvidia-nvtx-cu11==11.7.91; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (11.7.91)\n",
218
+ "Requirement already satisfied: networkx in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (3.1)\n",
219
+ "Requirement already satisfied: nvidia-cublas-cu11==11.10.3.66; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (11.10.3.66)\n",
220
+ "Requirement already satisfied: nvidia-cusolver-cu11==11.4.0.1; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (11.4.0.1)\n"
221
+ ]
222
+ },
223
+ {
224
+ "name": "stdout",
225
+ "output_type": "stream",
226
+ "text": [
227
+ "Requirement already satisfied: triton==2.0.0; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (2.0.0)\n",
228
+ "Requirement already satisfied: nvidia-cufft-cu11==10.9.0.58; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (10.9.0.58)\n",
229
+ "Requirement already satisfied: nvidia-nccl-cu11==2.14.3; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (2.14.3)\n",
230
+ "Requirement already satisfied: nvidia-cuda-cupti-cu11==11.7.101; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (11.7.101)\n",
231
+ "Requirement already satisfied: nvidia-cudnn-cu11==8.5.0.96; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (8.5.0.96)\n",
232
+ "Requirement already satisfied: nvidia-cuda-nvrtc-cu11==11.7.99; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (11.7.99)\n",
233
+ "Requirement already satisfied: colorama in /usr/lib/python3/dist-packages (from sacrebleu>=1.4.12->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (0.4.3)\n",
234
+ "Collecting lxml\n",
235
+ " Downloading lxml-4.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (7.1 MB)\n",
236
+ "\u001b[K |████████████████████████████████| 7.1 MB 2.8 MB/s eta 0:00:01\n",
237
+ "\u001b[?25hCollecting tabulate>=0.8.9\n",
238
+ " Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)\n",
239
+ "Collecting portalocker\n",
240
+ " Downloading portalocker-2.7.0-py2.py3-none-any.whl (15 kB)\n",
241
+ "Requirement already satisfied: importlib-resources; python_version < \"3.9\" in /home/jamal/.local/lib/python3.8/site-packages (from hydra-core<1.1,>=1.0.7->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (5.10.2)\n",
242
+ "Collecting antlr4-python3-runtime==4.8\n",
243
+ " Downloading antlr4-python3-runtime-4.8.tar.gz (112 kB)\n",
244
+ "\u001b[K |████████████████████████████████| 112 kB 3.2 MB/s eta 0:00:01\n",
245
+ "\u001b[?25hRequirement already satisfied: platformdirs>=2.5.0 in /home/jamal/.local/lib/python3.8/site-packages (from pooch>=1.0->librosa->-r old_setup_files/requirements-pip.txt (line 13)) (2.6.2)\n",
246
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /home/jamal/.local/lib/python3.8/site-packages (from scikit-learn!=0.19.0,>=0.14.0->librosa->-r old_setup_files/requirements-pip.txt (line 13)) (3.2.0)\n",
247
+ "Requirement already satisfied: llvmlite<0.41,>=0.40.0dev0 in /home/jamal/.local/lib/python3.8/site-packages (from numba>=0.43.0->librosa->-r old_setup_files/requirements-pip.txt (line 13)) (0.40.1)\n",
248
+ "Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/jamal/.local/lib/python3.8/site-packages (from botocore<1.32.0,>=1.31.18->boto3->-r old_setup_files/requirements-pip.txt (line 14)) (2.8.2)\n",
249
+ "Requirement already satisfied: parso<0.9.0,>=0.8.0 in /home/jamal/.local/lib/python3.8/site-packages (from jedi>=0.16->ipython->-r old_setup_files/requirements-pip.txt (line 20)) (0.8.3)\n",
250
+ "Requirement already satisfied: executing>=1.2.0 in /home/jamal/.local/lib/python3.8/site-packages (from stack-data->ipython->-r old_setup_files/requirements-pip.txt (line 20)) (1.2.0)\n",
251
+ "Requirement already satisfied: asttokens>=2.1.0 in /home/jamal/.local/lib/python3.8/site-packages (from stack-data->ipython->-r old_setup_files/requirements-pip.txt (line 20)) (2.2.1)\n",
252
+ "Requirement already satisfied: pure-eval in /home/jamal/.local/lib/python3.8/site-packages (from stack-data->ipython->-r old_setup_files/requirements-pip.txt (line 20)) (0.2.2)\n",
253
+ "Requirement already satisfied: wcwidth in /home/jamal/.local/lib/python3.8/site-packages (from prompt-toolkit<3.1.0,>=3.0.30->ipython->-r old_setup_files/requirements-pip.txt (line 20)) (0.2.6)\n",
254
+ "Requirement already satisfied: mdurl~=0.1 in /home/jamal/.local/lib/python3.8/site-packages (from markdown-it-py<3.0.0,>=2.2.0->rich->-r old_setup_files/requirements-pip.txt (line 22)) (0.1.2)\n",
255
+ "Requirement already satisfied: psutil in /usr/lib/python3/dist-packages (from accelerate->audiolm-pytorch->-r old_setup_files/requirements-pip.txt (line 32)) (5.5.1)\n",
256
+ "Collecting frozenlist>=1.1.1\n",
257
+ " Downloading frozenlist-1.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (220 kB)\n",
258
+ "\u001b[K |████████████████████████████████| 220 kB 3.1 MB/s eta 0:00:01\n",
259
+ "\u001b[?25hRequirement already satisfied: attrs>=17.3.0 in /usr/lib/python3/dist-packages (from aiohttp~=3.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (19.3.0)\n",
260
+ "Collecting aiosignal>=1.1.2\n",
261
+ " Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)\n",
262
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /home/jamal/.local/lib/python3.8/site-packages (from aiohttp~=3.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (6.0.4)\n",
263
+ "Collecting async-timeout<5.0,>=4.0.0a3\n",
264
+ " Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)\n",
265
+ "Collecting yarl<2.0,>=1.0\n",
266
+ " Downloading yarl-1.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (266 kB)\n",
267
+ "\u001b[K |████████████████████████████████| 266 kB 2.7 MB/s eta 0:00:01\n",
268
+ "\u001b[?25hRequirement already satisfied: pytz>=2020.1 in /home/jamal/.local/lib/python3.8/site-packages (from pandas<3.0,>=1.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (2022.7.1)\n",
269
+ "Collecting starlette<0.28.0,>=0.27.0\n",
270
+ " Downloading starlette-0.27.0-py3-none-any.whl (66 kB)\n",
271
+ "\u001b[K |████████████████████████████████| 66 kB 574 kB/s eta 0:00:01\n",
272
+ "\u001b[?25hCollecting h11>=0.8\n",
273
+ " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
274
+ "\u001b[K |████████████████████████████████| 58 kB 719 kB/s eta 0:00:01\n",
275
+ "\u001b[?25hRequirement already satisfied: click>=7.0 in /usr/lib/python3/dist-packages (from uvicorn>=0.14.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (7.0)\n",
276
+ "Requirement already satisfied: jsonschema>=3.0 in /home/jamal/.local/lib/python3.8/site-packages (from altair<6.0,>=4.2.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (4.17.3)\n",
277
+ "Collecting toolz\n",
278
+ " Downloading toolz-0.12.0-py3-none-any.whl (55 kB)\n",
279
+ "\u001b[K |████████████████████████████████| 55 kB 606 kB/s eta 0:00:01\n",
280
+ "\u001b[?25hCollecting pydantic-core==2.4.0\n",
281
+ " Downloading pydantic_core-2.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB)\n",
282
+ "\u001b[K |████████████████████████████████| 1.9 MB 2.6 MB/s eta 0:00:01\n",
283
+ "\u001b[?25hCollecting annotated-types>=0.4.0\n",
284
+ " Downloading annotated_types-0.5.0-py3-none-any.whl (11 kB)\n",
285
+ "Requirement already satisfied: sniffio in /home/jamal/.local/lib/python3.8/site-packages (from httpx->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (1.3.0)\n",
286
+ "Collecting httpcore<0.18.0,>=0.15.0\n",
287
+ " Downloading httpcore-0.17.3-py3-none-any.whl (74 kB)\n",
288
+ "\u001b[K |████████████████████████████████| 74 kB 471 kB/s eta 0:00:01\n",
289
+ "\u001b[?25hRequirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib~=3.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (2.4.6)\n",
290
+ "Requirement already satisfied: cycler>=0.10 in /home/jamal/.local/lib/python3.8/site-packages (from matplotlib~=3.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (0.11.0)\n",
291
+ "Requirement already satisfied: fonttools>=4.22.0 in /home/jamal/.local/lib/python3.8/site-packages (from matplotlib~=3.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (4.38.0)\n",
292
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /home/jamal/.local/lib/python3.8/site-packages (from matplotlib~=3.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (1.4.4)\n",
293
+ "Requirement already satisfied: mpmath>=0.19 in /home/jamal/.local/lib/python3.8/site-packages (from sympy->torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (1.3.0)\n",
294
+ "Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (from nvidia-curand-cu11==10.2.10.91; platform_system == \"Linux\" and platform_machine == \"x86_64\"->torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (0.34.2)\n",
295
+ "Requirement already satisfied: cmake in /home/jamal/.local/lib/python3.8/site-packages (from triton==2.0.0; platform_system == \"Linux\" and platform_machine == \"x86_64\"->torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (3.27.0)\n",
296
+ "Requirement already satisfied: lit in /home/jamal/.local/lib/python3.8/site-packages (from triton==2.0.0; platform_system == \"Linux\" and platform_machine == \"x86_64\"->torch->fairseq->-r old_setup_files/requirements-pip.txt (line 12)) (16.0.6)\n",
297
+ "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.32.0,>=1.31.18->boto3->-r old_setup_files/requirements-pip.txt (line 14)) (1.14.0)\n",
298
+ "Requirement already satisfied: anyio<5,>=3.4.0 in /home/jamal/.local/lib/python3.8/site-packages (from starlette<0.28.0,>=0.27.0->fastapi->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (3.6.2)\n",
299
+ "Requirement already satisfied: pkgutil-resolve-name>=1.3.10; python_version < \"3.9\" in /home/jamal/.local/lib/python3.8/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (1.3.10)\n",
300
+ "Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/lib/python3/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio>=3.34.0->-r old_setup_files/requirements-pip.txt (line 34)) (0.15.5)\n",
301
+ "Building wheels for collected packages: ffmpeg, encodec, ffmpy, antlr4-python3-runtime\n"
302
+ ]
303
+ },
304
+ {
305
+ "name": "stdout",
306
+ "output_type": "stream",
307
+ "text": [
308
+ " Building wheel for ffmpeg (setup.py) ... \u001b[?25ldone\n",
309
+ "\u001b[?25h Created wheel for ffmpeg: filename=ffmpeg-1.4-py3-none-any.whl size=6083 sha256=19514e448b6bdeb0af7ec0711ab1153c6ed7a4c2c94d70be977b7c7fe20bb378\n",
310
+ " Stored in directory: /home/jamal/.cache/pip/wheels/30/33/46/5ab7eca55b9490dddbf3441c68a29535996270ef1ce8b9b6d7\n",
311
+ " Building wheel for encodec (setup.py) ... \u001b[?25ldone\n",
312
+ "\u001b[?25h Created wheel for encodec: filename=encodec-0.1.1-py3-none-any.whl size=45768 sha256=5be14b57922136d74f505c3f00b442410ed01e1df97724788ca60a81ae4c88c3\n",
313
+ " Stored in directory: /home/jamal/.cache/pip/wheels/83/ca/c5/2770ecff40c79307803c30f8d4c5dcb533722f5f7c049ee9db\n",
314
+ " Building wheel for ffmpy (setup.py) ... \u001b[?25ldone\n",
315
+ "\u001b[?25h Created wheel for ffmpy: filename=ffmpy-0.3.1-py3-none-any.whl size=5580 sha256=30a6f174f3c528a86e4132068eecaac56ddfdca93b4128ed8631c5f17707f7d7\n",
316
+ " Stored in directory: /home/jamal/.cache/pip/wheels/75/a3/1a/2f3f90b9a4eb0408109ae1b5bae01efbdf8ab4ef98797433e4\n",
317
+ " Building wheel for antlr4-python3-runtime (setup.py) ... \u001b[?25ldone\n",
318
+ "\u001b[?25h Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.8-py3-none-any.whl size=141230 sha256=24d2cd414c2d61b3f9bc6b30748b85ab68aa6d00c4ed7145823ba466469b0796\n",
319
+ " Stored in directory: /home/jamal/.cache/pip/wheels/c8/d0/ab/d43c02eaddc5b9004db86950802442ad9a26f279c619e28da0\n",
320
+ "Successfully built ffmpeg encodec ffmpy antlr4-python3-runtime\n",
321
+ "\u001b[31mERROR: pydantic-core 2.4.0 has requirement typing-extensions!=4.7.0,>=4.6.0, but you'll have typing-extensions 4.5.0 which is incompatible.\u001b[0m\n",
322
+ "\u001b[31mERROR: pydantic 2.1.1 has requirement typing-extensions>=4.6.1, but you'll have typing-extensions 4.5.0 which is incompatible.\u001b[0m\n",
323
+ "Installing collected packages: regex, fsspec, huggingface-hub, safetensors, tokenizers, transformers, diffusers, appdirs, ffmpeg-downloader, ffmpeg, ffmpeg-python, sox, omegaconf, cython, lxml, tabulate, portalocker, sacrebleu, torchaudio, antlr4-python3-runtime, hydra-core, bitarray, fairseq, jmespath, botocore, s3transfer, boto3, funcy, pathvalidate, rich-argparse, einops, encodec, pydub, audio2numpy, faiss-cpu, sentencepiece, lion-pytorch, ema-pytorch, vector-quantize-pytorch, local-attention, beartype, accelerate, audiolm-pytorch, universal-startfile, frozenlist, aiosignal, async-timeout, yarl, aiohttp, orjson, python-multipart, pydantic-core, annotated-types, pydantic, starlette, fastapi, h11, uvicorn, aiofiles, toolz, altair, mdit-py-plugins, ffmpy, httpcore, httpx, gradio-client, semantic-version, gradio\n",
324
+ "Successfully installed accelerate-0.21.0 aiofiles-23.1.0 aiohttp-3.8.5 aiosignal-1.3.1 altair-5.0.1 annotated-types-0.5.0 antlr4-python3-runtime-4.8 appdirs-1.4.4 async-timeout-4.0.2 audio2numpy-0.1.2 audiolm-pytorch-1.2.24 beartype-0.15.0 bitarray-2.8.0 boto3-1.28.18 botocore-1.31.18 cython-3.0.0 diffusers-0.19.3 einops-0.6.1 ema-pytorch-0.2.3 encodec-0.1.1 fairseq-0.12.2 faiss-cpu-1.7.4 fastapi-0.100.1 ffmpeg-1.4 ffmpeg-downloader-0.2.0 ffmpeg-python-0.2.0 ffmpy-0.3.1 frozenlist-1.4.0 fsspec-2023.6.0 funcy-2.0 gradio-3.39.0 gradio-client-0.3.0 h11-0.14.0 httpcore-0.17.3 httpx-0.24.1 huggingface-hub-0.16.4 hydra-core-1.0.7 jmespath-1.0.1 lion-pytorch-0.1.2 local-attention-1.8.6 lxml-4.9.3 mdit-py-plugins-0.3.3 omegaconf-2.0.6 orjson-3.9.2 pathvalidate-3.1.0 portalocker-2.7.0 pydantic-2.1.1 pydantic-core-2.4.0 pydub-0.25.1 python-multipart-0.0.6 regex-2023.6.3 rich-argparse-1.2.0 s3transfer-0.6.1 sacrebleu-2.3.1 safetensors-0.3.1 semantic-version-2.10.0 sentencepiece-0.1.99 sox-1.4.1 starlette-0.27.0 tabulate-0.9.0 tokenizers-0.13.3 toolz-0.12.0 torchaudio-2.0.2 transformers-4.31.0 universal-startfile-0.2 uvicorn-0.23.2 vector-quantize-pytorch-1.6.30 yarl-1.9.2\n",
325
+ "Requirement already satisfied: encodec in /home/jamal/.local/lib/python3.8/site-packages (0.1.1)\n",
326
+ "Requirement already satisfied: rich-argparse in /home/jamal/.local/lib/python3.8/site-packages (1.2.0)\n",
327
+ "Requirement already satisfied: librosa in /home/jamal/.local/lib/python3.8/site-packages (0.8.1)\n",
328
+ "Requirement already satisfied: pydub in /home/jamal/.local/lib/python3.8/site-packages (0.25.1)\n",
329
+ "Collecting devtools\n",
330
+ " Downloading devtools-0.11.0-py3-none-any.whl (19 kB)\n",
331
+ "Requirement already satisfied: einops in /home/jamal/.local/lib/python3.8/site-packages (from encodec) (0.6.1)\n",
332
+ "Requirement already satisfied: numpy in /home/jamal/.local/lib/python3.8/site-packages (from encodec) (1.20.3)\n",
333
+ "Requirement already satisfied: torch in /home/jamal/.local/lib/python3.8/site-packages (from encodec) (2.0.1)\n",
334
+ "Requirement already satisfied: torchaudio in /home/jamal/.local/lib/python3.8/site-packages (from encodec) (2.0.2)\n",
335
+ "Requirement already satisfied: rich>=11.0.0 in /home/jamal/.local/lib/python3.8/site-packages (from rich-argparse) (13.3.5)\n",
336
+ "Requirement already satisfied: numba>=0.43.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa) (0.57.1)\n",
337
+ "Requirement already satisfied: joblib>=0.14 in /home/jamal/.local/lib/python3.8/site-packages (from librosa) (1.3.1)\n",
338
+ "Requirement already satisfied: soundfile>=0.10.2 in /home/jamal/.local/lib/python3.8/site-packages (from librosa) (0.10.3.post1)\n",
339
+ "Requirement already satisfied: packaging>=20.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa) (23.0)\n",
340
+ "Requirement already satisfied: resampy>=0.2.2 in /home/jamal/.local/lib/python3.8/site-packages (from librosa) (0.4.2)\n",
341
+ "Requirement already satisfied: pooch>=1.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa) (1.7.0)\n",
342
+ "Requirement already satisfied: scipy>=1.0.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa) (1.7.3)\n",
343
+ "Requirement already satisfied: decorator>=3.0.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa) (5.1.1)\n",
344
+ "Requirement already satisfied: scikit-learn!=0.19.0,>=0.14.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa) (1.0.2)\n",
345
+ "Requirement already satisfied: audioread>=2.0.0 in /home/jamal/.local/lib/python3.8/site-packages (from librosa) (3.0.0)\n",
346
+ "Requirement already satisfied: executing>=1.1.1 in /home/jamal/.local/lib/python3.8/site-packages (from devtools) (1.2.0)\n",
347
+ "Requirement already satisfied: asttokens<3.0.0,>=2.0.0 in /home/jamal/.local/lib/python3.8/site-packages (from devtools) (2.2.1)\n",
348
+ "Requirement already satisfied: nvidia-cuda-nvrtc-cu11==11.7.99; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (11.7.99)\n",
349
+ "Requirement already satisfied: nvidia-nccl-cu11==2.14.3; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (2.14.3)\n",
350
+ "Requirement already satisfied: nvidia-cuda-runtime-cu11==11.7.99; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (11.7.99)\n",
351
+ "Requirement already satisfied: nvidia-nvtx-cu11==11.7.91; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (11.7.91)\n",
352
+ "Requirement already satisfied: nvidia-cublas-cu11==11.10.3.66; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (11.10.3.66)\n",
353
+ "Requirement already satisfied: nvidia-curand-cu11==10.2.10.91; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (10.2.10.91)\n",
354
+ "Requirement already satisfied: nvidia-cufft-cu11==10.9.0.58; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (10.9.0.58)\n",
355
+ "Requirement already satisfied: nvidia-cusolver-cu11==11.4.0.1; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (11.4.0.1)\n",
356
+ "Requirement already satisfied: nvidia-cudnn-cu11==8.5.0.96; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (8.5.0.96)\n",
357
+ "Requirement already satisfied: networkx in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (3.1)\n",
358
+ "Requirement already satisfied: nvidia-cuda-cupti-cu11==11.7.101; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (11.7.101)\n",
359
+ "Requirement already satisfied: sympy in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (1.12)\n",
360
+ "Requirement already satisfied: filelock in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (3.12.2)\n",
361
+ "Requirement already satisfied: nvidia-cusparse-cu11==11.7.4.91; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (11.7.4.91)\n",
362
+ "Requirement already satisfied: triton==2.0.0; platform_system == \"Linux\" and platform_machine == \"x86_64\" in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (2.0.0)\n"
363
+ ]
364
+ },
365
+ {
366
+ "name": "stdout",
367
+ "output_type": "stream",
368
+ "text": [
369
+ "Requirement already satisfied: jinja2 in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (3.1.2)\n",
370
+ "Requirement already satisfied: typing-extensions in /home/jamal/.local/lib/python3.8/site-packages (from torch->encodec) (4.5.0)\n",
371
+ "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /home/jamal/.local/lib/python3.8/site-packages (from rich>=11.0.0->rich-argparse) (2.14.0)\n",
372
+ "Requirement already satisfied: markdown-it-py<3.0.0,>=2.2.0 in /home/jamal/.local/lib/python3.8/site-packages (from rich>=11.0.0->rich-argparse) (2.2.0)\n",
373
+ "Requirement already satisfied: importlib-metadata; python_version < \"3.9\" in /home/jamal/.local/lib/python3.8/site-packages (from numba>=0.43.0->librosa) (6.0.0)\n",
374
+ "Requirement already satisfied: llvmlite<0.41,>=0.40.0dev0 in /home/jamal/.local/lib/python3.8/site-packages (from numba>=0.43.0->librosa) (0.40.1)\n",
375
+ "Requirement already satisfied: cffi>=1.0 in /home/jamal/.local/lib/python3.8/site-packages (from soundfile>=0.10.2->librosa) (1.15.1)\n",
376
+ "Requirement already satisfied: platformdirs>=2.5.0 in /home/jamal/.local/lib/python3.8/site-packages (from pooch>=1.0->librosa) (2.6.2)\n",
377
+ "Requirement already satisfied: requests>=2.19.0 in /home/jamal/.local/lib/python3.8/site-packages (from pooch>=1.0->librosa) (2.28.2)\n",
378
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /home/jamal/.local/lib/python3.8/site-packages (from scikit-learn!=0.19.0,>=0.14.0->librosa) (3.2.0)\n",
379
+ "Requirement already satisfied: six in /usr/lib/python3/dist-packages (from asttokens<3.0.0,>=2.0.0->devtools) (1.14.0)\n",
380
+ "Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from nvidia-cuda-runtime-cu11==11.7.99; platform_system == \"Linux\" and platform_machine == \"x86_64\"->torch->encodec) (45.2.0)\n",
381
+ "Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (from nvidia-cuda-runtime-cu11==11.7.99; platform_system == \"Linux\" and platform_machine == \"x86_64\"->torch->encodec) (0.34.2)\n",
382
+ "Requirement already satisfied: mpmath>=0.19 in /home/jamal/.local/lib/python3.8/site-packages (from sympy->torch->encodec) (1.3.0)\n",
383
+ "Requirement already satisfied: lit in /home/jamal/.local/lib/python3.8/site-packages (from triton==2.0.0; platform_system == \"Linux\" and platform_machine == \"x86_64\"->torch->encodec) (16.0.6)\n",
384
+ "Requirement already satisfied: cmake in /home/jamal/.local/lib/python3.8/site-packages (from triton==2.0.0; platform_system == \"Linux\" and platform_machine == \"x86_64\"->torch->encodec) (3.27.0)\n",
385
+ "Requirement already satisfied: MarkupSafe>=2.0 in /home/jamal/.local/lib/python3.8/site-packages (from jinja2->torch->encodec) (2.1.2)\n",
386
+ "Requirement already satisfied: mdurl~=0.1 in /home/jamal/.local/lib/python3.8/site-packages (from markdown-it-py<3.0.0,>=2.2.0->rich>=11.0.0->rich-argparse) (0.1.2)\n",
387
+ "Requirement already satisfied: zipp>=0.5 in /usr/lib/python3/dist-packages (from importlib-metadata; python_version < \"3.9\"->numba>=0.43.0->librosa) (1.0.0)\n",
388
+ "Requirement already satisfied: pycparser in /home/jamal/.local/lib/python3.8/site-packages (from cffi>=1.0->soundfile>=0.10.2->librosa) (2.21)\n",
389
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests>=2.19.0->pooch>=1.0->librosa) (2019.11.28)\n",
390
+ "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/jamal/.local/lib/python3.8/site-packages (from requests>=2.19.0->pooch>=1.0->librosa) (1.26.7)\n",
391
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /home/jamal/.local/lib/python3.8/site-packages (from requests>=2.19.0->pooch>=1.0->librosa) (3.0.1)\n",
392
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests>=2.19.0->pooch>=1.0->librosa) (2.8)\n",
393
+ "Installing collected packages: devtools\n",
394
+ "Successfully installed devtools-0.11.0\n",
395
+ "fish: Unknown command: python\n",
396
+ "fish: \n",
397
+ "python bark_webui.py --share\n",
398
+ "^\n"
399
+ ]
400
+ }
401
+ ],
402
+ "source": [
403
+ "!pip install -r old_setup_files/requirements-pip.txt\n",
404
+ "!pip install encodec rich-argparse librosa pydub devtools"
405
+ ]
406
+ },
407
+ {
408
+ "cell_type": "code",
409
+ "execution_count": 3,
410
+ "id": "e6884c4a",
411
+ "metadata": {},
412
+ "outputs": [
413
+ {
414
+ "name": "stdout",
415
+ "output_type": "stream",
416
+ "text": [
417
+ "Collecting typing-extensions\n",
418
+ " Downloading typing_extensions-4.7.1-py3-none-any.whl (33 kB)\n",
419
+ "\u001b[31mERROR: tensorflow 2.13.0 has requirement numpy<=1.24.3,>=1.22, but you'll have numpy 1.20.3 which is incompatible.\u001b[0m\n",
420
+ "\u001b[31mERROR: tensorflow 2.13.0 has requirement typing-extensions<4.6.0,>=3.6.6, but you'll have typing-extensions 4.7.1 which is incompatible.\u001b[0m\n",
421
+ "Installing collected packages: typing-extensions\n",
422
+ " Attempting uninstall: typing-extensions\n",
423
+ " Found existing installation: typing-extensions 4.5.0\n",
424
+ " Uninstalling typing-extensions-4.5.0:\n",
425
+ " Successfully uninstalled typing-extensions-4.5.0\n",
426
+ "Successfully installed typing-extensions-4.7.1\n",
427
+ "Note: you may need to restart the kernel to use updated packages.\n"
428
+ ]
429
+ }
430
+ ],
431
+ "source": [
432
+ "pip install typing-extensions --upgrade"
433
+ ]
434
+ },
435
+ {
436
+ "cell_type": "code",
437
+ "execution_count": 4,
438
+ "id": "3a2e8312",
439
+ "metadata": {},
440
+ "outputs": [
441
+ {
442
+ "name": "stdout",
443
+ "output_type": "stream",
444
+ "text": [
445
+ "Traceback (most recent call last):\r\n",
446
+ " File \"bark_webui.py\", line 14, in <module>\r\n",
447
+ " from bark_infinity import config\r\n",
448
+ " File \"/home/jamal/projects/bark/bark_infinity/__init__.py\", line 1, in <module>\r\n",
449
+ " from .api import generate_audio, text_to_semantic, semantic_to_waveform, save_as_prompt\r\n",
450
+ " File \"/home/jamal/projects/bark/bark_infinity/api.py\", line 30, in <module>\r\n",
451
+ " from .clonevoice import wav_to_semantics, generate_fine_from_wav, quick_clone\r\n",
452
+ " File \"/home/jamal/projects/bark/bark_infinity/clonevoice.py\", line 31, in <module>\r\n",
453
+ " from bark_infinity.hubert.customtokenizer import CustomTokenizer\r\n",
454
+ " File \"/home/jamal/projects/bark/bark_infinity/hubert/customtokenizer.py\", line 159, in <module>\r\n",
455
+ " def auto_train(data_path, save_path=\"model.pth\", load_model: str | None = None, save_epochs=1):\r\n",
456
+ "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'\r\n"
457
+ ]
458
+ }
459
+ ],
460
+ "source": [
461
+ "!python3 bark_webui.py --share"
462
+ ]
463
+ }
464
+ ],
465
+ "metadata": {
466
+ "kernelspec": {
467
+ "display_name": "Python 3 (ipykernel)",
468
+ "language": "python",
469
+ "name": "python3"
470
+ },
471
+ "language_info": {
472
+ "codemirror_mode": {
473
+ "name": "ipython",
474
+ "version": 3
475
+ },
476
+ "file_extension": ".py",
477
+ "mimetype": "text/x-python",
478
+ "name": "python",
479
+ "nbconvert_exporter": "python",
480
+ "pygments_lexer": "ipython3",
481
+ "version": "3.8.10"
482
+ }
483
+ },
484
+ "nbformat": 4,
485
+ "nbformat_minor": 5
486
+ }
bark/__init__.py ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ from .api import generate_audio, text_to_semantic, semantic_to_waveform, save_as_prompt
2
+ from .generation import SAMPLE_RATE, preload_models
bark/__main__.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ from .cli import cli
2
+
3
+ cli()
4
+
bark/api.py ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Dict, Optional, Union
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[Union[Dict, 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
+ use_kv_caching=True
31
+ )
32
+ return x_semantic
33
+
34
+
35
+ def semantic_to_waveform(
36
+ semantic_tokens: np.ndarray,
37
+ history_prompt: Optional[Union[Dict, str]] = None,
38
+ temp: float = 0.7,
39
+ silent: bool = False,
40
+ output_full: bool = False,
41
+ ):
42
+ """Generate audio array from semantic input.
43
+
44
+ Args:
45
+ semantic_tokens: semantic token output from `text_to_semantic`
46
+ history_prompt: history choice for audio cloning
47
+ temp: generation temperature (1.0 more diverse, 0.0 more conservative)
48
+ silent: disable progress bar
49
+ output_full: return full generation to be used as a history prompt
50
+
51
+ Returns:
52
+ numpy audio array at sample frequency 24khz
53
+ """
54
+ coarse_tokens = generate_coarse(
55
+ semantic_tokens,
56
+ history_prompt=history_prompt,
57
+ temp=temp,
58
+ silent=silent,
59
+ use_kv_caching=True
60
+ )
61
+ fine_tokens = generate_fine(
62
+ coarse_tokens,
63
+ history_prompt=history_prompt,
64
+ temp=0.5,
65
+ )
66
+ audio_arr = codec_decode(fine_tokens)
67
+ if output_full:
68
+ full_generation = {
69
+ "semantic_prompt": semantic_tokens,
70
+ "coarse_prompt": coarse_tokens,
71
+ "fine_prompt": fine_tokens,
72
+ }
73
+ return full_generation, audio_arr
74
+ return audio_arr
75
+
76
+
77
+ def save_as_prompt(filepath, full_generation):
78
+ assert(filepath.endswith(".npz"))
79
+ assert(isinstance(full_generation, dict))
80
+ assert("semantic_prompt" in full_generation)
81
+ assert("coarse_prompt" in full_generation)
82
+ assert("fine_prompt" in full_generation)
83
+ np.savez(filepath, **full_generation)
84
+
85
+
86
+ def generate_audio(
87
+ text: str,
88
+ history_prompt: Optional[Union[Dict, str]] = None,
89
+ text_temp: float = 0.7,
90
+ waveform_temp: float = 0.7,
91
+ silent: bool = False,
92
+ output_full: bool = False,
93
+ ):
94
+ """Generate audio array from input text.
95
+
96
+ Args:
97
+ text: text to be turned into audio
98
+ history_prompt: history choice for audio cloning
99
+ text_temp: generation temperature (1.0 more diverse, 0.0 more conservative)
100
+ waveform_temp: generation temperature (1.0 more diverse, 0.0 more conservative)
101
+ silent: disable progress bar
102
+ output_full: return full generation to be used as a history prompt
103
+
104
+ Returns:
105
+ numpy audio array at sample frequency 24khz
106
+ """
107
+ semantic_tokens = text_to_semantic(
108
+ text,
109
+ history_prompt=history_prompt,
110
+ temp=text_temp,
111
+ silent=silent,
112
+ )
113
+ out = semantic_to_waveform(
114
+ semantic_tokens,
115
+ history_prompt=history_prompt,
116
+ temp=waveform_temp,
117
+ silent=silent,
118
+ output_full=output_full,
119
+ )
120
+ if output_full:
121
+ full_generation, audio_arr = out
122
+ return full_generation, audio_arr
123
+ else:
124
+ audio_arr = out
125
+ return audio_arr
bark/assets/prompts/announcer.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26f2d1a9e3b6fe453cf5fc8191de26cbfae6276c5b0f7c376c6a0f3c35867f83
3
+ size 16794
bark/assets/prompts/de_speaker_0.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:008d7f3d0a52305a80c1abce26ccf4120181554a24055a0581894819b14f998d
3
+ size 31940
bark/assets/prompts/de_speaker_1.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5bb2ac34fa466f5d6804f48f51658d7b7d8d91ce7139d34c717c917578858fb
3
+ size 31940
bark/assets/prompts/de_speaker_2.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1dedc8ab1949653480223f0c0cf3ebd20406d39b52e19908d32275eb8cfaf4b9
3
+ size 23516
bark/assets/prompts/de_speaker_3.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5abe325e6306a7f96725fcc6186c0eb147d2f068ce14b863e086cbf52b1986e
3
+ size 29060
bark/assets/prompts/de_speaker_4.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91d102ad045aabc996f487d0d4f0b3fd289ef2da200d1df289cf5da298d23796
3
+ size 20316
bark/assets/prompts/de_speaker_5.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8aa116b450c74c60ef43d1fd141fe961e23ebeafdcb57991b22ae4a08c62cf44
3
+ size 35084
bark/assets/prompts/de_speaker_6.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f95bd28bc7382b7294c0bb187b18873aa9c050b3fe5793166c547200c8e2da9
3
+ size 31724
bark/assets/prompts/de_speaker_7.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:332c5aee851c0544e1ad587fbc477b8d4eb28e852192fcd969d97c894b028a2b
3
+ size 59348
bark/assets/prompts/de_speaker_8.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0eefea2a0d702177f44df4b218b950119726c041cb505e1df36ab0fc0651018
3
+ size 25116
bark/assets/prompts/de_speaker_9.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:189e941a182411853351c56e422d51a4a8fad20f1f8b8f396042bb2ada3cceb2
3
+ size 22180
bark/assets/prompts/en_speaker_0.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb130b14872cc53381bdb867cee71c26a6d116af81dbf2542f3f44d11b8aaf3f
3
+ size 22396
bark/assets/prompts/en_speaker_1.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3cdc113954acb3839e9112437a029d482925236bce91294803a42e3f1f493aea
3
+ size 18396
bark/assets/prompts/en_speaker_2.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c27653e7db430ba4518cb5306c62a228329f928bfa566f68334545f0949b5eea
3
+ size 33860
bark/assets/prompts/en_speaker_3.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22de48d9414836a5337e483b256ed916d51ece916c36669371d9e92b1323047b
3
+ size 38124
bark/assets/prompts/en_speaker_4.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3481fe27c9ffc73b68783ebe122934e0430a888c199ade914e97433df73038c1
3
+ size 21220
bark/assets/prompts/en_speaker_5.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b661d1573ab2df0d89b4b51e79d727dd5bfccfe8d740a84594de4028e1a23057
3
+ size 15516
bark/assets/prompts/en_speaker_6.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d8f92a1ea0383453614d1c20c8cfbeaf9ad28d9f5778f718bf0e54eb18c0245
3
+ size 13436
bark/assets/prompts/en_speaker_7.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6fdbb2c04efb4e81d179369b614678adba1cac9da8cc76fe6c40396da681b3a3
3
+ size 35084
bark/assets/prompts/en_speaker_8.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b4233571cfc24030c9c2ed823f6393d8f3c99e26fef20d744a2e5ff59b93f086
3
+ size 18980
bark/assets/prompts/en_speaker_9.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb86c2ec884fcc906cb0d7342a9d84657f6d9abeac3c88c7b1bbfd1207ec09ca
3
+ size 35940
bark/assets/prompts/es_speaker_0.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a4849970528104040e0ed6a96f9c705b58c72b5eee538baed1fa2283873b331
3
+ size 27620
bark/assets/prompts/es_speaker_1.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c41ca11134138c1cb6108f643c686f0d0c72f376a13576cd9490721a0916d07a
3
+ size 25436
bark/assets/prompts/es_speaker_2.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9a6406ce99291a80f81bef895e1fd3d13b5204143d656cf0aa30c013f2974bd
3
+ size 27620
bark/assets/prompts/es_speaker_3.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9e43586d2a185df543444fe3f7e604bfe56c9f1364f59c9671be75e88b14d02
3
+ size 26500
bark/assets/prompts/es_speaker_4.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52b4c89d19199265d9347ff83550ceeb5bead49c2552df776ef292f851d3de33
3
+ size 24420
bark/assets/prompts/es_speaker_5.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c57dddcdf54e8e97813e887dc2e066efde628d17e10fad2a9824b552af485b2
3
+ size 24900
bark/assets/prompts/es_speaker_6.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22b2dc4980a17c3dcd5f2833cc0eaab5dec06e7233520885fa792f618606dc68
3
+ size 34820
bark/assets/prompts/es_speaker_7.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c848b3561977abaed30f38fcda853283ae04c11457483347c8baaa2d5a5f94d3
3
+ size 21596
bark/assets/prompts/es_speaker_8.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:691b4a12bbfd8f0e04df1ed793de2a4ada97ae04a7546e3bee12aaa094b7e156
3
+ size 18660
bark/assets/prompts/es_speaker_9.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5dda9f490517edf9447e2f02de3bec3877515a086e9668d7f0abb0d800d82ab6
3
+ size 22660
bark/assets/prompts/fr_speaker_0.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f483b271820be529ffc95968a1b7cd5e5f63137c30649192b1e10a935a8b846c
3
+ size 30604
bark/assets/prompts/fr_speaker_1.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba3805ef05a285f8501762900b1919631b2fd4274ee8d7cf4b4c432afd6a7635
3
+ size 29324
bark/assets/prompts/fr_speaker_2.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3e7654e74d80a7068745838b1640c72d3616fbb2fa8f88de997d252139f7b74
3
+ size 51084
bark/assets/prompts/fr_speaker_3.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e67de23fa486d091eaea3d276dcf640ed0d34079fc5e78ae9e4ab0f758341af2
3
+ size 31460
bark/assets/prompts/fr_speaker_4.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0e02e7b5f98b834968a47b1dbbb7acb18b681152461ae08e16c4b5ee93cbbcd
3
+ size 36364
bark/assets/prompts/fr_speaker_5.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f771bcf5db66f2865a8023874291a6d706154853c9c9bdecd0ab0aeae3bd0a59
3
+ size 44044
bark/assets/prompts/fr_speaker_6.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21906f0c2dc2578662cdc6359a03a96e02aa296c02d0cd3c50cb9dca4379ae9a
3
+ size 43564
bark/assets/prompts/fr_speaker_7.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51b48089d9a29cc2dc8db21393fb67558cfa75a6aa46d1b495d483d13fffa04d
3
+ size 53908