singoojiang commited on
Commit
52a88b4
·
verified ·
1 Parent(s): 8ca222e

Upload 87 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Bark_Coqui.ipynb +835 -0
  2. Bark_Voice_Cloning.ipynb +380 -0
  3. Dockerfile +38 -0
  4. LICENSE +21 -0
  5. README_zh.md +96 -0
  6. SambertHifigan.ipynb +680 -0
  7. Sambert_Voice_Cloning_in_One_Click.ipynb +0 -0
  8. Sambert中文声音克隆v2.ipynb +1195 -0
  9. VALL_E_X.ipynb +877 -0
  10. Voice_Cloning_for_Chinese_Speech_v2.ipynb +0 -0
  11. XTTS_Colab.ipynb +0 -0
  12. app.py +394 -0
  13. bark/.DS_Store +0 -0
  14. bark/__init__.py +2 -0
  15. bark/api.py +158 -0
  16. bark/assets/prompts/announcer.npz +3 -0
  17. bark/assets/prompts/v2/en_speaker_0.npz +3 -0
  18. bark/assets/prompts/v2/en_speaker_1.npz +3 -0
  19. bark/assets/prompts/v2/en_speaker_2.npz +3 -0
  20. bark/assets/prompts/v2/en_speaker_3.npz +3 -0
  21. bark/assets/prompts/v2/en_speaker_4.npz +3 -0
  22. bark/assets/prompts/v2/en_speaker_5.npz +3 -0
  23. bark/assets/prompts/v2/en_speaker_6.npz +3 -0
  24. bark/assets/prompts/v2/en_speaker_7.npz +3 -0
  25. bark/assets/prompts/v2/en_speaker_8.npz +3 -0
  26. bark/assets/prompts/v2/en_speaker_9.npz +3 -0
  27. bark/assets/prompts/v2/zh_speaker_0.npz +3 -0
  28. bark/assets/prompts/v2/zh_speaker_1.npz +3 -0
  29. bark/assets/prompts/v2/zh_speaker_2.npz +3 -0
  30. bark/assets/prompts/v2/zh_speaker_3.npz +3 -0
  31. bark/assets/prompts/v2/zh_speaker_4.npz +3 -0
  32. bark/assets/prompts/v2/zh_speaker_5.npz +3 -0
  33. bark/assets/prompts/v2/zh_speaker_6.npz +3 -0
  34. bark/assets/prompts/v2/zh_speaker_7.npz +3 -0
  35. bark/assets/prompts/v2/zh_speaker_8.npz +3 -0
  36. bark/assets/prompts/v2/zh_speaker_9.npz +3 -0
  37. bark/generation.py +864 -0
  38. bark/hubert/__init__.py +0 -0
  39. bark/hubert/customtokenizer.py +195 -0
  40. bark/hubert/hubert_manager.py +48 -0
  41. bark/hubert/pre_kmeans_hubert.py +107 -0
  42. bark/model.py +218 -0
  43. bark/model_fine.py +149 -0
  44. bark/settings.py +7 -0
  45. cloning/__init__.py +0 -0
  46. cloning/clonevoice.py +68 -0
  47. config.yaml +8 -0
  48. notebooks/AI_Agent.ipynb +789 -0
  49. notebooks/ChatGLM2_linghua_VITS2.ipynb +838 -0
  50. notebooks/GPT_SoVITS.ipynb +1063 -0
Bark_Coqui.ipynb ADDED
@@ -0,0 +1,835 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "machine_shape": "hm",
8
+ "gpuType": "V100",
9
+ "authorship_tag": "ABX9TyPyrn6jFZi/oEnzl09PL+i6",
10
+ "include_colab_link": true
11
+ },
12
+ "kernelspec": {
13
+ "name": "python3",
14
+ "display_name": "Python 3"
15
+ },
16
+ "language_info": {
17
+ "name": "python"
18
+ },
19
+ "accelerator": "GPU"
20
+ },
21
+ "cells": [
22
+ {
23
+ "cell_type": "markdown",
24
+ "metadata": {
25
+ "id": "view-in-github",
26
+ "colab_type": "text"
27
+ },
28
+ "source": [
29
+ "<a href=\"https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/Bark_Coqui.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type": "code",
34
+ "execution_count": 1,
35
+ "metadata": {
36
+ "colab": {
37
+ "base_uri": "https://localhost:8080/"
38
+ },
39
+ "id": "dqFwQ3acv7EJ",
40
+ "outputId": "d7a428a4-dee8-4c9a-81c8-c36bf1211edc"
41
+ },
42
+ "outputs": [
43
+ {
44
+ "output_type": "stream",
45
+ "name": "stdout",
46
+ "text": [
47
+ "Cloning into 'Bark-Coqui'...\n",
48
+ "remote: Enumerating objects: 78, done.\u001b[K\n",
49
+ "remote: Counting objects: 100% (78/78), done.\u001b[K\n",
50
+ "remote: Compressing objects: 100% (60/60), done.\u001b[K\n",
51
+ "remote: Total 78 (delta 22), reused 54 (delta 14), pack-reused 0\u001b[K\n",
52
+ "Unpacking objects: 100% (78/78), 3.04 MiB | 7.62 MiB/s, done.\n"
53
+ ]
54
+ }
55
+ ],
56
+ "source": [
57
+ "!git clone https://huggingface.co/spaces/kevinwang676/Bark-Coqui"
58
+ ]
59
+ },
60
+ {
61
+ "cell_type": "code",
62
+ "source": [
63
+ "cd Bark-Coqui"
64
+ ],
65
+ "metadata": {
66
+ "colab": {
67
+ "base_uri": "https://localhost:8080/"
68
+ },
69
+ "id": "rlBjfzJkwDV9",
70
+ "outputId": "a141e56b-0200-4526-8356-49dcb35d2c7b"
71
+ },
72
+ "execution_count": 2,
73
+ "outputs": [
74
+ {
75
+ "output_type": "stream",
76
+ "name": "stdout",
77
+ "text": [
78
+ "/content/Bark-Coqui\n"
79
+ ]
80
+ }
81
+ ]
82
+ },
83
+ {
84
+ "cell_type": "code",
85
+ "source": [
86
+ "pip install -r requirements.txt"
87
+ ],
88
+ "metadata": {
89
+ "colab": {
90
+ "base_uri": "https://localhost:8080/"
91
+ },
92
+ "id": "8bvGc1l5DgFm",
93
+ "outputId": "3332cd5b-47ae-458b-dca3-5001234a8f8c"
94
+ },
95
+ "execution_count": 4,
96
+ "outputs": [
97
+ {
98
+ "output_type": "stream",
99
+ "name": "stdout",
100
+ "text": [
101
+ "Requirement already satisfied: TTS==0.17.8 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 1)) (0.17.8)\n",
102
+ "Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 2)) (4.33.3)\n",
103
+ "Requirement already satisfied: scipy==1.11.3 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 3)) (1.11.3)\n",
104
+ "Collecting pydub==0.25.1 (from -r requirements.txt (line 4))\n",
105
+ " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
106
+ "Collecting diffq==0.2.4 (from -r requirements.txt (line 5))\n",
107
+ " Downloading diffq-0.2.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (418 kB)\n",
108
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m418.8/418.8 kB\u001b[0m \u001b[31m8.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
109
+ "\u001b[?25hRequirement already satisfied: cython==0.29.30 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.29.30)\n",
110
+ "Requirement already satisfied: torch>=1.7 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (2.0.1+cu118)\n",
111
+ "Requirement already satisfied: torchaudio in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (2.0.2+cu118)\n",
112
+ "Requirement already satisfied: soundfile==0.12.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.12.1)\n",
113
+ "Requirement already satisfied: librosa==0.10.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.10.0)\n",
114
+ "Requirement already satisfied: scikit-learn==1.3.0 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (1.3.0)\n",
115
+ "Requirement already satisfied: inflect==5.6.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (5.6.2)\n",
116
+ "Requirement already satisfied: tqdm==4.64.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (4.64.1)\n",
117
+ "Requirement already satisfied: anyascii==0.3.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.3.2)\n",
118
+ "Requirement already satisfied: pyyaml==6.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (6.0.1)\n",
119
+ "Requirement already satisfied: fsspec==2023.6.0 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (2023.6.0)\n",
120
+ "Requirement already satisfied: aiohttp==3.8.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (3.8.6)\n",
121
+ "Requirement already satisfied: packaging==23.1 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (23.1)\n",
122
+ "Requirement already satisfied: flask==2.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (2.2.5)\n",
123
+ "Requirement already satisfied: pysbd==0.3.4 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.3.4)\n",
124
+ "Requirement already satisfied: umap-learn==0.5.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.5.4)\n",
125
+ "Requirement already satisfied: pandas<2.0,>=1.4 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (1.5.3)\n",
126
+ "Requirement already satisfied: matplotlib==3.7.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (3.7.1)\n",
127
+ "Requirement already satisfied: trainer in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.0.31)\n",
128
+ "Requirement already satisfied: coqpit>=0.0.16 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.0.17)\n",
129
+ "Requirement already satisfied: jieba in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.42.1)\n",
130
+ "Requirement already satisfied: pypinyin in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.49.0)\n",
131
+ "Requirement already satisfied: gruut[de,es,fr]==2.2.3 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (2.2.3)\n",
132
+ "Requirement already satisfied: jamo in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.4.1)\n",
133
+ "Requirement already satisfied: nltk in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (3.8.1)\n",
134
+ "Requirement already satisfied: g2pkk>=0.1.1 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.1.2)\n",
135
+ "Requirement already satisfied: bangla in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.0.2)\n",
136
+ "Requirement already satisfied: bnnumerizer in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.0.2)\n",
137
+ "Requirement already satisfied: bnunicodenormalizer in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.1.6)\n",
138
+ "Requirement already satisfied: k-diffusion in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.0.16)\n",
139
+ "Requirement already satisfied: einops==0.6.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.6.1)\n",
140
+ "Requirement already satisfied: encodec==0.1.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.1.1)\n",
141
+ "Requirement already satisfied: unidecode==1.3.* in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (1.3.7)\n",
142
+ "Requirement already satisfied: numpy==1.22.0 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (1.22.0)\n",
143
+ "Requirement already satisfied: numba==0.57.0 in /usr/local/lib/python3.10/dist-packages (from TTS==0.17.8->-r requirements.txt (line 1)) (0.57.0)\n",
144
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 2)) (3.12.4)\n",
145
+ "Requirement already satisfied: huggingface-hub<1.0,>=0.15.1 in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 2)) (0.18.0)\n",
146
+ "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 2)) (2023.6.3)\n",
147
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 2)) (2.31.0)\n",
148
+ "Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 2)) (0.13.3)\n",
149
+ "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 2)) (0.4.0)\n",
150
+ "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp==3.8.*->TTS==0.17.8->-r requirements.txt (line 1)) (23.1.0)\n",
151
+ "Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp==3.8.*->TTS==0.17.8->-r requirements.txt (line 1)) (3.3.0)\n",
152
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp==3.8.*->TTS==0.17.8->-r requirements.txt (line 1)) (6.0.4)\n",
153
+ "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp==3.8.*->TTS==0.17.8->-r requirements.txt (line 1)) (4.0.3)\n",
154
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp==3.8.*->TTS==0.17.8->-r requirements.txt (line 1)) (1.9.2)\n",
155
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp==3.8.*->TTS==0.17.8->-r requirements.txt (line 1)) (1.4.0)\n",
156
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp==3.8.*->TTS==0.17.8->-r requirements.txt (line 1)) (1.3.1)\n",
157
+ "Requirement already satisfied: Werkzeug>=2.2.2 in /usr/local/lib/python3.10/dist-packages (from flask==2.*->TTS==0.17.8->-r requirements.txt (line 1)) (3.0.0)\n",
158
+ "Requirement already satisfied: Jinja2>=3.0 in /usr/local/lib/python3.10/dist-packages (from flask==2.*->TTS==0.17.8->-r requirements.txt (line 1)) (3.1.2)\n",
159
+ "Requirement already satisfied: itsdangerous>=2.0 in /usr/local/lib/python3.10/dist-packages (from flask==2.*->TTS==0.17.8->-r requirements.txt (line 1)) (2.1.2)\n",
160
+ "Requirement already satisfied: click>=8.0 in /usr/local/lib/python3.10/dist-packages (from flask==2.*->TTS==0.17.8->-r requirements.txt (line 1)) (8.1.7)\n",
161
+ "Requirement already satisfied: Babel<3.0.0,>=2.8.0 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (2.13.0)\n",
162
+ "Requirement already satisfied: dateparser~=1.1.0 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (1.1.8)\n",
163
+ "Requirement already satisfied: gruut-ipa<1.0,>=0.12.0 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (0.13.0)\n",
164
+ "Requirement already satisfied: gruut-lang-en~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (2.0.0)\n",
165
+ "Requirement already satisfied: jsonlines~=1.2.0 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (1.2.0)\n",
166
+ "Requirement already satisfied: networkx<3.0.0,>=2.5.0 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (2.8.8)\n",
167
+ "Requirement already satisfied: num2words<1.0.0,>=0.5.10 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (0.5.13)\n",
168
+ "Requirement already satisfied: python-crfsuite~=0.9.7 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (0.9.9)\n",
169
+ "Requirement already satisfied: gruut-lang-es~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (2.0.0)\n",
170
+ "Requirement already satisfied: gruut-lang-de~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (2.0.0)\n",
171
+ "Requirement already satisfied: gruut-lang-fr~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (2.0.2)\n",
172
+ "Requirement already satisfied: audioread>=2.1.9 in /usr/local/lib/python3.10/dist-packages (from librosa==0.10.*->TTS==0.17.8->-r requirements.txt (line 1)) (3.0.1)\n",
173
+ "Requirement already satisfied: joblib>=0.14 in /usr/local/lib/python3.10/dist-packages (from librosa==0.10.*->TTS==0.17.8->-r requirements.txt (line 1)) (1.3.2)\n",
174
+ "Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.10/dist-packages (from librosa==0.10.*->TTS==0.17.8->-r requirements.txt (line 1)) (4.4.2)\n",
175
+ "Requirement already satisfied: pooch>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa==0.10.*->TTS==0.17.8->-r requirements.txt (line 1)) (1.7.0)\n",
176
+ "Requirement already satisfied: soxr>=0.3.2 in /usr/local/lib/python3.10/dist-packages (from librosa==0.10.*->TTS==0.17.8->-r requirements.txt (line 1)) (0.3.7)\n",
177
+ "Requirement already satisfied: typing-extensions>=4.1.1 in /usr/local/lib/python3.10/dist-packages (from librosa==0.10.*->TTS==0.17.8->-r requirements.txt (line 1)) (4.5.0)\n",
178
+ "Requirement already satisfied: lazy-loader>=0.1 in /usr/local/lib/python3.10/dist-packages (from librosa==0.10.*->TTS==0.17.8->-r requirements.txt (line 1)) (0.3)\n",
179
+ "Requirement already satisfied: msgpack>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa==0.10.*->TTS==0.17.8->-r requirements.txt (line 1)) (1.0.7)\n",
180
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.*->TTS==0.17.8->-r requirements.txt (line 1)) (1.1.1)\n",
181
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.*->TTS==0.17.8->-r requirements.txt (line 1)) (0.12.1)\n",
182
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.*->TTS==0.17.8->-r requirements.txt (line 1)) (4.43.1)\n",
183
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.*->TTS==0.17.8->-r requirements.txt (line 1)) (1.4.5)\n",
184
+ "Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.*->TTS==0.17.8->-r requirements.txt (line 1)) (9.4.0)\n",
185
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.*->TTS==0.17.8->-r requirements.txt (line 1)) (3.1.1)\n",
186
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.*->TTS==0.17.8->-r requirements.txt (line 1)) (2.8.2)\n",
187
+ "Requirement already satisfied: llvmlite<0.41,>=0.40.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba==0.57.0->TTS==0.17.8->-r requirements.txt (line 1)) (0.40.1)\n",
188
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn==1.3.0->TTS==0.17.8->-r requirements.txt (line 1)) (3.2.0)\n",
189
+ "Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile==0.12.*->TTS==0.17.8->-r requirements.txt (line 1)) (1.16.0)\n",
190
+ "Requirement already satisfied: pynndescent>=0.5 in /usr/local/lib/python3.10/dist-packages (from umap-learn==0.5.*->TTS==0.17.8->-r requirements.txt (line 1)) (0.5.10)\n",
191
+ "Requirement already satisfied: tbb>=2019.0 in /usr/local/lib/python3.10/dist-packages (from umap-learn==0.5.*->TTS==0.17.8->-r requirements.txt (line 1)) (2021.10.0)\n",
192
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<2.0,>=1.4->TTS==0.17.8->-r requirements.txt (line 1)) (2023.3.post1)\n",
193
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.7->TTS==0.17.8->-r requirements.txt (line 1)) (1.12)\n",
194
+ "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.7->TTS==0.17.8->-r requirements.txt (line 1)) (2.0.0)\n",
195
+ "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.7->TTS==0.17.8->-r requirements.txt (line 1)) (3.27.7)\n",
196
+ "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.7->TTS==0.17.8->-r requirements.txt (line 1)) (17.0.2)\n",
197
+ "Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.23.0)\n",
198
+ "Requirement already satisfied: clean-fid in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.1.35)\n",
199
+ "Requirement already satisfied: clip-anytorch in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (2.5.2)\n",
200
+ "Requirement already satisfied: jsonmerge in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (1.9.2)\n",
201
+ "Requirement already satisfied: kornia in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.7.0)\n",
202
+ "Requirement already satisfied: resize-right in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.0.2)\n",
203
+ "Requirement already satisfied: scikit-image in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.19.3)\n",
204
+ "Requirement already satisfied: torchdiffeq in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.2.3)\n",
205
+ "Requirement already satisfied: torchsde in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.2.6)\n",
206
+ "Requirement already satisfied: torchvision in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.15.2+cu118)\n",
207
+ "Requirement already satisfied: wandb in /usr/local/lib/python3.10/dist-packages (from k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.15.12)\n",
208
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers->-r requirements.txt (line 2)) (3.4)\n",
209
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers->-r requirements.txt (line 2)) (2.0.6)\n",
210
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers->-r requirements.txt (line 2)) (2023.7.22)\n",
211
+ "Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from trainer->TTS==0.17.8->-r requirements.txt (line 1)) (5.9.5)\n",
212
+ "Requirement already satisfied: tensorboard in /usr/local/lib/python3.10/dist-packages (from trainer->TTS==0.17.8->-r requirements.txt (line 1)) (2.13.0)\n",
213
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile==0.12.*->TTS==0.17.8->-r requirements.txt (line 1)) (2.21)\n",
214
+ "Requirement already satisfied: tzlocal in /usr/local/lib/python3.10/dist-packages (from dateparser~=1.1.0->gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (5.1)\n",
215
+ "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from Jinja2>=3.0->flask==2.*->TTS==0.17.8->-r requirements.txt (line 1)) (2.1.3)\n",
216
+ "Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from jsonlines~=1.2.0->gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (1.16.0)\n",
217
+ "Requirement already satisfied: docopt>=0.6.2 in /usr/local/lib/python3.10/dist-packages (from num2words<1.0.0,>=0.5.10->gruut[de,es,fr]==2.2.3->TTS==0.17.8->-r requirements.txt (line 1)) (0.6.2)\n",
218
+ "Requirement already satisfied: platformdirs>=2.5.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.0->librosa==0.10.*->TTS==0.17.8->-r requirements.txt (line 1)) (3.11.0)\n",
219
+ "Requirement already satisfied: ftfy in /usr/local/lib/python3.10/dist-packages (from clip-anytorch->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (6.1.1)\n",
220
+ "Requirement already satisfied: jsonschema>2.4.0 in /usr/local/lib/python3.10/dist-packages (from jsonmerge->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (4.19.1)\n",
221
+ "Requirement already satisfied: imageio>=2.4.1 in /usr/local/lib/python3.10/dist-packages (from scikit-image->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (2.31.5)\n",
222
+ "Requirement already satisfied: tifffile>=2019.7.26 in /usr/local/lib/python3.10/dist-packages (from scikit-image->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (2023.9.26)\n",
223
+ "Requirement already satisfied: PyWavelets>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from scikit-image->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (1.4.1)\n",
224
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.7->TTS==0.17.8->-r requirements.txt (line 1)) (1.3.0)\n",
225
+ "Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.10/dist-packages (from tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (1.4.0)\n",
226
+ "Requirement already satisfied: grpcio>=1.48.2 in /usr/local/lib/python3.10/dist-packages (from tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (1.59.0)\n",
227
+ "Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.10/dist-packages (from tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (2.17.3)\n",
228
+ "Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in /usr/local/lib/python3.10/dist-packages (from tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (1.0.0)\n",
229
+ "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.10/dist-packages (from tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (3.5)\n",
230
+ "Requirement already satisfied: protobuf>=3.19.6 in /usr/local/lib/python3.10/dist-packages (from tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (3.20.3)\n",
231
+ "Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (67.7.2)\n",
232
+ "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (0.7.1)\n",
233
+ "Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.10/dist-packages (from tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (0.41.2)\n",
234
+ "Requirement already satisfied: trampoline>=0.1.2 in /usr/local/lib/python3.10/dist-packages (from torchsde->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.1.2)\n",
235
+ "Requirement already satisfied: GitPython!=3.1.29,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (3.1.40)\n",
236
+ "Requirement already satisfied: sentry-sdk>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (1.32.0)\n",
237
+ "Requirement already satisfied: docker-pycreds>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from wandb->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.4.0)\n",
238
+ "Requirement already satisfied: pathtools in /usr/local/lib/python3.10/dist-packages (from wandb->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.1.2)\n",
239
+ "Requirement already satisfied: setproctitle in /usr/local/lib/python3.10/dist-packages (from wandb->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (1.3.3)\n",
240
+ "Requirement already satisfied: appdirs>=1.4.3 in /usr/local/lib/python3.10/dist-packages (from wandb->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (1.4.4)\n",
241
+ "Requirement already satisfied: gitdb<5,>=4.0.1 in /usr/local/lib/python3.10/dist-packages (from GitPython!=3.1.29,>=1.0.0->wandb->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (4.0.10)\n",
242
+ "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (5.3.1)\n",
243
+ "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (0.3.0)\n",
244
+ "Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (4.9)\n",
245
+ "Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (1.3.1)\n",
246
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>2.4.0->jsonmerge->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (2023.7.1)\n",
247
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>2.4.0->jsonmerge->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.30.2)\n",
248
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>2.4.0->jsonmerge->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.10.6)\n",
249
+ "Requirement already satisfied: wcwidth>=0.2.5 in /usr/local/lib/python3.10/dist-packages (from ftfy->clip-anytorch->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (0.2.8)\n",
250
+ "Requirement already satisfied: smmap<6,>=3.0.1 in /usr/local/lib/python3.10/dist-packages (from gitdb<5,>=4.0.1->GitPython!=3.1.29,>=1.0.0->wandb->k-diffusion->TTS==0.17.8->-r requirements.txt (line 1)) (5.0.1)\n",
251
+ "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (0.5.0)\n",
252
+ "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard->trainer->TTS==0.17.8->-r requirements.txt (line 1)) (3.2.2)\n",
253
+ "Installing collected packages: pydub, diffq\n",
254
+ "Successfully installed diffq-0.2.4 pydub-0.25.1\n"
255
+ ]
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ "cell_type": "code",
261
+ "source": [
262
+ "import gradio as gr\n",
263
+ "from share_btn import community_icon_html, loading_icon_html, share_js\n",
264
+ "import os\n",
265
+ "import shutil\n",
266
+ "\n",
267
+ "#from huggingface_hub import snapshot_download\n",
268
+ "import numpy as np\n",
269
+ "from scipy.io import wavfile\n",
270
+ "from scipy.io.wavfile import write, read\n",
271
+ "from pydub import AudioSegment\n",
272
+ "\n",
273
+ "file_upload_available = os.environ.get(\"ALLOW_FILE_UPLOAD\")\n",
274
+ "\n",
275
+ "import json\n",
276
+ "with open(\"characters.json\", \"r\") as file:\n",
277
+ " data = json.load(file)\n",
278
+ " characters = [\n",
279
+ " {\n",
280
+ " \"image\": item[\"image\"],\n",
281
+ " \"title\": item[\"title\"],\n",
282
+ " \"speaker\": item[\"speaker\"]\n",
283
+ " }\n",
284
+ " for item in data\n",
285
+ " ]\n",
286
+ "\n",
287
+ "from TTS.api import TTS\n",
288
+ "tts = TTS(\"tts_models/multilingual/multi-dataset/bark\", gpu=True)\n",
289
+ "\n",
290
+ "def cut_wav(input_path, max_duration):\n",
291
+ " # Load the WAV file\n",
292
+ " audio = AudioSegment.from_wav(input_path)\n",
293
+ "\n",
294
+ " # Calculate the duration of the audio\n",
295
+ " audio_duration = len(audio) / 1000 # Convert milliseconds to seconds\n",
296
+ "\n",
297
+ " # Determine the duration to cut (maximum of max_duration and actual audio duration)\n",
298
+ " cut_duration = min(max_duration, audio_duration)\n",
299
+ "\n",
300
+ " # Cut the audio\n",
301
+ " cut_audio = audio[:int(cut_duration * 1000)] # Convert seconds to milliseconds\n",
302
+ "\n",
303
+ " # Get the input file name without extension\n",
304
+ " file_name = os.path.splitext(os.path.basename(input_path))[0]\n",
305
+ "\n",
306
+ " # Construct the output file path with the original file name and \"_cut\" suffix\n",
307
+ " output_path = f\"{file_name}_cut.wav\"\n",
308
+ "\n",
309
+ " # Save the cut audio as a new WAV file\n",
310
+ " cut_audio.export(output_path, format=\"wav\")\n",
311
+ "\n",
312
+ " return output_path\n",
313
+ "\n",
314
+ "def load_hidden(audio_in):\n",
315
+ " return audio_in\n",
316
+ "\n",
317
+ "def load_hidden_mic(audio_in):\n",
318
+ " print(\"MICRO IN HAS CHANGED\")\n",
319
+ "\n",
320
+ " library_path = 'bark_voices'\n",
321
+ " folder_name = 'audio-0-100'\n",
322
+ " second_folder_name = 'audio-0-100_cleaned'\n",
323
+ "\n",
324
+ " folder_path = os.path.join(library_path, folder_name)\n",
325
+ " second_folder_path = os.path.join(library_path, second_folder_name)\n",
326
+ "\n",
327
+ " if os.path.exists(folder_path):\n",
328
+ " try:\n",
329
+ " shutil.rmtree(folder_path)\n",
330
+ " print(f\"Successfully deleted the folder: {folder_path}\")\n",
331
+ " except OSError as e:\n",
332
+ " print(f\"Error: {folder_path} - {e.strerror}\")\n",
333
+ " else:\n",
334
+ " print(f\"The folder does not exist: {folder_path}\")\n",
335
+ "\n",
336
+ " if os.path.exists(second_folder_path):\n",
337
+ " try:\n",
338
+ " shutil.rmtree(second_folder_path)\n",
339
+ " print(f\"Successfully deleted the folder: {second_folder_path}\")\n",
340
+ " except OSError as e:\n",
341
+ " print(f\"Error: {second_folder_path} - {e.strerror}\")\n",
342
+ " else:\n",
343
+ " print(f\"The folder does not exist: {second_folder_path}\")\n",
344
+ "\n",
345
+ " return audio_in\n",
346
+ "\n",
347
+ "def clear_clean_ckeck():\n",
348
+ " return False\n",
349
+ "\n",
350
+ "def wipe_npz_file(folder_path):\n",
351
+ " if os.path.exists(folder_path):\n",
352
+ " #shutil.rmtree(folder_path)\n",
353
+ " print(folder_path)\n",
354
+ " else :\n",
355
+ " print(\"path does not exists yet\")\n",
356
+ " print(\"YO\")\n",
357
+ "\n",
358
+ "def split_process(audio, chosen_out_track):\n",
359
+ " os.makedirs(\"out\", exist_ok=True)\n",
360
+ " write('test.wav', audio[0], audio[1])\n",
361
+ " os.system(\"python3 -m demucs.separate -n mdx_extra_q -j 4 test.wav -o out\")\n",
362
+ " #return \"./out/mdx_extra_q/test/vocals.wav\",\"./out/mdx_extra_q/test/bass.wav\",\"./out/mdx_extra_q/test/drums.wav\",\"./out/mdx_extra_q/test/other.wav\"\n",
363
+ " if chosen_out_track == \"vocals\":\n",
364
+ " return \"./out/mdx_extra_q/test/vocals.wav\"\n",
365
+ " elif chosen_out_track == \"bass\":\n",
366
+ " return \"./out/mdx_extra_q/test/bass.wav\"\n",
367
+ " elif chosen_out_track == \"drums\":\n",
368
+ " return \"./out/mdx_extra_q/test/drums.wav\"\n",
369
+ " elif chosen_out_track == \"other\":\n",
370
+ " return \"./out/mdx_extra_q/test/other.wav\"\n",
371
+ " elif chosen_out_track == \"all-in\":\n",
372
+ " return \"test.wav\"\n",
373
+ "\n",
374
+ "def update_selection(selected_state: gr.SelectData):\n",
375
+ " c_image = characters[selected_state.index][\"image\"]\n",
376
+ " c_title = characters[selected_state.index][\"title\"]\n",
377
+ " c_speaker = characters[selected_state.index][\"speaker\"]\n",
378
+ "\n",
379
+ " return c_title, selected_state\n",
380
+ "\n",
381
+ "\n",
382
+ "def infer(prompt, input_wav_file, clean_audio, hidden_numpy_audio):\n",
383
+ "\n",
384
+ " if clean_audio is True :\n",
385
+ " # Extract the file name without the extension\n",
386
+ " new_name = os.path.splitext(os.path.basename(input_wav_file))[0]\n",
387
+ " check_name = os.path.join(\"bark_voices\", f\"{new_name}_cleaned\")\n",
388
+ " if os.path.exists(check_name):\n",
389
+ " source_path = os.path.join(check_name, f\"{new_name}_cleaned.wav\")\n",
390
+ " else:\n",
391
+ " source_path = split_process(hidden_numpy_audio, \"vocals\")\n",
392
+ "\n",
393
+ " # Rename the file\n",
394
+ " new_path = os.path.join(os.path.dirname(source_path), f\"{new_name}_cleaned.wav\")\n",
395
+ " os.rename(source_path, new_path)\n",
396
+ " source_path = new_path\n",
397
+ " else :\n",
398
+ " # Path to your WAV file\n",
399
+ " source_path = input_wav_file\n",
400
+ "\n",
401
+ " # Destination directory\n",
402
+ " destination_directory = \"bark_voices\"\n",
403
+ "\n",
404
+ " # Extract the file name without the extension\n",
405
+ " file_name = os.path.splitext(os.path.basename(source_path))[0]\n",
406
+ "\n",
407
+ " # Construct the full destination directory path\n",
408
+ " destination_path = os.path.join(destination_directory, file_name)\n",
409
+ "\n",
410
+ " # Create the new directory\n",
411
+ " os.makedirs(destination_path, exist_ok=True)\n",
412
+ "\n",
413
+ " # Move the WAV file to the new directory\n",
414
+ " shutil.move(source_path, os.path.join(destination_path, f\"{file_name}.wav\"))\n",
415
+ "\n",
416
+ " tts.tts_to_file(text=prompt,\n",
417
+ " file_path=\"output.wav\",\n",
418
+ " voice_dir=\"bark_voices/\",\n",
419
+ " speaker=f\"{file_name}\")\n",
420
+ "\n",
421
+ " # List all the files and subdirectories in the given directory\n",
422
+ " contents = os.listdir(f\"bark_voices/{file_name}\")\n",
423
+ "\n",
424
+ " # Print the contents\n",
425
+ " for item in contents:\n",
426
+ " print(item)\n",
427
+ "\n",
428
+ " tts_video = gr.make_waveform(audio=\"output.wav\")\n",
429
+ "\n",
430
+ " return \"output.wav\", tts_video, gr.update(value=f\"bark_voices/{file_name}/{contents[1]}\", visible=True), gr.Group.update(visible=True), destination_path\n",
431
+ "\n",
432
+ "def infer_from_c(prompt, c_name):\n",
433
+ "\n",
434
+ " tts.tts_to_file(text=prompt,\n",
435
+ " file_path=\"output.wav\",\n",
436
+ " voice_dir=\"examples/library/\",\n",
437
+ " speaker=f\"{c_name}\")\n",
438
+ "\n",
439
+ " tts_video = gr.make_waveform(audio=\"output.wav\")\n",
440
+ "\n",
441
+ " return \"output.wav\", tts_video, gr.update(value=f\"examples/library/{c_name}/{c_name}.npz\", visible=True), gr.Group.update(visible=True)\n",
442
+ "\n",
443
+ "\n",
444
+ "css = \"\"\"\n",
445
+ "#col-container {max-width: 780px; margin-left: auto; margin-right: auto;}\n",
446
+ "a {text-decoration-line: underline; font-weight: 600;}\n",
447
+ ".mic-wrap > button {\n",
448
+ " width: 100%;\n",
449
+ " height: 60px;\n",
450
+ " font-size: 1.4em!important;\n",
451
+ "}\n",
452
+ ".record-icon.svelte-1thnwz {\n",
453
+ " display: flex;\n",
454
+ " position: relative;\n",
455
+ " margin-right: var(--size-2);\n",
456
+ " width: unset;\n",
457
+ " height: unset;\n",
458
+ "}\n",
459
+ "span.record-icon > span.dot.svelte-1thnwz {\n",
460
+ " width: 20px!important;\n",
461
+ " height: 20px!important;\n",
462
+ "}\n",
463
+ ".animate-spin {\n",
464
+ " animation: spin 1s linear infinite;\n",
465
+ "}\n",
466
+ "@keyframes spin {\n",
467
+ " from {\n",
468
+ " transform: rotate(0deg);\n",
469
+ " }\n",
470
+ " to {\n",
471
+ " transform: rotate(360deg);\n",
472
+ " }\n",
473
+ "}\n",
474
+ "#share-btn-container {\n",
475
+ " display: flex;\n",
476
+ " padding-left: 0.5rem !important;\n",
477
+ " padding-right: 0.5rem !important;\n",
478
+ " background-color: #000000;\n",
479
+ " justify-content: center;\n",
480
+ " align-items: center;\n",
481
+ " border-radius: 9999px !important;\n",
482
+ " max-width: 15rem;\n",
483
+ " height: 36px;\n",
484
+ "}\n",
485
+ "div#share-btn-container > div {\n",
486
+ " flex-direction: row;\n",
487
+ " background: black;\n",
488
+ " align-items: center;\n",
489
+ "}\n",
490
+ "#share-btn-container:hover {\n",
491
+ " background-color: #060606;\n",
492
+ "}\n",
493
+ "#share-btn {\n",
494
+ " all: initial;\n",
495
+ " color: #ffffff;\n",
496
+ " font-weight: 600;\n",
497
+ " cursor:pointer;\n",
498
+ " font-family: 'IBM Plex Sans', sans-serif;\n",
499
+ " margin-left: 0.5rem !important;\n",
500
+ " padding-top: 0.5rem !important;\n",
501
+ " padding-bottom: 0.5rem !important;\n",
502
+ " right:0;\n",
503
+ "}\n",
504
+ "#share-btn * {\n",
505
+ " all: unset;\n",
506
+ "}\n",
507
+ "#share-btn-container div:nth-child(-n+2){\n",
508
+ " width: auto !important;\n",
509
+ " min-height: 0px !important;\n",
510
+ "}\n",
511
+ "#share-btn-container .wrap {\n",
512
+ " display: none !important;\n",
513
+ "}\n",
514
+ "#share-btn-container.hidden {\n",
515
+ " display: none!important;\n",
516
+ "}\n",
517
+ "img[src*='#center'] {\n",
518
+ " display: block;\n",
519
+ " margin: auto;\n",
520
+ "}\n",
521
+ ".footer {\n",
522
+ " margin-bottom: 45px;\n",
523
+ " margin-top: 10px;\n",
524
+ " text-align: center;\n",
525
+ " border-bottom: 1px solid #e5e5e5;\n",
526
+ " }\n",
527
+ " .footer>p {\n",
528
+ " font-size: .8rem;\n",
529
+ " display: inline-block;\n",
530
+ " padding: 0 10px;\n",
531
+ " transform: translateY(10px);\n",
532
+ " background: white;\n",
533
+ " }\n",
534
+ " .dark .footer {\n",
535
+ " border-color: #303030;\n",
536
+ " }\n",
537
+ " .dark .footer>p {\n",
538
+ " background: #0b0f19;\n",
539
+ " }\n",
540
+ ".disclaimer {\n",
541
+ " text-align: left;\n",
542
+ "}\n",
543
+ ".disclaimer > p {\n",
544
+ " font-size: .8rem;\n",
545
+ "}\n",
546
+ "\"\"\"\n",
547
+ "\n",
548
+ "with gr.Blocks(css=css) as demo:\n",
549
+ " with gr.Column(elem_id=\"col-container\"):\n",
550
+ "\n",
551
+ " gr.HTML(\"<center>\"\n",
552
+ " \"<h1>🌊💕🎶 Bark真实拟声全新升级:Bark+Coqui</h1>\"\n",
553
+ " \"</center>\")\n",
554
+ "\n",
555
+ " gr.Markdown(\"### <center>🌟 开启声音情感真实复刻的新纪元<</center>\")\n",
556
+ "\n",
557
+ " gr.Markdown(\"### <center>更多精彩应用,尽在[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>\")\n",
558
+ "\n",
559
+ "\n",
560
+ "\n",
561
+ " with gr.Row():\n",
562
+ " with gr.Column():\n",
563
+ " prompt = gr.Textbox(\n",
564
+ " label = \"请填写您想复刻的文本内容(英文)\",\n",
565
+ " placeholder = \"Hello friend! How are you today?\",\n",
566
+ " elem_id = \"tts-prompt\"\n",
567
+ " )\n",
568
+ "\n",
569
+ " with gr.Tab(\"语音文件上传\"):\n",
570
+ "\n",
571
+ " with gr.Column():\n",
572
+ "\n",
573
+ " if file_upload_available == \"True\":\n",
574
+ " audio_in = gr.Audio(\n",
575
+ " label=\"请上传您想复刻的语音文件\",\n",
576
+ " type=\"filepath\",\n",
577
+ " source=\"upload\"\n",
578
+ " )\n",
579
+ " else:\n",
580
+ " audio_in = gr.Audio(\n",
581
+ " label=\"请上传您想复刻的语音文件\",\n",
582
+ " type=\"filepath\",\n",
583
+ " source=\"upload\"\n",
584
+ " )\n",
585
+ " clean_sample = gr.Checkbox(label=\"是否要对语音文件降噪\", value=False, visible=False)\n",
586
+ " hidden_audio_numpy = gr.Audio(type=\"numpy\", visible=False)\n",
587
+ " submit_btn = gr.Button(\"开启声音复刻之旅吧\", variant=\"primary\")\n",
588
+ "\n",
589
+ " with gr.Tab(\"麦克风上传\"):\n",
590
+ " texts_samples = gr.Textbox(label = \"Helpers\",\n",
591
+ " info = \"You can read out loud one of these sentences if you do not know what to record :)\",\n",
592
+ " value = \"\"\"\"Jazz, a quirky mix of groovy saxophones and wailing trumpets, echoes through the vibrant city streets.\"\n",
593
+ "———\n",
594
+ "\"A majestic orchestra plays enchanting melodies, filling the air with harmony.\"\n",
595
+ "———\n",
596
+ "\"The exquisite aroma of freshly baked bread wafts from a cozy bakery, enticing passersby.\"\n",
597
+ "———\n",
598
+ "\"A thunderous roar shakes the ground as a massive jet takes off into the sky, leaving trails of white behind.\"\n",
599
+ "———\n",
600
+ "\"Laughter erupts from a park where children play, their innocent voices rising like tinkling bells.\"\n",
601
+ "———\n",
602
+ "\"Waves crash on the beach, and seagulls caw as they soar overhead, a symphony of nature's sounds.\"\n",
603
+ "———\n",
604
+ "\"In the distance, a blacksmith hammers red-hot metal, the rhythmic clang punctuating the day.\"\n",
605
+ "———\n",
606
+ "\"As evening falls, a soft hush blankets the world, crickets chirping in a soothing rhythm.\"\n",
607
+ " \"\"\",\n",
608
+ " lines = 5,\n",
609
+ " visible = False\n",
610
+ " )\n",
611
+ " micro_in = gr.Audio(\n",
612
+ " label=\"请录制您的声音\",\n",
613
+ " type=\"filepath\",\n",
614
+ " source=\"microphone\",\n",
615
+ " interactive = True\n",
616
+ " )\n",
617
+ " clean_micro = gr.Checkbox(label=\"是否要对语音文件降噪\", value=False, visible=False)\n",
618
+ " micro_submit_btn = gr.Button(\"开启声音复刻之旅吧\", variant=\"primary\")\n",
619
+ "\n",
620
+ " audio_in.upload(fn=load_hidden, inputs=[audio_in], outputs=[hidden_audio_numpy], queue=False)\n",
621
+ " micro_in.stop_recording(fn=load_hidden_mic, inputs=[micro_in], outputs=[hidden_audio_numpy], queue=False)\n",
622
+ "\n",
623
+ "\n",
624
+ " with gr.Tab(\"内置语音包\"):\n",
625
+ " selected_state = gr.State()\n",
626
+ " gallery_in = gr.Gallery(\n",
627
+ " label=\"语音包预览\",\n",
628
+ " value=[(item[\"image\"], item[\"title\"]) for item in characters],\n",
629
+ " interactive = True,\n",
630
+ " allow_preview=False,\n",
631
+ " columns=3,\n",
632
+ " elem_id=\"gallery\",\n",
633
+ " show_share_button=False\n",
634
+ " )\n",
635
+ " c_submit_btn = gr.Button(\"开启声音复刻之旅吧\", variant=\"primary\")\n",
636
+ "\n",
637
+ "\n",
638
+ " with gr.Column():\n",
639
+ "\n",
640
+ " cloned_out = gr.Audio(\n",
641
+ " label=\"Text to speech output\",\n",
642
+ " visible = False\n",
643
+ " )\n",
644
+ "\n",
645
+ " video_out = gr.Video(\n",
646
+ " label = \"为您合成的专属语音\",\n",
647
+ " elem_id = \"voice-video-out\"\n",
648
+ " )\n",
649
+ "\n",
650
+ " npz_file = gr.File(\n",
651
+ " label = \".npz file\",\n",
652
+ " visible = False\n",
653
+ " )\n",
654
+ "\n",
655
+ " folder_path = gr.Textbox(visible=False)\n",
656
+ "\n",
657
+ "\n",
658
+ "\n",
659
+ " character_name = gr.Textbox(\n",
660
+ " label=\"角色名(选填)\",\n",
661
+ " placeholder=\"您可以为语音说话人起个名字\",\n",
662
+ " elem_id = \"character-name\",\n",
663
+ " visible = False\n",
664
+ " )\n",
665
+ "\n",
666
+ " voice_description = gr.Textbox(\n",
667
+ " label=\"description\",\n",
668
+ " placeholder=\"How would you describe that voice ? \",\n",
669
+ " elem_id = \"voice-description\",\n",
670
+ " visible = False\n",
671
+ " )\n",
672
+ "\n",
673
+ "\n",
674
+ " gallery_in.select(\n",
675
+ " update_selection,\n",
676
+ " outputs=[character_name, selected_state],\n",
677
+ " queue=False,\n",
678
+ " show_progress=False,\n",
679
+ " )\n",
680
+ "\n",
681
+ " audio_in.change(fn=wipe_npz_file, inputs=[folder_path], queue=False)\n",
682
+ " micro_in.clear(fn=wipe_npz_file, inputs=[folder_path], queue=False)\n",
683
+ "\n",
684
+ " gr.Examples(\n",
685
+ " examples = [\n",
686
+ " [\n",
687
+ " \"Once upon a time, in a cozy little shell, lived a friendly crab named Crabby. Crabby loved his cozy home, but he always felt like something was missing.\",\n",
688
+ " \"./examples/en_speaker_6.wav\",\n",
689
+ " False,\n",
690
+ " None\n",
691
+ " ],\n",
692
+ " [\n",
693
+ " \"It was a typical afternoon in the bustling city, the sun shining brightly through the windows of the packed courtroom. Three people sat at the bar, their faces etched with worry and anxiety. \",\n",
694
+ " \"./examples/en_speaker_9.wav\",\n",
695
+ " False,\n",
696
+ " None\n",
697
+ " ],\n",
698
+ " ],\n",
699
+ " fn = infer,\n",
700
+ " inputs = [\n",
701
+ " prompt,\n",
702
+ " audio_in,\n",
703
+ " clean_sample,\n",
704
+ " hidden_audio_numpy\n",
705
+ " ],\n",
706
+ " outputs = [\n",
707
+ " cloned_out,\n",
708
+ " video_out,\n",
709
+ " npz_file,\n",
710
+ " folder_path\n",
711
+ " ],\n",
712
+ " cache_examples = False\n",
713
+ " )\n",
714
+ "\n",
715
+ "\n",
716
+ "\n",
717
+ " submit_btn.click(\n",
718
+ " fn = infer,\n",
719
+ " inputs = [\n",
720
+ " prompt,\n",
721
+ " audio_in,\n",
722
+ " clean_sample,\n",
723
+ " hidden_audio_numpy\n",
724
+ " ],\n",
725
+ " outputs = [\n",
726
+ " cloned_out,\n",
727
+ " video_out,\n",
728
+ " npz_file,\n",
729
+ " folder_path\n",
730
+ " ]\n",
731
+ " )\n",
732
+ "\n",
733
+ " micro_submit_btn.click(\n",
734
+ " fn = infer,\n",
735
+ " inputs = [\n",
736
+ " prompt,\n",
737
+ " micro_in,\n",
738
+ " clean_micro,\n",
739
+ " hidden_audio_numpy\n",
740
+ " ],\n",
741
+ " outputs = [\n",
742
+ " cloned_out,\n",
743
+ " video_out,\n",
744
+ " npz_file,\n",
745
+ " folder_path\n",
746
+ " ]\n",
747
+ " )\n",
748
+ "\n",
749
+ " c_submit_btn.click(\n",
750
+ " fn = infer_from_c,\n",
751
+ " inputs = [\n",
752
+ " prompt,\n",
753
+ " character_name\n",
754
+ " ],\n",
755
+ " outputs = [\n",
756
+ " cloned_out,\n",
757
+ " video_out,\n",
758
+ " npz_file\n",
759
+ " ]\n",
760
+ " )\n",
761
+ "\n",
762
+ " gr.Markdown(\"### <center>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。</center>\")\n",
763
+ " gr.HTML('''\n",
764
+ " <div class=\"footer\">\n",
765
+ " <p>🌊🏞️🎶 - 江水东流急,滔滔无尽声。 明·顾璘\n",
766
+ " </p>\n",
767
+ " </div>\n",
768
+ " ''')\n",
769
+ "\n",
770
+ "\n",
771
+ "demo.queue(api_open=False, max_size=10).launch(show_error=True, share=True)"
772
+ ],
773
+ "metadata": {
774
+ "colab": {
775
+ "base_uri": "https://localhost:8080/",
776
+ "height": 683
777
+ },
778
+ "id": "_ta7cT_bwON3",
779
+ "outputId": "dd59e22d-d9c2-4add-e989-eda19158cdee"
780
+ },
781
+ "execution_count": 14,
782
+ "outputs": [
783
+ {
784
+ "output_type": "stream",
785
+ "name": "stderr",
786
+ "text": [
787
+ "/usr/local/lib/python3.10/dist-packages/TTS/api.py:77: UserWarning: `gpu` will be deprecated. Please use `tts.to(device)` instead.\n",
788
+ " warnings.warn(\"`gpu` will be deprecated. Please use `tts.to(device)` instead.\")\n"
789
+ ]
790
+ },
791
+ {
792
+ "output_type": "stream",
793
+ "name": "stdout",
794
+ "text": [
795
+ " > tts_models/multilingual/multi-dataset/bark is already downloaded.\n",
796
+ " > Using model: bark\n",
797
+ "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
798
+ "Running on public URL: https://bace76d2c60ffb519d.gradio.live\n",
799
+ "\n",
800
+ "This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
801
+ ]
802
+ },
803
+ {
804
+ "output_type": "display_data",
805
+ "data": {
806
+ "text/plain": [
807
+ "<IPython.core.display.HTML object>"
808
+ ],
809
+ "text/html": [
810
+ "<div><iframe src=\"https://bace76d2c60ffb519d.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
811
+ ]
812
+ },
813
+ "metadata": {}
814
+ },
815
+ {
816
+ "output_type": "execute_result",
817
+ "data": {
818
+ "text/plain": []
819
+ },
820
+ "metadata": {},
821
+ "execution_count": 14
822
+ }
823
+ ]
824
+ },
825
+ {
826
+ "cell_type": "code",
827
+ "source": [],
828
+ "metadata": {
829
+ "id": "2JAmWXs_xW1M"
830
+ },
831
+ "execution_count": null,
832
+ "outputs": []
833
+ }
834
+ ]
835
+ }
Bark_Voice_Cloning.ipynb ADDED
@@ -0,0 +1,380 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "machine_shape": "hm",
8
+ "gpuType": "V100",
9
+ "authorship_tag": "ABX9TyO0YWDfJb60MDuyyW+J8gZ6",
10
+ "include_colab_link": true
11
+ },
12
+ "kernelspec": {
13
+ "name": "python3",
14
+ "display_name": "Python 3"
15
+ },
16
+ "language_info": {
17
+ "name": "python"
18
+ },
19
+ "accelerator": "GPU"
20
+ },
21
+ "cells": [
22
+ {
23
+ "cell_type": "markdown",
24
+ "metadata": {
25
+ "id": "view-in-github",
26
+ "colab_type": "text"
27
+ },
28
+ "source": [
29
+ "<a href=\"https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/Bark_Voice_Cloning.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type": "code",
34
+ "execution_count": null,
35
+ "metadata": {
36
+ "colab": {
37
+ "base_uri": "https://localhost:8080/"
38
+ },
39
+ "id": "kwiJronKqYMv",
40
+ "outputId": "260e3414-1c75-4958-dfab-9e002b94a4ae"
41
+ },
42
+ "outputs": [
43
+ {
44
+ "output_type": "stream",
45
+ "name": "stdout",
46
+ "text": [
47
+ "Cloning into 'Bark-Voice-Cloning'...\n",
48
+ "remote: Enumerating objects: 544, done.\u001b[K\n",
49
+ "remote: Counting objects: 100% (182/182), done.\u001b[K\n",
50
+ "remote: Compressing objects: 100% (97/97), done.\u001b[K\n",
51
+ "remote: Total 544 (delta 108), reused 155 (delta 83), pack-reused 362\u001b[K\n",
52
+ "Receiving objects: 100% (544/544), 2.68 MiB | 30.14 MiB/s, done.\n",
53
+ "Resolving deltas: 100% (295/295), done.\n"
54
+ ]
55
+ }
56
+ ],
57
+ "source": [
58
+ "!git clone https://github.com/KevinWang676/Bark-Voice-Cloning.git"
59
+ ]
60
+ },
61
+ {
62
+ "cell_type": "code",
63
+ "source": [
64
+ "cd Bark-Voice-Cloning"
65
+ ],
66
+ "metadata": {
67
+ "colab": {
68
+ "base_uri": "https://localhost:8080/"
69
+ },
70
+ "id": "9Ul7ndP7qc0V",
71
+ "outputId": "830408bc-39f9-4e5c-8d25-d7c11f4871ee"
72
+ },
73
+ "execution_count": null,
74
+ "outputs": [
75
+ {
76
+ "output_type": "stream",
77
+ "name": "stdout",
78
+ "text": [
79
+ "/content/Bark-Voice-Cloning\n"
80
+ ]
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "cell_type": "code",
86
+ "source": [
87
+ "pip install -r requirements.txt"
88
+ ],
89
+ "metadata": {
90
+ "colab": {
91
+ "base_uri": "https://localhost:8080/"
92
+ },
93
+ "id": "BZ_MVepvqfNO",
94
+ "outputId": "c4341182-369d-4137-b7d3-c23525decaa2"
95
+ },
96
+ "execution_count": null,
97
+ "outputs": [
98
+ {
99
+ "output_type": "stream",
100
+ "name": "stdout",
101
+ "text": [
102
+ "Ignoring fairseq: markers 'platform_system == \"Windows\"' don't match your environment\n",
103
+ "Ignoring soundfile: markers 'platform_system == \"Windows\"' don't match your environment\n",
104
+ "Collecting fairseq (from -r requirements.txt (line 1))\n",
105
+ " Downloading fairseq-0.12.2.tar.gz (9.6 MB)\n",
106
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m9.6/9.6 MB\u001b[0m \u001b[31m34.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
107
+ "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
108
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
109
+ " Installing backend dependencies ... \u001b[?25l\u001b[?25hdone\n",
110
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
111
+ "Collecting audiolm-pytorch (from -r requirements.txt (line 3))\n",
112
+ " Downloading audiolm_pytorch-1.5.7-py3-none-any.whl (41 kB)\n",
113
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m42.0/42.0 kB\u001b[0m \u001b[31m4.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
114
+ "\u001b[?25hCollecting gradio (from -r requirements.txt (line 4))\n",
115
+ " Downloading gradio-3.50.0-py3-none-any.whl (20.3 MB)\n",
116
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m20.3/20.3 MB\u001b[0m \u001b[31m52.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
117
+ "\u001b[?25hCollecting funcy (from -r requirements.txt (line 5))\n",
118
+ " Downloading funcy-2.0-py2.py3-none-any.whl (30 kB)\n",
119
+ "Collecting linkify (from -r requirements.txt (line 6))\n",
120
+ " Downloading linkify-1.4.tar.gz (1.7 kB)\n",
121
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
122
+ "Collecting mutagen (from -r requirements.txt (line 7))\n",
123
+ " Downloading mutagen-1.47.0-py3-none-any.whl (194 kB)\n",
124
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.4/194.4 kB\u001b[0m \u001b[31m24.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
125
+ "\u001b[?25hCollecting pytorch_seed (from -r requirements.txt (line 8))\n",
126
+ " Downloading pytorch_seed-0.2.0-py3-none-any.whl (4.2 kB)\n",
127
+ "Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 9)) (6.0.1)\n",
128
+ "Collecting sentencepiece (from -r requirements.txt (line 10))\n",
129
+ " Downloading sentencepiece-0.1.99-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
130
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m77.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
131
+ "\u001b[?25hCollecting sox (from -r requirements.txt (line 12))\n",
132
+ " Downloading sox-1.4.1-py2.py3-none-any.whl (39 kB)\n",
133
+ "Collecting transformers (from -r requirements.txt (line 13))\n",
134
+ " Downloading transformers-4.34.1-py3-none-any.whl (7.7 MB)\n",
135
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.7/7.7 MB\u001b[0m \u001b[31m72.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
136
+ "\u001b[?25hRequirement already satisfied: cffi in /usr/local/lib/python3.10/dist-packages (from fairseq->-r requirements.txt (line 1)) (1.16.0)\n",
137
+ "Requirement already satisfied: cython in /usr/local/lib/python3.10/dist-packages (from fairseq->-r requirements.txt (line 1)) (3.0.3)\n",
138
+ "Collecting hydra-core<1.1,>=1.0.7 (from fairseq->-r requirements.txt (line 1))\n",
139
+ " Downloading hydra_core-1.0.7-py3-none-any.whl (123 kB)\n",
140
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m123.8/123.8 kB\u001b[0m \u001b[31m16.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
141
+ "\u001b[?25hCollecting omegaconf<2.1 (from fairseq->-r requirements.txt (line 1))\n",
142
+ " Downloading omegaconf-2.0.6-py3-none-any.whl (36 kB)\n",
143
+ "Requirement already satisfied: regex in /usr/local/lib/python3.10/dist-packages (from fairseq->-r requirements.txt (line 1)) (2023.6.3)\n",
144
+ "Collecting sacrebleu>=1.4.12 (from fairseq->-r requirements.txt (line 1))\n",
145
+ " Downloading sacrebleu-2.3.1-py3-none-any.whl (118 kB)\n",
146
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m118.9/118.9 kB\u001b[0m \u001b[31m16.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
147
+ "\u001b[?25hRequirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from fairseq->-r requirements.txt (line 1)) (2.0.1+cu118)\n",
148
+ "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from fairseq->-r requirements.txt (line 1)) (4.66.1)\n",
149
+ "Collecting bitarray (from fairseq->-r requirements.txt (line 1))\n",
150
+ " Downloading bitarray-2.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (286 kB)\n",
151
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m286.5/286.5 kB\u001b[0m \u001b[31m35.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
152
+ "\u001b[?25hRequirement already satisfied: torchaudio>=0.8.0 in /usr/local/lib/python3.10/dist-packages (from fairseq->-r requirements.txt (line 1)) (2.0.2+cu118)\n",
153
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from fairseq->-r requirements.txt (line 1)) (1.23.5)\n",
154
+ "Collecting accelerate (from audiolm-pytorch->-r requirements.txt (line 3))\n",
155
+ " Downloading accelerate-0.23.0-py3-none-any.whl (258 kB)\n",
156
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m258.1/258.1 kB\u001b[0m \u001b[31m31.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
157
+ "\u001b[?25hCollecting beartype>=0.16.1 (from audiolm-pytorch->-r requirements.txt (line 3))\n",
158
+ " Downloading beartype-0.16.3-py3-none-any.whl (816 kB)\n",
159
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m817.0/817.0 kB\u001b[0m \u001b[31m64.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
160
+ "\u001b[?25hCollecting einops>=0.7.0 (from audiolm-pytorch->-r requirements.txt (line 3))\n",
161
+ " Downloading einops-0.7.0-py3-none-any.whl (44 kB)\n",
162
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m44.6/44.6 kB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
163
+ "\u001b[?25hCollecting ema-pytorch>=0.2.2 (from audiolm-pytorch->-r requirements.txt (line 3))\n",
164
+ " Downloading ema_pytorch-0.2.3-py3-none-any.whl (4.4 kB)\n",
165
+ "Collecting encodec (from audiolm-pytorch->-r requirements.txt (line 3))\n",
166
+ " Downloading encodec-0.1.1.tar.gz (3.7 MB)\n",
167
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.7/3.7 MB\u001b[0m \u001b[31m115.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
168
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
169
+ "Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from audiolm-pytorch->-r requirements.txt (line 3)) (1.3.2)\n",
170
+ "Collecting lion-pytorch (from audiolm-pytorch->-r requirements.txt (line 3))\n",
171
+ " Downloading lion_pytorch-0.1.2-py3-none-any.whl (4.4 kB)\n",
172
+ "Collecting local-attention>=1.8.4 (from audiolm-pytorch->-r requirements.txt (line 3))\n",
173
+ " Downloading local_attention-1.8.6-py3-none-any.whl (8.1 kB)\n",
174
+ "Requirement already satisfied: scikit-learn in /usr/local/lib/python3.10/dist-packages (from audiolm-pytorch->-r requirements.txt (line 3)) (1.2.2)\n",
175
+ "Collecting vector-quantize-pytorch>=1.7.0 (from audiolm-pytorch->-r requirements.txt (line 3))\n",
176
+ " Downloading vector_quantize_pytorch-1.9.14-py3-none-any.whl (17 kB)\n",
177
+ "Collecting aiofiles<24.0,>=22.0 (from gradio->-r requirements.txt (line 4))\n",
178
+ " Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
179
+ "Requirement already satisfied: altair<6.0,>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (4.2.2)\n",
180
+ "Collecting fastapi (from gradio->-r requirements.txt (line 4))\n",
181
+ " Downloading fastapi-0.104.0-py3-none-any.whl (92 kB)\n",
182
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.9/92.9 kB\u001b[0m \u001b[31m14.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
183
+ "\u001b[?25hCollecting ffmpy (from gradio->-r requirements.txt (line 4))\n",
184
+ " Downloading ffmpy-0.3.1.tar.gz (5.5 kB)\n",
185
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
186
+ "Collecting gradio-client==0.6.1 (from gradio->-r requirements.txt (line 4))\n",
187
+ " Downloading gradio_client-0.6.1-py3-none-any.whl (299 kB)\n",
188
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m299.2/299.2 kB\u001b[0m \u001b[31m32.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
189
+ "\u001b[?25hCollecting httpx (from gradio->-r requirements.txt (line 4))\n",
190
+ " Downloading httpx-0.25.0-py3-none-any.whl (75 kB)\n",
191
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.7/75.7 kB\u001b[0m \u001b[31m9.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
192
+ "\u001b[?25hCollecting huggingface-hub>=0.14.0 (from gradio->-r requirements.txt (line 4))\n",
193
+ " Downloading huggingface_hub-0.18.0-py3-none-any.whl (301 kB)\n",
194
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m302.0/302.0 kB\u001b[0m \u001b[31m34.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
195
+ "\u001b[?25hRequirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (6.1.0)\n",
196
+ "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (3.1.2)\n",
197
+ "Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (2.1.3)\n",
198
+ "Requirement already satisfied: matplotlib~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (3.7.1)\n",
199
+ "Collecting orjson~=3.0 (from gradio->-r requirements.txt (line 4))\n",
200
+ " Downloading orjson-3.9.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (138 kB)\n",
201
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m138.7/138.7 kB\u001b[0m \u001b[31m18.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
202
+ "\u001b[?25hRequirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (23.2)\n",
203
+ "Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (1.5.3)\n",
204
+ "Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (9.4.0)\n",
205
+ "Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (1.10.13)\n",
206
+ "Collecting pydub (from gradio->-r requirements.txt (line 4))\n",
207
+ " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
208
+ "Collecting python-multipart (from gradio->-r requirements.txt (line 4))\n",
209
+ " Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)\n",
210
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m5.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
211
+ "\u001b[?25hRequirement already satisfied: requests~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (2.31.0)\n",
212
+ "Collecting semantic-version~=2.0 (from gradio->-r requirements.txt (line 4))\n",
213
+ " Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
214
+ "Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 4)) (4.5.0)\n",
215
+ "Collecting uvicorn>=0.14.0 (from gradio->-r requirements.txt (line 4))\n",
216
+ " Downloading uvicorn-0.23.2-py3-none-any.whl (59 kB)\n",
217
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.5/59.5 kB\u001b[0m \u001b[31m8.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
218
+ "\u001b[?25hCollecting websockets<12.0,>=10.0 (from gradio->-r requirements.txt (line 4))\n",
219
+ " Downloading websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)\n",
220
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m15.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
221
+ "\u001b[?25hRequirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==0.6.1->gradio->-r requirements.txt (line 4)) (2023.6.0)\n",
222
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 13)) (3.12.4)\n",
223
+ "Collecting tokenizers<0.15,>=0.14 (from transformers->-r requirements.txt (line 13))\n",
224
+ " Downloading tokenizers-0.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB)\n",
225
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.8/3.8 MB\u001b[0m \u001b[31m112.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
226
+ "\u001b[?25hCollecting safetensors>=0.3.1 (from transformers->-r requirements.txt (line 13))\n",
227
+ " Downloading safetensors-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
228
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m78.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
229
+ "\u001b[?25hRequirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 4)) (0.4)\n",
230
+ "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 4)) (4.19.1)\n",
231
+ "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 4)) (0.12.0)\n",
232
+ "Collecting antlr4-python3-runtime==4.8 (from hydra-core<1.1,>=1.0.7->fairseq->-r requirements.txt (line 1))\n",
233
+ " Downloading antlr4-python3-runtime-4.8.tar.gz (112 kB)\n",
234
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m112.4/112.4 kB\u001b[0m \u001b[31m13.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
235
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
236
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (1.1.1)\n",
237
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (0.12.1)\n",
238
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (4.43.1)\n",
239
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (1.4.5)\n",
240
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (3.1.1)\n",
241
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (2.8.2)\n",
242
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio->-r requirements.txt (line 4)) (2023.3.post1)\n",
243
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio->-r requirements.txt (line 4)) (3.3.0)\n",
244
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio->-r requirements.txt (line 4)) (3.4)\n",
245
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio->-r requirements.txt (line 4)) (2.0.6)\n",
246
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio->-r requirements.txt (line 4)) (2023.7.22)\n",
247
+ "Collecting portalocker (from sacrebleu>=1.4.12->fairseq->-r requirements.txt (line 1))\n",
248
+ " Downloading portalocker-2.8.2-py3-none-any.whl (17 kB)\n",
249
+ "Requirement already satisfied: tabulate>=0.8.9 in /usr/local/lib/python3.10/dist-packages (from sacrebleu>=1.4.12->fairseq->-r requirements.txt (line 1)) (0.9.0)\n",
250
+ "Collecting colorama (from sacrebleu>=1.4.12->fairseq->-r requirements.txt (line 1))\n",
251
+ " Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)\n",
252
+ "Requirement already satisfied: lxml in /usr/local/lib/python3.10/dist-packages (from sacrebleu>=1.4.12->fairseq->-r requirements.txt (line 1)) (4.9.3)\n",
253
+ "Collecting huggingface-hub>=0.14.0 (from gradio->-r requirements.txt (line 4))\n",
254
+ " Downloading huggingface_hub-0.17.3-py3-none-any.whl (295 kB)\n",
255
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m295.0/295.0 kB\u001b[0m \u001b[31m34.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
256
+ "\u001b[?25hRequirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch->fairseq->-r requirements.txt (line 1)) (1.12)\n",
257
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->fairseq->-r requirements.txt (line 1)) (3.1)\n",
258
+ "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch->fairseq->-r requirements.txt (line 1)) (2.0.0)\n",
259
+ "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch->fairseq->-r requirements.txt (line 1)) (3.27.7)\n",
260
+ "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch->fairseq->-r requirements.txt (line 1)) (17.0.2)\n",
261
+ "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn>=0.14.0->gradio->-r requirements.txt (line 4)) (8.1.7)\n",
262
+ "Collecting h11>=0.8 (from uvicorn>=0.14.0->gradio->-r requirements.txt (line 4))\n",
263
+ " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
264
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m7.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
265
+ "\u001b[?25hRequirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate->audiolm-pytorch->-r requirements.txt (line 3)) (5.9.5)\n",
266
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi->fairseq->-r requirements.txt (line 1)) (2.21)\n",
267
+ "Requirement already satisfied: anyio<4.0.0,>=3.7.1 in /usr/local/lib/python3.10/dist-packages (from fastapi->gradio->-r requirements.txt (line 4)) (3.7.1)\n",
268
+ "Collecting starlette<0.28.0,>=0.27.0 (from fastapi->gradio->-r requirements.txt (line 4))\n",
269
+ " Downloading starlette-0.27.0-py3-none-any.whl (66 kB)\n",
270
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m8.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
271
+ "\u001b[?25hCollecting typing-extensions~=4.0 (from gradio->-r requirements.txt (line 4))\n",
272
+ " Downloading typing_extensions-4.8.0-py3-none-any.whl (31 kB)\n",
273
+ "Collecting httpcore<0.19.0,>=0.18.0 (from httpx->gradio->-r requirements.txt (line 4))\n",
274
+ " Downloading httpcore-0.18.0-py3-none-any.whl (76 kB)\n",
275
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.0/76.0 kB\u001b[0m \u001b[31m10.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
276
+ "\u001b[?25hRequirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->gradio->-r requirements.txt (line 4)) (1.3.0)\n",
277
+ "Requirement already satisfied: scipy>=1.3.2 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->audiolm-pytorch->-r requirements.txt (line 3)) (1.11.3)\n",
278
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->audiolm-pytorch->-r requirements.txt (line 3)) (3.2.0)\n",
279
+ "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<4.0.0,>=3.7.1->fastapi->gradio->-r requirements.txt (line 4)) (1.1.3)\n",
280
+ "Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 4)) (23.1.0)\n",
281
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 4)) (2023.7.1)\n",
282
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 4)) (0.30.2)\n",
283
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 4)) (0.10.6)\n",
284
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio->-r requirements.txt (line 4)) (1.16.0)\n",
285
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch->fairseq->-r requirements.txt (line 1)) (1.3.0)\n",
286
+ "Building wheels for collected packages: fairseq, linkify, antlr4-python3-runtime, encodec, ffmpy\n",
287
+ " Building wheel for fairseq (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
288
+ " Created wheel for fairseq: filename=fairseq-0.12.2-cp310-cp310-linux_x86_64.whl size=11289875 sha256=26ff211e244ecb2f4b9107be0273cf5875ec295e1ecd0744463b4c497ec9c6b4\n",
289
+ " Stored in directory: /root/.cache/pip/wheels/e4/35/55/9c66f65ec7c83fd6fbc2b9502a0ac81b2448a1196159dacc32\n",
290
+ " Building wheel for linkify (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
291
+ " Created wheel for linkify: filename=linkify-1.4-py3-none-any.whl size=2303 sha256=a132c5211426d61e85042e715417026a5d819a1b6e64192270205efe5978d973\n",
292
+ " Stored in directory: /root/.cache/pip/wheels/18/31/9a/ed0c62727b209e92ddbef7adb699e0af0ef03d93ea10761efa\n",
293
+ " Building wheel for antlr4-python3-runtime (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
294
+ " Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.8-py3-none-any.whl size=141209 sha256=7247d160a8da3b2104b126c9583ffe1e76df1723ebdd8a2ef26add5bd0abec0e\n",
295
+ " Stored in directory: /root/.cache/pip/wheels/a7/20/bd/e1477d664f22d99989fd28ee1a43d6633dddb5cb9e801350d5\n",
296
+ " Building wheel for encodec (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
297
+ " Created wheel for encodec: filename=encodec-0.1.1-py3-none-any.whl size=45760 sha256=690224a97a9b4f485e33bb07e7477fab006cbdc9faaf3c700d365138266fe185\n",
298
+ " Stored in directory: /root/.cache/pip/wheels/fc/36/cb/81af8b985a5f5e0815312d5e52b41263237af07b977e6bcbf3\n",
299
+ " Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
300
+ " Created wheel for ffmpy: filename=ffmpy-0.3.1-py3-none-any.whl size=5579 sha256=7d05b605c60532859154d012724586aea5a23e6ae8adc8e3d0b928e2532fd1d9\n",
301
+ " Stored in directory: /root/.cache/pip/wheels/01/a6/d1/1c0828c304a4283b2c1639a09ad86f83d7c487ef34c6b4a1bf\n",
302
+ "Successfully built fairseq linkify antlr4-python3-runtime encodec ffmpy\n",
303
+ "Installing collected packages: sentencepiece, pydub, linkify, funcy, ffmpy, bitarray, antlr4-python3-runtime, websockets, typing-extensions, sox, semantic-version, safetensors, python-multipart, portalocker, orjson, mutagen, h11, einops, colorama, beartype, aiofiles, uvicorn, starlette, sacrebleu, omegaconf, huggingface-hub, httpcore, tokenizers, hydra-core, httpx, fastapi, transformers, gradio-client, gradio, vector-quantize-pytorch, local-attention, lion-pytorch, fairseq, encodec, ema-pytorch, accelerate, pytorch_seed, audiolm-pytorch\n",
304
+ " Attempting uninstall: typing-extensions\n",
305
+ " Found existing installation: typing_extensions 4.5.0\n",
306
+ " Uninstalling typing_extensions-4.5.0:\n",
307
+ " Successfully uninstalled typing_extensions-4.5.0\n",
308
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
309
+ "lida 0.0.10 requires kaleido, which is not installed.\n",
310
+ "tensorflow 2.13.0 requires typing-extensions<4.6.0,>=3.6.6, but you have typing-extensions 4.8.0 which is incompatible.\u001b[0m\u001b[31m\n",
311
+ "\u001b[0mSuccessfully installed accelerate-0.23.0 aiofiles-23.2.1 antlr4-python3-runtime-4.8 audiolm-pytorch-1.5.7 beartype-0.16.3 bitarray-2.8.2 colorama-0.4.6 einops-0.7.0 ema-pytorch-0.2.3 encodec-0.1.1 fairseq-0.12.2 fastapi-0.104.0 ffmpy-0.3.1 funcy-2.0 gradio-3.50.0 gradio-client-0.6.1 h11-0.14.0 httpcore-0.18.0 httpx-0.25.0 huggingface-hub-0.17.3 hydra-core-1.0.7 linkify-1.4 lion-pytorch-0.1.2 local-attention-1.8.6 mutagen-1.47.0 omegaconf-2.0.6 orjson-3.9.9 portalocker-2.8.2 pydub-0.25.1 python-multipart-0.0.6 pytorch_seed-0.2.0 sacrebleu-2.3.1 safetensors-0.4.0 semantic-version-2.10.0 sentencepiece-0.1.99 sox-1.4.1 starlette-0.27.0 tokenizers-0.14.1 transformers-4.34.1 typing-extensions-4.8.0 uvicorn-0.23.2 vector-quantize-pytorch-1.9.14 websockets-11.0.3\n"
312
+ ]
313
+ }
314
+ ]
315
+ },
316
+ {
317
+ "cell_type": "code",
318
+ "source": [
319
+ "!python app.py"
320
+ ],
321
+ "metadata": {
322
+ "id": "qhD8LMjzFJNh",
323
+ "outputId": "08b6c363-ce43-4498-d5d4-2d77b2e2c218",
324
+ "colab": {
325
+ "base_uri": "https://localhost:8080/"
326
+ }
327
+ },
328
+ "execution_count": null,
329
+ "outputs": [
330
+ {
331
+ "output_type": "stream",
332
+ "name": "stdout",
333
+ "text": [
334
+ "2023-10-19 04:02:28.903092: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n",
335
+ "2023-10-19 04:02:30 | INFO | fairseq.tasks.text_to_speech | Please install tensorboardX: pip install tensorboardX\n",
336
+ "smallmodels=False\n",
337
+ "enablemps=False\n",
338
+ "offloadcpu=False\n",
339
+ "forcecpu=False\n",
340
+ "autolaunch=False\n",
341
+ "\n",
342
+ "\n",
343
+ "Preloading Models\n",
344
+ "\n",
345
+ "Loading text model from ./models/text_2.pt to cuda\n",
346
+ "Loading coarse model from ./models/coarse_2.pt to cuda\n",
347
+ "Loading fine model from ./models/fine_2.pt to cuda\n",
348
+ "Launching Bark Voice Cloning UI Server\n",
349
+ "Running on local URL: http://127.0.0.1:7861\n",
350
+ "Running on public URL: https://c3f534bea31be88e9a.gradio.live\n",
351
+ "\n",
352
+ "This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n",
353
+ "Downloading HuBERT base model from https://dl.fbaipublicfiles.com/hubert/hubert_base_ls960.pt\n",
354
+ "Downloaded HuBERT\n",
355
+ "en_tokenizer.pth not found. Downloading HuBERT custom tokenizer\n",
356
+ "Downloaded tokenizer\n",
357
+ "Loading Hubert ./models/hubert/hubert.pt\n",
358
+ "\n",
359
+ "Generating Text (1/1) -> file (Seed 4074955748):`I love you, folks`\n",
360
+ "\n",
361
+ "Generating Text (1/1) -> file (Seed 1214280221):`I love you, folks. I am Donald Trump`\n",
362
+ "\n",
363
+ "Generating Text (1/1) -> file (Seed 2835281571):`I love you, folks. I am Donald Trump`\n",
364
+ "\n",
365
+ "Generating Text (1/1) -> file (Seed 715628997):`I love you, folks. I am Donald Trump. I am Steve Jobs`\n"
366
+ ]
367
+ }
368
+ ]
369
+ },
370
+ {
371
+ "cell_type": "code",
372
+ "source": [],
373
+ "metadata": {
374
+ "id": "KMtSvf8fq_Ww"
375
+ },
376
+ "execution_count": null,
377
+ "outputs": []
378
+ }
379
+ ]
380
+ }
Dockerfile ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM debian:stable
2
+
3
+ # Install system packages
4
+ RUN apt update && apt install -y git pip
5
+
6
+ # Create non-root user
7
+ RUN useradd -m -d /bark bark
8
+
9
+ # Run as new user
10
+ USER bark
11
+ WORKDIR /bark
12
+
13
+ # Clone git repo
14
+ RUN git clone https://github.com/C0untFloyd/bark-gui
15
+
16
+ # Switch to git directory
17
+ WORKDIR /bark/bark-gui
18
+
19
+ # Append pip bin path to PATH
20
+ ENV PATH=$PATH:/bark/.local/bin
21
+
22
+ # Install dependancies
23
+ RUN pip install .
24
+ RUN pip install -r requirements.txt
25
+
26
+ # List on all addresses, since we are in a container.
27
+ RUN sed -i "s/server_name: ''/server_name: 0.0.0.0/g" ./config.yaml
28
+
29
+ # Suggested volumes
30
+ VOLUME /bark/bark-gui/assets/prompts/custom
31
+ VOLUME /bark/bark-gui/models
32
+ VOLUME /bark/.cache/huggingface/hub
33
+
34
+ # Default port for web-ui
35
+ EXPOSE 7860/tcp
36
+
37
+ # Start script
38
+ CMD python3 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_zh.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 第二代Bark声音克隆 🐶 & 全新中文声音克隆 🎶
2
+
3
+ ## 1️⃣ 第二代Bark声音克隆
4
+
5
+ > 11/08/2023更新:将AI变声模型[KNN-VC](https://github.com/bshall/knn-vc)与最新发布的[OpenAI TTS](https://platform.openai.com/docs/guides/text-to-speech)结合,实现更加真实的AI变声,您可以[在线体验](https://huggingface.co/spaces/kevinwang676/OpenAI-TTS-Voice-Conversion)或在[Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/notebooks/OpenAI_TTS_KNN_VC.ipynb)中运行
6
+
7
+ > 11/13/2023更新:将声音转换模型[RVC](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)与最新发布的[OpenAI TTS](https://platform.openai.com/docs/guides/text-to-speech)结合,您可以使用[Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/notebooks/OpenAI_TTS_RVC.ipynb)运行,点击[这里](https://github.com/KevinWang676/Bark-Voice-Cloning/assets/126712357/e7fa4d21-d616-41b1-be34-5d420f65c943)试听效果
8
+
9
+ > 11/23/2023更新:Sambert声音克隆在线体验的bug已修复,[点击使用](https://huggingface.co/spaces/kevinwang676/Personal-TTS)
10
+
11
+ > 12/01/2023更新:ChatGLM2神里绫华模型+Bert-VITS2文本转语音,和绫华一起谈天说地吧,点击[Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/notebooks/ChatGLM2_linghua_VITS2.ipynb)运行,[在线使用](https://kevinwang676-chatglm2-bert-vits2-lh.hf.space)
12
+
13
+ > 12/03/2023更新:Sambert声音克隆本地部署教程以及[Sambert UI Colab](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/sambert-ui/Sambert_UI.ipynb)已上传,[点击查看](https://github.com/KevinWang676/Bark-Voice-Cloning/tree/main/sambert-ui)
14
+
15
+ > 01/06/2024更新:NeuCoSVC声音转换,无需训练、一键AI翻唱任意歌手的任意歌曲。点击[在线使用](https://kevinwang676-neucosvc-colab.hf.space),点击[Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/notebooks/NeuCoSVC.ipynb)
16
+
17
+ > 01/20/2024更新:GPT-SoVITS声音克隆,只需一分钟语音,“完美”复刻任何声音。点击[在线体验](https://kevinwang676-gpt-sovits-jay.hf.space),点击[Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/notebooks/GPT_SoVITS.ipynb),[视频教程](https://www.bilibili.com/video/BV1pb4y1N79s)
18
+
19
+ > 02/27/2024更新:**AI歌手全明星**在线训练+翻唱上线啦!第一个完全**免费**、**开源**的AI歌手模型社区,全网AI歌手任您选择!点击访问[**滔滔AI**](https://www.talktalkai.com/)解锁全部内容,感谢[OpenXLab](https://openxlab.org.cn/apps)的算力支持!💕
20
+
21
+ 在线快速运行:[Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/Bark_Voice_Cloning.ipynb) ⚡
22
+
23
+ HuggingFace在线程序:[Bark声音克隆](https://huggingface.co/spaces/kevinwang676/Bark-with-Voice-Cloning) 🤗
24
+
25
+ 使用指南:[B站视频](https://www.bilibili.com/video/BV16g4y1N7ZG) 📺
26
+
27
+ _注:(1) Bark声音克隆功能基于[bark-gui](https://github.com/C0untFloyd/bark-gui)项目;(2) 运行时需要使用GPU_
28
+
29
+ #### 如果您喜欢这个项目,请在Github上点赞吧! ⭐⭐⭐
30
+
31
+ ## 2️⃣ VALL-E X 全新声音克隆
32
+ > 08/26/2023更新:VALL-E X 声音克隆,支持中日英三语;只需3秒语音,即可快速复刻您喜欢的音色
33
+
34
+ [VALL-E X](https://www.microsoft.com/en-us/research/project/vall-e-x/)是由微软团队开发的支持多语种的语音合成模型,此部分基于Plachtaa的开源项目[VALL-E-X](https://github.com/Plachtaa/VALL-E-X),进行了用户界面和功能上的优化。您可以使用我们制作的[专属工具](https://kevinwang676-voicechangers.hf.space/)从B站直接提取视频中的语音,只需要填写视频的BV号和起止时间。
35
+
36
+ Colab快速启动: [Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/VALL_E_X.ipynb)
37
+
38
+ HuggingFace在线程序: [VALL-E X在线](https://huggingface.co/spaces/kevinwang676/VALLE) 🤗
39
+
40
+ ## 3️⃣ SambertHifigan中文声音克隆
41
+ > 07/19/2023更新:在执行`pip install kantts -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html`前需要先执行`pip install pysptk --no-build-isolation` (已在对应的Colab笔记本中更新)
42
+
43
+ > 08/27/2023更新:已修复SambertHifigan对应的Colab Notebook中的所有bug,[点击此处使用](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/Voice_Cloning_for_Chinese_Speech_v2.ipynb)
44
+
45
+ > 09/09/2023更新:增加SambertHifigan中文声音克隆的在线一键启动版 [Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/Sambert_Voice_Cloning_in_One_Click.ipynb),使用更加方便 🌟
46
+
47
+ > 09/12/2023更新:增加[AutoDL镜像](https://www.codewithgpu.com/i/KevinWang676/Bark-Voice-Cloning/Sambert-VC),支持在线GPU一键部署,快速开启声音克隆之旅 🍻
48
+
49
+ ### 训练5分钟,通话不限时! 🌞
50
+
51
+ 因为[Bark](https://github.com/suno-ai/bark)文本转语音的中文效果远远不如英文的效果好,所以我们采用一种新的技术路径[SambertHifigan](https://www.modelscope.cn/models/speech_tts/speech_sambert-hifigan_tts_zh-cn_multisp_pretrain_16k/summary)来实现中文的声音克隆功能。
52
+
53
+ ### 如何使用 💡 [视频教程](https://www.bilibili.com/video/BV1Ch4y1Z7K6)
54
+
55
+ ### (1) 准备并上传一段中文语音:单一说话人、长度一分钟左右的`.wav`文件。
56
+
57
+ 我们的程序能够自动将您上传的语音切片。您可以使用我们制作的[专属工具](https://kevinwang676-voicechangers.hf.space/)从B站直接提取视频中的语音,只需要填写视频的BV号和起止时间。为了达到更好的声音克隆效果,中文语音素材需要符合以下**要求**:
58
+
59
+ * 音频尽量是干净人声,不要有BGM,不要有比较大的杂音,不要有一些特殊的声效,比如回声等
60
+ * 声音的情绪尽量稳定,以说话的语料为主,不要是『嗯』『啊』『哈』之类的语气词
61
+
62
+ ### (2) 使用我们的[Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/Voice_Cloning_for_Chinese_Speech_v2.ipynb)运行程序:运行所有代码即可。
63
+
64
+ 您可以在Colab笔记本的`推理`代码模块更改中文文本,进而输出您想要的内容。运行笔记本时的**注意事项**:
65
+
66
+ * 上传音频素材后,需要将代码`split_long_audio(whisper_model, "filename.wav", "test", "dataset_raw")`中的`filename`替换成音频文件的名字
67
+ * 需要在Colab中新建三个文件夹,分别名为:`test_wavs`,`output_training_data`,`pretrain_work_dir`
68
+ * 训练完成后,在推理模块的`output = inference(input="大家好呀,欢迎使用滔滔智能的声音克隆产品!")`代码处可以自由编辑中文文本,实现中文声音克隆
69
+ * 整个过程都需要使用GPU;如果使用阿里云笔记本,则不需要在终端中执行第一步的环境设置
70
+
71
+ ### (3) 一键在HuggingFace上免费部署 🤗
72
+
73
+ * 完成训练后,在Colab或阿里云笔记本中运行`!zip -r ./model.zip ./pretrain_work_dir`打包模型文件夹,下载并解压到本地
74
+ * 点击进入[HuggingFace程序](https://huggingface.co/spaces/kevinwang676/Personal-TTS),点击右上角的三个圆点,选择`Duplicate this Space`将程序复制到自己的HuggingFace主页
75
+ * 点击进入`Files`,选择右上角`Add file`后,点击`Upload files`,将解压后的文件夹`pretrain_work_dir`从本地直接拖拽上传;需要先删除原有的`pretrain_work_dir`同名文件夹
76
+
77
+ ### 四种使用方式 😄
78
+
79
+ **推荐**🌟 阿里云笔记本在线运行:您也可以**免费**使用阿里云提供的[在线笔记本](https://modelscope.cn/models/damo/speech_personal_sambert-hifigan_nsf_tts_zh-cn_pretrain_16k/summary)进行训练,进入页面后点击右上角的`Notebook快速开发`,选择GPU环境,上传代码文件[阿里云专属笔记本(可下载)](https://github.com/KevinWang676/Bark-Voice-Cloning/blob/main/%E9%98%BF%E9%87%8C%E4%BA%91%E7%AC%94%E8%AE%B0%E6%9C%AC%E8%AE%AD%E7%BB%83.ipynb)和`.wav`文件素材后就能够以同样的方式运行啦! 🍻
80
+
81
+ Colab在线快速运行: [Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/Voice_Cloning_for_Chinese_Speech_v2.ipynb) ⚡
82
+
83
+ HuggingFace在线程序: [全新中文声音克隆](https://huggingface.co/spaces/kevinwang676/Personal-TTS) 🤗
84
+
85
+ 阿里魔搭社区在线程序:[个人声音定制](https://modelscope.cn/studios/damo/personal_tts/summary) 🎤
86
+
87
+ ### 一键运行版本:最新[Colab笔记本](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/Sambert_Voice_Cloning_in_One_Click.ipynb)(有时不稳定)及[AutoDL镜像](https://www.codewithgpu.com/i/KevinWang676/Bark-Voice-Cloning/Sambert-VC)运行(推荐)
88
+
89
+ * 最简洁的操作界面,一键上传语音素材,无需修改代码
90
+ * 点击进入[AutoDL镜像](https://www.codewithgpu.com/i/KevinWang676/Bark-Voice-Cloning/Sambert-VC),创建新实例,按照操作指南即可快速开启声音克隆之旅 🎶
91
+
92
+ **注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用,严禁商业化运作。用户上传的语音及生成的内容均与本代码仓库所有者无关。**
93
+
94
+ ![image](https://github.com/KevinWang676/Bark-Voice-Cloning/assets/126712357/7597122b-307f-41de-abdd-454dc0db5271)
95
+
96
+ [![Star History Chart](https://api.star-history.com/svg?repos=KevinWang676/Bark-Voice-Cloning&type=Date)](https://star-history.com/#KevinWang676/Bark-Voice-Cloning&Date)
SambertHifigan.ipynb ADDED
@@ -0,0 +1,680 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "gpuType": "V100",
8
+ "authorship_tag": "ABX9TyMro5JlPoA5ZsVAesl+IEoF",
9
+ "include_colab_link": true
10
+ },
11
+ "kernelspec": {
12
+ "name": "python3",
13
+ "display_name": "Python 3"
14
+ },
15
+ "language_info": {
16
+ "name": "python"
17
+ },
18
+ "accelerator": "GPU"
19
+ },
20
+ "cells": [
21
+ {
22
+ "cell_type": "markdown",
23
+ "metadata": {
24
+ "id": "view-in-github",
25
+ "colab_type": "text"
26
+ },
27
+ "source": [
28
+ "<a href=\"https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/SambertHifigan.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
29
+ ]
30
+ },
31
+ {
32
+ "cell_type": "code",
33
+ "execution_count": 2,
34
+ "metadata": {
35
+ "colab": {
36
+ "base_uri": "https://localhost:8080/"
37
+ },
38
+ "id": "eWgvkZi3p9mS",
39
+ "outputId": "87ba21df-1139-4684-8a4d-e86620159b6c"
40
+ },
41
+ "outputs": [
42
+ {
43
+ "output_type": "stream",
44
+ "name": "stdout",
45
+ "text": [
46
+ "Cloning into 'Personal-TTS-v2'...\n",
47
+ "remote: Enumerating objects: 893, done.\u001b[K\n",
48
+ "remote: Counting objects: 100% (65/65), done.\u001b[K\n",
49
+ "remote: Compressing objects: 100% (62/62), done.\u001b[K\n",
50
+ "remote: Total 893 (delta 33), reused 2 (delta 0), pack-reused 828\u001b[K\n",
51
+ "Receiving objects: 100% (893/893), 17.54 MiB | 18.38 MiB/s, done.\n",
52
+ "Resolving deltas: 100% (76/76), done.\n"
53
+ ]
54
+ }
55
+ ],
56
+ "source": [
57
+ "!git clone https://huggingface.co/spaces/kevinwang676/Personal-TTS-v2"
58
+ ]
59
+ },
60
+ {
61
+ "cell_type": "code",
62
+ "source": [
63
+ "cd Personal-TTS-v2"
64
+ ],
65
+ "metadata": {
66
+ "colab": {
67
+ "base_uri": "https://localhost:8080/"
68
+ },
69
+ "id": "6N-eisYXqCdB",
70
+ "outputId": "e992bc3c-3cfd-49f1-b942-3b37cadb8768"
71
+ },
72
+ "execution_count": 3,
73
+ "outputs": [
74
+ {
75
+ "output_type": "stream",
76
+ "name": "stdout",
77
+ "text": [
78
+ "/content/Personal-TTS-v2\n"
79
+ ]
80
+ }
81
+ ]
82
+ },
83
+ {
84
+ "cell_type": "code",
85
+ "source": [
86
+ "pip install -r requirements.txt"
87
+ ],
88
+ "metadata": {
89
+ "colab": {
90
+ "base_uri": "https://localhost:8080/",
91
+ "height": 1000
92
+ },
93
+ "id": "9IRHnwwvqFWB",
94
+ "outputId": "d683c4a0-7b28-4a82-e0be-a6b201ca3ed1"
95
+ },
96
+ "execution_count": 4,
97
+ "outputs": [
98
+ {
99
+ "output_type": "stream",
100
+ "name": "stdout",
101
+ "text": [
102
+ "Collecting openai-whisper (from -r requirements.txt (line 1))\n",
103
+ " Downloading openai-whisper-20230314.tar.gz (792 kB)\n",
104
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m792.9/792.9 kB\u001b[0m \u001b[31m8.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
105
+ "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
106
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
107
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
108
+ "Collecting modelscope (from -r requirements.txt (line 2))\n",
109
+ " Downloading modelscope-1.8.4-py3-none-any.whl (4.9 MB)\n",
110
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.9/4.9 MB\u001b[0m \u001b[31m32.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
111
+ "\u001b[?25hCollecting typeguard==2.3.1 (from -r requirements.txt (line 3))\n",
112
+ " Downloading typeguard-2.3.1-py3-none-any.whl (10 kB)\n",
113
+ "Collecting sox (from -r requirements.txt (line 4))\n",
114
+ " Downloading sox-1.4.1-py2.py3-none-any.whl (39 kB)\n",
115
+ "Collecting bitstring (from -r requirements.txt (line 5))\n",
116
+ " Downloading bitstring-4.1.1-py3-none-any.whl (56 kB)\n",
117
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.8/56.8 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
118
+ "\u001b[?25hCollecting pytorch_wavelets (from -r requirements.txt (line 6))\n",
119
+ " Downloading pytorch_wavelets-1.3.0-py3-none-any.whl (54 kB)\n",
120
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.9/54.9 kB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
121
+ "\u001b[?25hCollecting tensorboardX (from -r requirements.txt (line 7))\n",
122
+ " Downloading tensorboardX-2.6.2.2-py2.py3-none-any.whl (101 kB)\n",
123
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m101.7/101.7 kB\u001b[0m \u001b[31m12.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
124
+ "\u001b[?25hRequirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 8)) (3.7.1)\n",
125
+ "Collecting numpy==1.22.4 (from -r requirements.txt (line 9))\n",
126
+ " Downloading numpy-1.22.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)\n",
127
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m16.8/16.8 MB\u001b[0m \u001b[31m78.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
128
+ "\u001b[?25hRequirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 10)) (2.0.1+cu118)\n",
129
+ "Requirement already satisfied: torchaudio in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 11)) (2.0.2+cu118)\n",
130
+ "Requirement already satisfied: librosa in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 12)) (0.10.1)\n",
131
+ "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from openai-whisper->-r requirements.txt (line 1)) (2.0.0)\n",
132
+ "Requirement already satisfied: numba in /usr/local/lib/python3.10/dist-packages (from openai-whisper->-r requirements.txt (line 1)) (0.56.4)\n",
133
+ "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from openai-whisper->-r requirements.txt (line 1)) (4.66.1)\n",
134
+ "Requirement already satisfied: more-itertools in /usr/local/lib/python3.10/dist-packages (from openai-whisper->-r requirements.txt (line 1)) (10.1.0)\n",
135
+ "Collecting tiktoken==0.3.1 (from openai-whisper->-r requirements.txt (line 1))\n",
136
+ " Downloading tiktoken-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)\n",
137
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m55.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
138
+ "\u001b[?25hCollecting ffmpeg-python==0.2.0 (from openai-whisper->-r requirements.txt (line 1))\n",
139
+ " Downloading ffmpeg_python-0.2.0-py3-none-any.whl (25 kB)\n",
140
+ "Requirement already satisfied: future in /usr/local/lib/python3.10/dist-packages (from ffmpeg-python==0.2.0->openai-whisper->-r requirements.txt (line 1)) (0.18.3)\n",
141
+ "Requirement already satisfied: regex>=2022.1.18 in /usr/local/lib/python3.10/dist-packages (from tiktoken==0.3.1->openai-whisper->-r requirements.txt (line 1)) (2023.6.3)\n",
142
+ "Requirement already satisfied: requests>=2.26.0 in /usr/local/lib/python3.10/dist-packages (from tiktoken==0.3.1->openai-whisper->-r requirements.txt (line 1)) (2.31.0)\n",
143
+ "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->openai-whisper->-r requirements.txt (line 1)) (3.27.2)\n",
144
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->openai-whisper->-r requirements.txt (line 1)) (3.12.2)\n",
145
+ "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->openai-whisper->-r requirements.txt (line 1)) (16.0.6)\n",
146
+ "Collecting addict (from modelscope->-r requirements.txt (line 2))\n",
147
+ " Downloading addict-2.4.0-py3-none-any.whl (3.8 kB)\n",
148
+ "Requirement already satisfied: attrs in /usr/local/lib/python3.10/dist-packages (from modelscope->-r requirements.txt (line 2)) (23.1.0)\n",
149
+ "Collecting datasets<=2.13.0,>=2.8.0 (from modelscope->-r requirements.txt (line 2))\n",
150
+ " Downloading datasets-2.13.0-py3-none-any.whl (485 kB)\n",
151
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m485.6/485.6 kB\u001b[0m \u001b[31m36.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
152
+ "\u001b[?25hCollecting einops (from modelscope->-r requirements.txt (line 2))\n",
153
+ " Downloading einops-0.6.1-py3-none-any.whl (42 kB)\n",
154
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m42.2/42.2 kB\u001b[0m \u001b[31m5.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
155
+ "\u001b[?25hRequirement already satisfied: gast>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from modelscope->-r requirements.txt (line 2)) (0.4.0)\n",
156
+ "Collecting oss2 (from modelscope->-r requirements.txt (line 2))\n",
157
+ " Downloading oss2-2.18.1.tar.gz (274 kB)\n",
158
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m274.3/274.3 kB\u001b[0m \u001b[31m24.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
159
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
160
+ "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from modelscope->-r requirements.txt (line 2)) (1.5.3)\n",
161
+ "Requirement already satisfied: Pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from modelscope->-r requirements.txt (line 2)) (9.4.0)\n",
162
+ "Collecting pyarrow!=9.0.0,>=6.0.0 (from modelscope->-r requirements.txt (line 2))\n",
163
+ " Downloading pyarrow-13.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (40.0 MB)\n",
164
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m40.0/40.0 MB\u001b[0m \u001b[31m10.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
165
+ "\u001b[?25hRequirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.10/dist-packages (from modelscope->-r requirements.txt (line 2)) (2.8.2)\n",
166
+ "Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from modelscope->-r requirements.txt (line 2)) (6.0.1)\n",
167
+ "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from modelscope->-r requirements.txt (line 2)) (1.10.1)\n",
168
+ "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from modelscope->-r requirements.txt (line 2)) (67.7.2)\n",
169
+ "Collecting simplejson>=3.3.0 (from modelscope->-r requirements.txt (line 2))\n",
170
+ " Downloading simplejson-3.19.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (137 kB)\n",
171
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.9/137.9 kB\u001b[0m \u001b[31m17.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
172
+ "\u001b[?25hRequirement already satisfied: sortedcontainers>=1.5.9 in /usr/local/lib/python3.10/dist-packages (from modelscope->-r requirements.txt (line 2)) (2.4.0)\n",
173
+ "Requirement already satisfied: urllib3>=1.26 in /usr/local/lib/python3.10/dist-packages (from modelscope->-r requirements.txt (line 2)) (2.0.4)\n",
174
+ "Collecting yapf (from modelscope->-r requirements.txt (line 2))\n",
175
+ " Downloading yapf-0.40.1-py3-none-any.whl (250 kB)\n",
176
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m250.3/250.3 kB\u001b[0m \u001b[31m27.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
177
+ "\u001b[?25hCollecting bitarray<3.0.0,>=2.8.0 (from bitstring->-r requirements.txt (line 5))\n",
178
+ " Downloading bitarray-2.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (286 kB)\n",
179
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m286.2/286.2 kB\u001b[0m \u001b[31m29.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
180
+ "\u001b[?25hRequirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from pytorch_wavelets->-r requirements.txt (line 6)) (1.16.0)\n",
181
+ "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from tensorboardX->-r requirements.txt (line 7)) (23.1)\n",
182
+ "Requirement already satisfied: protobuf>=3.20 in /usr/local/lib/python3.10/dist-packages (from tensorboardX->-r requirements.txt (line 7)) (3.20.3)\n",
183
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 8)) (1.1.0)\n",
184
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 8)) (0.11.0)\n",
185
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 8)) (4.42.1)\n",
186
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 8)) (1.4.4)\n",
187
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 8)) (3.1.1)\n",
188
+ "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch->-r requirements.txt (line 10)) (4.7.1)\n",
189
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch->-r requirements.txt (line 10)) (1.12)\n",
190
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->-r requirements.txt (line 10)) (3.1)\n",
191
+ "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch->-r requirements.txt (line 10)) (3.1.2)\n",
192
+ "Requirement already satisfied: audioread>=2.1.9 in /usr/local/lib/python3.10/dist-packages (from librosa->-r requirements.txt (line 12)) (3.0.0)\n",
193
+ "Requirement already satisfied: scikit-learn>=0.20.0 in /usr/local/lib/python3.10/dist-packages (from librosa->-r requirements.txt (line 12)) (1.2.2)\n",
194
+ "Requirement already satisfied: joblib>=0.14 in /usr/local/lib/python3.10/dist-packages (from librosa->-r requirements.txt (line 12)) (1.3.2)\n",
195
+ "Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.10/dist-packages (from librosa->-r requirements.txt (line 12)) (4.4.2)\n",
196
+ "Requirement already satisfied: soundfile>=0.12.1 in /usr/local/lib/python3.10/dist-packages (from librosa->-r requirements.txt (line 12)) (0.12.1)\n",
197
+ "Requirement already satisfied: pooch>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa->-r requirements.txt (line 12)) (1.7.0)\n",
198
+ "Requirement already satisfied: soxr>=0.3.2 in /usr/local/lib/python3.10/dist-packages (from librosa->-r requirements.txt (line 12)) (0.3.6)\n",
199
+ "Requirement already satisfied: lazy-loader>=0.1 in /usr/local/lib/python3.10/dist-packages (from librosa->-r requirements.txt (line 12)) (0.3)\n",
200
+ "Requirement already satisfied: msgpack>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa->-r requirements.txt (line 12)) (1.0.5)\n",
201
+ "Collecting dill<0.3.7,>=0.3.0 (from datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2))\n",
202
+ " Downloading dill-0.3.6-py3-none-any.whl (110 kB)\n",
203
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m110.5/110.5 kB\u001b[0m \u001b[31m14.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
204
+ "\u001b[?25hCollecting xxhash (from datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2))\n",
205
+ " Downloading xxhash-3.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194 kB)\n",
206
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m23.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
207
+ "\u001b[?25hCollecting multiprocess (from datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2))\n",
208
+ " Downloading multiprocess-0.70.15-py310-none-any.whl (134 kB)\n",
209
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m16.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
210
+ "\u001b[?25hRequirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.10/dist-packages (from datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2)) (2023.6.0)\n",
211
+ "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2)) (3.8.5)\n",
212
+ "Collecting huggingface-hub<1.0.0,>=0.11.0 (from datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2))\n",
213
+ " Downloading huggingface_hub-0.16.4-py3-none-any.whl (268 kB)\n",
214
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m268.8/268.8 kB\u001b[0m \u001b[31m31.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
215
+ "\u001b[?25hRequirement already satisfied: llvmlite<0.40,>=0.39.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba->openai-whisper->-r requirements.txt (line 1)) (0.39.1)\n",
216
+ "Requirement already satisfied: platformdirs>=2.5.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.0->librosa->-r requirements.txt (line 12)) (3.10.0)\n",
217
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken==0.3.1->openai-whisper->-r requirements.txt (line 1)) (3.2.0)\n",
218
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken==0.3.1->openai-whisper->-r requirements.txt (line 1)) (3.4)\n",
219
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken==0.3.1->openai-whisper->-r requirements.txt (line 1)) (2023.7.22)\n",
220
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.20.0->librosa->-r requirements.txt (line 12)) (3.2.0)\n",
221
+ "Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile>=0.12.1->librosa->-r requirements.txt (line 12)) (1.15.1)\n",
222
+ "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch->-r requirements.txt (line 10)) (2.1.3)\n",
223
+ "Collecting crcmod>=1.7 (from oss2->modelscope->-r requirements.txt (line 2))\n",
224
+ " Downloading crcmod-1.7.tar.gz (89 kB)\n",
225
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m89.7/89.7 kB\u001b[0m \u001b[31m13.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
226
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
227
+ "Collecting pycryptodome>=3.4.7 (from oss2->modelscope->-r requirements.txt (line 2))\n",
228
+ " Downloading pycryptodome-3.18.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)\n",
229
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m89.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
230
+ "\u001b[?25hCollecting aliyun-python-sdk-kms>=2.4.1 (from oss2->modelscope->-r requirements.txt (line 2))\n",
231
+ " Downloading aliyun_python_sdk_kms-2.16.1-py2.py3-none-any.whl (70 kB)\n",
232
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m70.8/70.8 kB\u001b[0m \u001b[31m9.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
233
+ "\u001b[?25hCollecting aliyun-python-sdk-core>=2.13.12 (from oss2->modelscope->-r requirements.txt (line 2))\n",
234
+ " Downloading aliyun-python-sdk-core-2.13.36.tar.gz (440 kB)\n",
235
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m440.5/440.5 kB\u001b[0m \u001b[31m48.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
236
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
237
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->modelscope->-r requirements.txt (line 2)) (2023.3)\n",
238
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch->-r requirements.txt (line 10)) (1.3.0)\n",
239
+ "Requirement already satisfied: importlib-metadata>=6.6.0 in /usr/local/lib/python3.10/dist-packages (from yapf->modelscope->-r requirements.txt (line 2)) (6.8.0)\n",
240
+ "Requirement already satisfied: tomli>=2.0.1 in /usr/local/lib/python3.10/dist-packages (from yapf->modelscope->-r requirements.txt (line 2)) (2.0.1)\n",
241
+ "Collecting jmespath<1.0.0,>=0.9.3 (from aliyun-python-sdk-core>=2.13.12->oss2->modelscope->-r requirements.txt (line 2))\n",
242
+ " Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)\n",
243
+ "Requirement already satisfied: cryptography>=2.6.0 in /usr/local/lib/python3.10/dist-packages (from aliyun-python-sdk-core>=2.13.12->oss2->modelscope->-r requirements.txt (line 2)) (41.0.3)\n",
244
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile>=0.12.1->librosa->-r requirements.txt (line 12)) (2.21)\n",
245
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2)) (6.0.4)\n",
246
+ "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2)) (4.0.3)\n",
247
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2)) (1.9.2)\n",
248
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2)) (1.4.0)\n",
249
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2)) (1.3.1)\n",
250
+ "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata>=6.6.0->yapf->modelscope->-r requirements.txt (line 2)) (3.16.2)\n",
251
+ "INFO: pip is looking at multiple versions of multiprocess to determine which version is compatible with other requirements. This could take a while.\n",
252
+ "Collecting multiprocess (from datasets<=2.13.0,>=2.8.0->modelscope->-r requirements.txt (line 2))\n",
253
+ " Downloading multiprocess-0.70.14-py310-none-any.whl (134 kB)\n",
254
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.3/134.3 kB\u001b[0m \u001b[31m6.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
255
+ "\u001b[?25hBuilding wheels for collected packages: openai-whisper, oss2, aliyun-python-sdk-core, crcmod\n",
256
+ " Building wheel for openai-whisper (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
257
+ " Created wheel for openai-whisper: filename=openai_whisper-20230314-py3-none-any.whl size=796907 sha256=fd55dee3233c129a4681c5b820b257cab5fedf741f3adf50a3f3c09f0ddad5f9\n",
258
+ " Stored in directory: /root/.cache/pip/wheels/b2/13/5f/fe8245f6dc59df505879da4b2129932e342f02a80e6b87f27d\n",
259
+ " Building wheel for oss2 (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
260
+ " Created wheel for oss2: filename=oss2-2.18.1-py3-none-any.whl size=115175 sha256=8b7b334b55645f00b7499778614d5c24fb488f44ddadc2b283091bcb6df6cbed\n",
261
+ " Stored in directory: /root/.cache/pip/wheels/54/b1/27/f9d5791a1f01ee0ad99c934aa0e1df3eaae375b5d5aa3da184\n",
262
+ " Building wheel for aliyun-python-sdk-core (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
263
+ " Created wheel for aliyun-python-sdk-core: filename=aliyun_python_sdk_core-2.13.36-py3-none-any.whl size=533190 sha256=00b5d8a20c3f6abb7b8f30ddff77404cc6a20574874e93c355b9c9095b8540d8\n",
264
+ " Stored in directory: /root/.cache/pip/wheels/c0/f4/0e/87c534857132bd3bd2c4465c0b15b4db650cf6c15a876bda34\n",
265
+ " Building wheel for crcmod (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
266
+ " Created wheel for crcmod: filename=crcmod-1.7-cp310-cp310-linux_x86_64.whl size=31407 sha256=4324dc55d48a2343decd3ddb25e6c75786aaf5561dfd18c39e503b50cf0237ce\n",
267
+ " Stored in directory: /root/.cache/pip/wheels/85/4c/07/72215c529bd59d67e3dac29711d7aba1b692f543c808ba9e86\n",
268
+ "Successfully built openai-whisper oss2 aliyun-python-sdk-core crcmod\n",
269
+ "Installing collected packages: crcmod, bitarray, addict, xxhash, typeguard, simplejson, pycryptodome, numpy, jmespath, ffmpeg-python, einops, dill, bitstring, yapf, tiktoken, tensorboardX, sox, pyarrow, multiprocess, huggingface-hub, aliyun-python-sdk-core, datasets, aliyun-python-sdk-kms, oss2, modelscope, pytorch_wavelets, openai-whisper\n",
270
+ " Attempting uninstall: numpy\n",
271
+ " Found existing installation: numpy 1.23.5\n",
272
+ " Uninstalling numpy-1.23.5:\n",
273
+ " Successfully uninstalled numpy-1.23.5\n",
274
+ " Attempting uninstall: pyarrow\n",
275
+ " Found existing installation: pyarrow 9.0.0\n",
276
+ " Uninstalling pyarrow-9.0.0:\n",
277
+ " Successfully uninstalled pyarrow-9.0.0\n",
278
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
279
+ "pandas-gbq 0.17.9 requires pyarrow<10.0dev,>=3.0.0, but you have pyarrow 13.0.0 which is incompatible.\n",
280
+ "plotnine 0.12.2 requires numpy>=1.23.0, but you have numpy 1.22.4 which is incompatible.\u001b[0m\u001b[31m\n",
281
+ "\u001b[0mSuccessfully installed addict-2.4.0 aliyun-python-sdk-core-2.13.36 aliyun-python-sdk-kms-2.16.1 bitarray-2.8.1 bitstring-4.1.1 crcmod-1.7 datasets-2.13.0 dill-0.3.6 einops-0.6.1 ffmpeg-python-0.2.0 huggingface-hub-0.16.4 jmespath-0.10.0 modelscope-1.8.4 multiprocess-0.70.14 numpy-1.22.4 openai-whisper-20230314 oss2-2.18.1 pyarrow-13.0.0 pycryptodome-3.18.0 pytorch_wavelets-1.3.0 simplejson-3.19.1 sox-1.4.1 tensorboardX-2.6.2.2 tiktoken-0.3.1 typeguard-2.3.1 xxhash-3.3.0 yapf-0.40.1\n"
282
+ ]
283
+ },
284
+ {
285
+ "output_type": "display_data",
286
+ "data": {
287
+ "application/vnd.colab-display-data+json": {
288
+ "pip_warning": {
289
+ "packages": [
290
+ "numpy"
291
+ ]
292
+ }
293
+ }
294
+ },
295
+ "metadata": {}
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ "cell_type": "code",
301
+ "source": [
302
+ "pip install gradio"
303
+ ],
304
+ "metadata": {
305
+ "colab": {
306
+ "base_uri": "https://localhost:8080/"
307
+ },
308
+ "id": "VXXjEHxbqj4z",
309
+ "outputId": "2219e53a-15ab-4760-e636-a6a24afd959e"
310
+ },
311
+ "execution_count": 8,
312
+ "outputs": [
313
+ {
314
+ "output_type": "stream",
315
+ "name": "stdout",
316
+ "text": [
317
+ "Collecting gradio\n",
318
+ " Downloading gradio-3.41.2-py3-none-any.whl (20.1 MB)\n",
319
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m20.1/20.1 MB\u001b[0m \u001b[31m36.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
320
+ "\u001b[?25hCollecting aiofiles<24.0,>=22.0 (from gradio)\n",
321
+ " Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
322
+ "Requirement already satisfied: altair<6.0,>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.2.2)\n",
323
+ "Collecting fastapi (from gradio)\n",
324
+ " Downloading fastapi-0.103.0-py3-none-any.whl (66 kB)\n",
325
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m66.2/66.2 kB\u001b[0m \u001b[31m8.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
326
+ "\u001b[?25hCollecting ffmpy (from gradio)\n",
327
+ " Downloading ffmpy-0.3.1.tar.gz (5.5 kB)\n",
328
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
329
+ "Collecting gradio-client==0.5.0 (from gradio)\n",
330
+ " Downloading gradio_client-0.5.0-py3-none-any.whl (298 kB)\n",
331
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m298.2/298.2 kB\u001b[0m \u001b[31m28.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
332
+ "\u001b[?25hCollecting httpx (from gradio)\n",
333
+ " Downloading httpx-0.24.1-py3-none-any.whl (75 kB)\n",
334
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.4/75.4 kB\u001b[0m \u001b[31m9.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
335
+ "\u001b[?25hRequirement already satisfied: huggingface-hub>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.16.4)\n",
336
+ "Requirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.1)\n",
337
+ "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.1.2)\n",
338
+ "Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.1.3)\n",
339
+ "Requirement already satisfied: matplotlib~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.7.1)\n",
340
+ "Requirement already satisfied: numpy~=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.22.4)\n",
341
+ "Collecting orjson~=3.0 (from gradio)\n",
342
+ " Downloading orjson-3.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (139 kB)\n",
343
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m139.9/139.9 kB\u001b[0m \u001b[31m15.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
344
+ "\u001b[?25hRequirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio) (23.1)\n",
345
+ "Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.5.3)\n",
346
+ "Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (9.4.0)\n",
347
+ "Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.2.1)\n",
348
+ "Collecting pydub (from gradio)\n",
349
+ " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
350
+ "Collecting python-multipart (from gradio)\n",
351
+ " Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)\n",
352
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
353
+ "\u001b[?25hRequirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.1)\n",
354
+ "Requirement already satisfied: requests~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.31.0)\n",
355
+ "Collecting semantic-version~=2.0 (from gradio)\n",
356
+ " Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
357
+ "Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.7.1)\n",
358
+ "Collecting uvicorn>=0.14.0 (from gradio)\n",
359
+ " Downloading uvicorn-0.23.2-py3-none-any.whl (59 kB)\n",
360
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.5/59.5 kB\u001b[0m \u001b[31m7.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
361
+ "\u001b[?25hCollecting websockets<12.0,>=10.0 (from gradio)\n",
362
+ " Downloading websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)\n",
363
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m15.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
364
+ "\u001b[?25hRequirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==0.5.0->gradio) (2023.6.0)\n",
365
+ "Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio) (0.4)\n",
366
+ "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio) (4.19.0)\n",
367
+ "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio) (0.12.0)\n",
368
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.14.0->gradio) (3.12.2)\n",
369
+ "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.14.0->gradio) (4.66.1)\n",
370
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (1.1.0)\n",
371
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (0.11.0)\n",
372
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (4.42.1)\n",
373
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (1.4.4)\n",
374
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (3.1.1)\n",
375
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (2.8.2)\n",
376
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2023.3)\n",
377
+ "Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio) (0.5.0)\n",
378
+ "Requirement already satisfied: pydantic-core==2.6.1 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio) (2.6.1)\n",
379
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (3.2.0)\n",
380
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (3.4)\n",
381
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (2.0.4)\n",
382
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (2023.7.22)\n",
383
+ "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn>=0.14.0->gradio) (8.1.7)\n",
384
+ "Collecting h11>=0.8 (from uvicorn>=0.14.0->gradio)\n",
385
+ " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
386
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
387
+ "\u001b[?25hCollecting starlette<0.28.0,>=0.27.0 (from fastapi->gradio)\n",
388
+ " Downloading starlette-0.27.0-py3-none-any.whl (66 kB)\n",
389
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m9.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
390
+ "\u001b[?25hCollecting httpcore<0.18.0,>=0.15.0 (from httpx->gradio)\n",
391
+ " Downloading httpcore-0.17.3-py3-none-any.whl (74 kB)\n",
392
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m74.5/74.5 kB\u001b[0m \u001b[31m9.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
393
+ "\u001b[?25hRequirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->gradio) (1.3.0)\n",
394
+ "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from httpcore<0.18.0,>=0.15.0->httpx->gradio) (3.7.1)\n",
395
+ "Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (23.1.0)\n",
396
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (2023.7.1)\n",
397
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.30.2)\n",
398
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.9.2)\n",
399
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)\n",
400
+ "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->httpcore<0.18.0,>=0.15.0->httpx->gradio) (1.1.3)\n",
401
+ "Building wheels for collected packages: ffmpy\n",
402
+ " Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
403
+ " Created wheel for ffmpy: filename=ffmpy-0.3.1-py3-none-any.whl size=5579 sha256=3ddfe44918d2a64dab484200c6108a113e0e89a47693d3e8d6d3fdb66a35ae22\n",
404
+ " Stored in directory: /root/.cache/pip/wheels/01/a6/d1/1c0828c304a4283b2c1639a09ad86f83d7c487ef34c6b4a1bf\n",
405
+ "Successfully built ffmpy\n",
406
+ "Installing collected packages: pydub, ffmpy, websockets, semantic-version, python-multipart, orjson, h11, aiofiles, uvicorn, starlette, httpcore, httpx, fastapi, gradio-client, gradio\n",
407
+ "Successfully installed aiofiles-23.2.1 fastapi-0.103.0 ffmpy-0.3.1 gradio-3.41.2 gradio-client-0.5.0 h11-0.14.0 httpcore-0.17.3 httpx-0.24.1 orjson-3.9.5 pydub-0.25.1 python-multipart-0.0.6 semantic-version-2.10.0 starlette-0.27.0 uvicorn-0.23.2 websockets-11.0.3\n"
408
+ ]
409
+ }
410
+ ]
411
+ },
412
+ {
413
+ "cell_type": "code",
414
+ "source": [
415
+ "import subprocess\n",
416
+ "import random\n",
417
+ "import os\n",
418
+ "from pathlib import Path\n",
419
+ "import librosa\n",
420
+ "from scipy.io import wavfile\n",
421
+ "import numpy as np\n",
422
+ "import torch\n",
423
+ "import csv\n",
424
+ "import whisper\n",
425
+ "import gradio as gr\n",
426
+ "\n",
427
+ "os.system(\"pip install --upgrade Cython==0.29.35\")\n",
428
+ "os.system(\"pip install pysptk --no-build-isolation\")\n",
429
+ "os.system(\"pip install kantts -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html\")\n",
430
+ "os.system(\"pip install tts-autolabel -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html\")\n",
431
+ "os.system(\"apt-get install sox\")\n",
432
+ "\n",
433
+ "os.system(\"git clone https://github.com/fbcotter/pytorch_wavelets\")\n",
434
+ "os.system(\"cd pytorch_wavelets\")\n",
435
+ "os.system(\"pip install .\")\n",
436
+ "\n",
437
+ "os.system(\"pip install modelscope==1.8.4\")\n",
438
+ "\n",
439
+ "import sox\n",
440
+ "\n",
441
+ "def split_long_audio(model, filepaths, save_dir=\"data_dir\", out_sr=44100):\n",
442
+ " if isinstance(filepaths, str):\n",
443
+ " filepaths = [filepaths]\n",
444
+ "\n",
445
+ " for file_idx, filepath in enumerate(filepaths):\n",
446
+ "\n",
447
+ " save_path = Path(save_dir)\n",
448
+ " save_path.mkdir(exist_ok=True, parents=True)\n",
449
+ "\n",
450
+ " print(f\"Transcribing file {file_idx}: '{filepath}' to segments...\")\n",
451
+ " result = model.transcribe(filepath, word_timestamps=True, task=\"transcribe\", beam_size=5, best_of=5)\n",
452
+ " segments = result['segments']\n",
453
+ "\n",
454
+ " wav, sr = librosa.load(filepath, sr=None, offset=0, duration=None, mono=True)\n",
455
+ " wav, _ = librosa.effects.trim(wav, top_db=20)\n",
456
+ " peak = np.abs(wav).max()\n",
457
+ " if peak > 1.0:\n",
458
+ " wav = 0.98 * wav / peak\n",
459
+ " wav2 = librosa.resample(wav, orig_sr=sr, target_sr=out_sr)\n",
460
+ " wav2 /= max(wav2.max(), -wav2.min())\n",
461
+ "\n",
462
+ " for i, seg in enumerate(segments):\n",
463
+ " start_time = seg['start']\n",
464
+ " end_time = seg['end']\n",
465
+ " wav_seg = wav2[int(start_time * out_sr):int(end_time * out_sr)]\n",
466
+ " wav_seg_name = f\"{file_idx}_{i}.wav\"\n",
467
+ " out_fpath = save_path / wav_seg_name\n",
468
+ " wavfile.write(out_fpath, rate=out_sr, data=(wav_seg * np.iinfo(np.int16).max).astype(np.int16))\n",
469
+ "\n",
470
+ "whisper_size = \"medium\"\n",
471
+ "whisper_model = whisper.load_model(whisper_size)\n",
472
+ "\n",
473
+ "from modelscope.tools import run_auto_label\n",
474
+ "\n",
475
+ "from modelscope.models.audio.tts import SambertHifigan\n",
476
+ "from modelscope.pipelines import pipeline\n",
477
+ "from modelscope.utils.constant import Tasks\n",
478
+ "\n",
479
+ "from modelscope.metainfo import Trainers\n",
480
+ "from modelscope.trainers import build_trainer\n",
481
+ "from modelscope.utils.audio.audio_utils import TtsTrainType\n",
482
+ "\n",
483
+ "pretrained_model_id = 'damo/speech_personal_sambert-hifigan_nsf_tts_zh-cn_pretrain_16k'\n",
484
+ "\n",
485
+ "dataset_id = \"./output_training_data/\"\n",
486
+ "pretrain_work_dir = \"./pretrain_work_dir/\"\n",
487
+ "\n",
488
+ "\n",
489
+ "def auto_label(audio):\n",
490
+ " try:\n",
491
+ " split_long_audio(whisper_model, audio, \"test_wavs\")\n",
492
+ " os.makedirs(\"output_training_data\", exist_ok=True)\n",
493
+ " input_wav = \"./test_wavs/\"\n",
494
+ " output_data = \"./output_training_data/\"\n",
495
+ " ret, report = run_auto_label(input_wav=input_wav, work_dir=output_data, resource_revision=\"v1.0.7\")\n",
496
+ "\n",
497
+ " except Exception:\n",
498
+ " pass\n",
499
+ " return \"标注成功\"\n",
500
+ "\n",
501
+ "\n",
502
+ "def train(a):\n",
503
+ " try:\n",
504
+ " os.makedirs(\"pretrain_work_dir\", exist_ok=True)\n",
505
+ "\n",
506
+ " train_info = {\n",
507
+ " TtsTrainType.TRAIN_TYPE_SAMBERT: { # 配置训练AM(sambert)模型\n",
508
+ " 'train_steps': 52, # 训练多少个step\n",
509
+ " 'save_interval_steps': 50, # 每训练多少个step保存一次checkpoint\n",
510
+ " 'log_interval': 10 # 每训练多少个step打印一次训练日志\n",
511
+ " }\n",
512
+ " }\n",
513
+ "\n",
514
+ " # 配置训练参数,指定数据集,临时工作目录和train_info\n",
515
+ " kwargs = dict(\n",
516
+ " model=pretrained_model_id, # 指定要finetune的模型\n",
517
+ " model_revision = \"v1.0.6\",\n",
518
+ " work_dir=pretrain_work_dir, # 指定临时工作目录\n",
519
+ " train_dataset=dataset_id, # 指定数据集id\n",
520
+ " train_type=train_info # 指定要训练类型及参数\n",
521
+ " )\n",
522
+ "\n",
523
+ " trainer = build_trainer(Trainers.speech_kantts_trainer,\n",
524
+ " default_args=kwargs)\n",
525
+ "\n",
526
+ " trainer.train()\n",
527
+ "\n",
528
+ " except Exception:\n",
529
+ " pass\n",
530
+ "\n",
531
+ " return \"训练完成\"\n",
532
+ "\n",
533
+ "\n",
534
+ "import random\n",
535
+ "\n",
536
+ "def infer(text):\n",
537
+ "\n",
538
+ " model_dir = os.path.abspath(\"./pretrain_work_dir\")\n",
539
+ "\n",
540
+ " custom_infer_abs = {\n",
541
+ " 'voice_name':\n",
542
+ " 'F7',\n",
543
+ " 'am_ckpt':\n",
544
+ " os.path.join(model_dir, 'tmp_am', 'ckpt'),\n",
545
+ " 'am_config':\n",
546
+ " os.path.join(model_dir, 'tmp_am', 'config.yaml'),\n",
547
+ " 'voc_ckpt':\n",
548
+ " os.path.join(model_dir, 'orig_model', 'basemodel_16k', 'hifigan', 'ckpt'),\n",
549
+ " 'voc_config':\n",
550
+ " os.path.join(model_dir, 'orig_model', 'basemodel_16k', 'hifigan',\n",
551
+ " 'config.yaml'),\n",
552
+ " 'audio_config':\n",
553
+ " os.path.join(model_dir, 'data', 'audio_config.yaml'),\n",
554
+ " 'se_file':\n",
555
+ " os.path.join(model_dir, 'data', 'se', 'se.npy')\n",
556
+ " }\n",
557
+ " kwargs = {'custom_ckpt': custom_infer_abs}\n",
558
+ "\n",
559
+ " model_id = SambertHifigan(os.path.join(model_dir, \"orig_model\"), **kwargs)\n",
560
+ "\n",
561
+ " inference = pipeline(task=Tasks.text_to_speech, model=model_id)\n",
562
+ " output = inference(input=text)\n",
563
+ "\n",
564
+ " filename = str(random.randint(1, 1000000000000))\n",
565
+ "\n",
566
+ " with open(filename + \"myfile.wav\", mode='bx') as f:\n",
567
+ " f.write(output[\"output_wav\"])\n",
568
+ " return filename + \"myfile.wav\"\n",
569
+ "\n",
570
+ "\n",
571
+ "\n",
572
+ "\n",
573
+ "app = gr.Blocks()\n",
574
+ "\n",
575
+ "with app:\n",
576
+ " gr.Markdown(\"# <center>🥳🎶🎡 - Sambert中文声音克隆</center>\")\n",
577
+ " gr.Markdown(\"## <center>🌟 - 训练3分钟,推理5秒钟,中英自然发音 </center>\")\n",
578
+ " gr.Markdown(\"### <center>🌊 - 更多精彩应用,敬请关注[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔��!💕</center>\")\n",
579
+ "\n",
580
+ " with gr.Row():\n",
581
+ " inp1 = gr.Audio(type=\"filepath\", label=\"请上传一段音频\")\n",
582
+ " out1 = gr.Textbox(label=\"标注情况\", lines=1, interactive=False)\n",
583
+ "\n",
584
+ " out2 = gr.Textbox(label=\"训练情况\", lines=1, interactive=False)\n",
585
+ " inp2 = gr.Textbox(label=\"文本\", lines=3)\n",
586
+ " out3 = gr.Audio(type=\"filepath\", label=\"合成的音频\")\n",
587
+ " btn1 = gr.Button(\"1.标注数据\")\n",
588
+ " btn2 = gr.Button(\"2.开始训练\")\n",
589
+ " btn3 = gr.Button(\"3.一键推理\", variant=\"primary\")\n",
590
+ "\n",
591
+ " btn1.click(auto_label, inp1, out1)\n",
592
+ " btn2.click(train, out1, out2)\n",
593
+ " btn3.click(infer, inp2, out3)\n",
594
+ "\n",
595
+ " gr.Markdown(\"### <center>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。</center>\")\n",
596
+ " gr.HTML('''\n",
597
+ " <div class=\"footer\">\n",
598
+ " <p>🌊🏞️🎶 - 江水东流急,滔滔无尽声。 明·顾璘\n",
599
+ " </p>\n",
600
+ " </div>\n",
601
+ " ''')\n",
602
+ "app.launch(show_error=True)\n"
603
+ ],
604
+ "metadata": {
605
+ "colab": {
606
+ "base_uri": "https://localhost:8080/",
607
+ "height": 617
608
+ },
609
+ "id": "a7yFvYXXqIVB",
610
+ "outputId": "c6bfa068-61c4-4345-9a16-18473e3ae697"
611
+ },
612
+ "execution_count": 11,
613
+ "outputs": [
614
+ {
615
+ "output_type": "stream",
616
+ "name": "stdout",
617
+ "text": [
618
+ "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
619
+ "Note: opening Chrome Inspector may crash demo inside Colab notebooks.\n",
620
+ "\n",
621
+ "To create a public link, set `share=True` in `launch()`.\n"
622
+ ]
623
+ },
624
+ {
625
+ "output_type": "display_data",
626
+ "data": {
627
+ "text/plain": [
628
+ "<IPython.core.display.Javascript object>"
629
+ ],
630
+ "application/javascript": [
631
+ "(async (port, path, width, height, cache, element) => {\n",
632
+ " if (!google.colab.kernel.accessAllowed && !cache) {\n",
633
+ " return;\n",
634
+ " }\n",
635
+ " element.appendChild(document.createTextNode(''));\n",
636
+ " const url = await google.colab.kernel.proxyPort(port, {cache});\n",
637
+ "\n",
638
+ " const external_link = document.createElement('div');\n",
639
+ " external_link.innerHTML = `\n",
640
+ " <div style=\"font-family: monospace; margin-bottom: 0.5rem\">\n",
641
+ " Running on <a href=${new URL(path, url).toString()} target=\"_blank\">\n",
642
+ " https://localhost:${port}${path}\n",
643
+ " </a>\n",
644
+ " </div>\n",
645
+ " `;\n",
646
+ " element.appendChild(external_link);\n",
647
+ "\n",
648
+ " const iframe = document.createElement('iframe');\n",
649
+ " iframe.src = new URL(path, url).toString();\n",
650
+ " iframe.height = height;\n",
651
+ " iframe.allow = \"autoplay; camera; microphone; clipboard-read; clipboard-write;\"\n",
652
+ " iframe.width = width;\n",
653
+ " iframe.style.border = 0;\n",
654
+ " element.appendChild(iframe);\n",
655
+ " })(7861, \"/\", \"100%\", 500, false, window.element)"
656
+ ]
657
+ },
658
+ "metadata": {}
659
+ },
660
+ {
661
+ "output_type": "execute_result",
662
+ "data": {
663
+ "text/plain": []
664
+ },
665
+ "metadata": {},
666
+ "execution_count": 11
667
+ }
668
+ ]
669
+ },
670
+ {
671
+ "cell_type": "code",
672
+ "source": [],
673
+ "metadata": {
674
+ "id": "H3GOFgHCqheH"
675
+ },
676
+ "execution_count": 11,
677
+ "outputs": []
678
+ }
679
+ ]
680
+ }
Sambert_Voice_Cloning_in_One_Click.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
Sambert中文声音克隆v2.ipynb ADDED
@@ -0,0 +1,1195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "machine_shape": "hm",
8
+ "gpuType": "V100",
9
+ "authorship_tag": "ABX9TyPlHFyW04xkOShGFsrqykJH",
10
+ "include_colab_link": true
11
+ },
12
+ "kernelspec": {
13
+ "name": "python3",
14
+ "display_name": "Python 3"
15
+ },
16
+ "language_info": {
17
+ "name": "python"
18
+ },
19
+ "accelerator": "GPU"
20
+ },
21
+ "cells": [
22
+ {
23
+ "cell_type": "markdown",
24
+ "metadata": {
25
+ "id": "view-in-github",
26
+ "colab_type": "text"
27
+ },
28
+ "source": [
29
+ "<a href=\"https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/Sambert%E4%B8%AD%E6%96%87%E5%A3%B0%E9%9F%B3%E5%85%8B%E9%9A%86v2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type": "markdown",
34
+ "source": [
35
+ "# 全新中文声音克隆 Voice Cloning for Chinese Speech"
36
+ ],
37
+ "metadata": {
38
+ "id": "Uhhc4_stcdSf"
39
+ }
40
+ },
41
+ {
42
+ "cell_type": "markdown",
43
+ "source": [
44
+ "## 配置环境 Set up"
45
+ ],
46
+ "metadata": {
47
+ "id": "qIFF53SWVDe-"
48
+ }
49
+ },
50
+ {
51
+ "cell_type": "code",
52
+ "source": [
53
+ "! nvidia-smi # 需要使用GPU运行"
54
+ ],
55
+ "metadata": {
56
+ "id": "4RZJ1P69VKLU",
57
+ "colab": {
58
+ "base_uri": "https://localhost:8080/"
59
+ },
60
+ "outputId": "42ee2dbc-c527-472c-bd1f-a5ccfa37f5ae"
61
+ },
62
+ "execution_count": null,
63
+ "outputs": [
64
+ {
65
+ "output_type": "stream",
66
+ "name": "stdout",
67
+ "text": [
68
+ "Thu Aug 31 07:46:44 2023 \n",
69
+ "+-----------------------------------------------------------------------------+\n",
70
+ "| NVIDIA-SMI 525.105.17 Driver Version: 525.105.17 CUDA Version: 12.0 |\n",
71
+ "|-------------------------------+----------------------+----------------------+\n",
72
+ "| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n",
73
+ "| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n",
74
+ "| | | MIG M. |\n",
75
+ "|===============================+======================+======================|\n",
76
+ "| 0 Tesla V100-SXM2... Off | 00000000:00:04.0 Off | 0 |\n",
77
+ "| N/A 35C P0 24W / 300W | 0MiB / 16384MiB | 0% Default |\n",
78
+ "| | | N/A |\n",
79
+ "+-------------------------------+----------------------+----------------------+\n",
80
+ " \n",
81
+ "+-----------------------------------------------------------------------------+\n",
82
+ "| Processes: |\n",
83
+ "| GPU GI CI PID Type Process name GPU Memory |\n",
84
+ "| ID ID Usage |\n",
85
+ "|=============================================================================|\n",
86
+ "| No running processes found |\n",
87
+ "+-----------------------------------------------------------------------------+\n"
88
+ ]
89
+ }
90
+ ]
91
+ },
92
+ {
93
+ "cell_type": "code",
94
+ "source": [
95
+ "! pip install openai-whisper\n",
96
+ "! pip install modelscope\n",
97
+ "! pip install tts-autolabel -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html\n",
98
+ "! pip install typeguard==2.3.1\n",
99
+ "! pip install sox\n",
100
+ "! pip install bitstring\n",
101
+ "! pip install pysptk --no-build-isolation\n",
102
+ "! pip install kantts -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html\n",
103
+ "! pip install pytorch_wavelets\n",
104
+ "! pip install tensorboardX\n",
105
+ "! git clone https://github.com/fbcotter/pytorch_wavelets\n",
106
+ "! pip install matplotlib\n",
107
+ "! pip install numpy==1.22.0"
108
+ ],
109
+ "metadata": {
110
+ "id": "s2aAbOEPaVh6",
111
+ "colab": {
112
+ "base_uri": "https://localhost:8080/",
113
+ "height": 1000
114
+ },
115
+ "outputId": "604b8cc2-6b7a-4185-f14c-c22a51f0b706"
116
+ },
117
+ "execution_count": null,
118
+ "outputs": [
119
+ {
120
+ "output_type": "stream",
121
+ "name": "stdout",
122
+ "text": [
123
+ "Collecting openai-whisper\n",
124
+ " Downloading openai-whisper-20230314.tar.gz (792 kB)\n",
125
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━���━━━━━━\u001b[0m \u001b[32m792.9/792.9 kB\u001b[0m \u001b[31m7.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
126
+ "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
127
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
128
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
129
+ "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from openai-whisper) (2.0.0)\n",
130
+ "Requirement already satisfied: numba in /usr/local/lib/python3.10/dist-packages (from openai-whisper) (0.56.4)\n",
131
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from openai-whisper) (1.23.5)\n",
132
+ "Requirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from openai-whisper) (2.0.1+cu118)\n",
133
+ "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from openai-whisper) (4.66.1)\n",
134
+ "Requirement already satisfied: more-itertools in /usr/local/lib/python3.10/dist-packages (from openai-whisper) (10.1.0)\n",
135
+ "Collecting tiktoken==0.3.1 (from openai-whisper)\n",
136
+ " Downloading tiktoken-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)\n",
137
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m13.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
138
+ "\u001b[?25hCollecting ffmpeg-python==0.2.0 (from openai-whisper)\n",
139
+ " Downloading ffmpeg_python-0.2.0-py3-none-any.whl (25 kB)\n",
140
+ "Requirement already satisfied: future in /usr/local/lib/python3.10/dist-packages (from ffmpeg-python==0.2.0->openai-whisper) (0.18.3)\n",
141
+ "Requirement already satisfied: regex>=2022.1.18 in /usr/local/lib/python3.10/dist-packages (from tiktoken==0.3.1->openai-whisper) (2023.6.3)\n",
142
+ "Requirement already satisfied: requests>=2.26.0 in /usr/local/lib/python3.10/dist-packages (from tiktoken==0.3.1->openai-whisper) (2.31.0)\n",
143
+ "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->openai-whisper) (3.27.2)\n",
144
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->openai-whisper) (3.12.2)\n",
145
+ "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->openai-whisper) (16.0.6)\n",
146
+ "Requirement already satisfied: llvmlite<0.40,>=0.39.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba->openai-whisper) (0.39.1)\n",
147
+ "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from numba->openai-whisper) (67.7.2)\n",
148
+ "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch->openai-whisper) (4.7.1)\n",
149
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch->openai-whisper) (1.12)\n",
150
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->openai-whisper) (3.1)\n",
151
+ "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch->openai-whisper) (3.1.2)\n",
152
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken==0.3.1->openai-whisper) (3.2.0)\n",
153
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken==0.3.1->openai-whisper) (3.4)\n",
154
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken==0.3.1->openai-whisper) (2.0.4)\n",
155
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken==0.3.1->openai-whisper) (2023.7.22)\n",
156
+ "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch->openai-whisper) (2.1.3)\n",
157
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch->openai-whisper) (1.3.0)\n",
158
+ "Building wheels for collected packages: openai-whisper\n",
159
+ " Building wheel for openai-whisper (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
160
+ " Created wheel for openai-whisper: filename=openai_whisper-20230314-py3-none-any.whl size=796907 sha256=3f1f7b29554cb12038ac028a6ee51993ce2ef2958631f12e95b53f3406e33050\n",
161
+ " Stored in directory: /root/.cache/pip/wheels/b2/13/5f/fe8245f6dc59df505879da4b2129932e342f02a80e6b87f27d\n",
162
+ "Successfully built openai-whisper\n",
163
+ "Installing collected packages: ffmpeg-python, tiktoken, openai-whisper\n",
164
+ "Successfully installed ffmpeg-python-0.2.0 openai-whisper-20230314 tiktoken-0.3.1\n",
165
+ "Collecting modelscope\n",
166
+ " Downloading modelscope-1.8.4-py3-none-any.whl (4.9 MB)\n",
167
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.9/4.9 MB\u001b[0m \u001b[31m45.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
168
+ "\u001b[?25hCollecting addict (from modelscope)\n",
169
+ " Downloading addict-2.4.0-py3-none-any.whl (3.8 kB)\n",
170
+ "Requirement already satisfied: attrs in /usr/local/lib/python3.10/dist-packages (from modelscope) (23.1.0)\n",
171
+ "Collecting datasets<=2.13.0,>=2.8.0 (from modelscope)\n",
172
+ " Downloading datasets-2.13.0-py3-none-any.whl (485 kB)\n",
173
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m485.6/485.6 kB\u001b[0m \u001b[31m43.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
174
+ "\u001b[?25hCollecting einops (from modelscope)\n",
175
+ " Downloading einops-0.6.1-py3-none-any.whl (42 kB)\n",
176
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m42.2/42.2 kB\u001b[0m \u001b[31m4.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
177
+ "\u001b[?25hRequirement already satisfied: filelock>=3.3.0 in /usr/local/lib/python3.10/dist-packages (from modelscope) (3.12.2)\n",
178
+ "Requirement already satisfied: gast>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from modelscope) (0.4.0)\n",
179
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from modelscope) (1.23.5)\n",
180
+ "Collecting oss2 (from modelscope)\n",
181
+ " Downloading oss2-2.18.1.tar.gz (274 kB)\n",
182
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m274.3/274.3 kB\u001b[0m \u001b[31m33.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
183
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
184
+ "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from modelscope) (1.5.3)\n",
185
+ "Requirement already satisfied: Pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from modelscope) (9.4.0)\n",
186
+ "Collecting pyarrow!=9.0.0,>=6.0.0 (from modelscope)\n",
187
+ " Downloading pyarrow-13.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (40.0 MB)\n",
188
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m40.0/40.0 MB\u001b[0m \u001b[31m45.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
189
+ "\u001b[?25hRequirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.10/dist-packages (from modelscope) (2.8.2)\n",
190
+ "Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from modelscope) (6.0.1)\n",
191
+ "Requirement already satisfied: requests>=2.25 in /usr/local/lib/python3.10/dist-packages (from modelscope) (2.31.0)\n",
192
+ "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from modelscope) (1.10.1)\n",
193
+ "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from modelscope) (67.7.2)\n",
194
+ "Collecting simplejson>=3.3.0 (from modelscope)\n",
195
+ " Downloading simplejson-3.19.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (137 kB)\n",
196
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.9/137.9 kB\u001b[0m \u001b[31m17.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
197
+ "\u001b[?25hRequirement already satisfied: sortedcontainers>=1.5.9 in /usr/local/lib/python3.10/dist-packages (from modelscope) (2.4.0)\n",
198
+ "Requirement already satisfied: tqdm>=4.64.0 in /usr/local/lib/python3.10/dist-packages (from modelscope) (4.66.1)\n",
199
+ "Requirement already satisfied: urllib3>=1.26 in /usr/local/lib/python3.10/dist-packages (from modelscope) (2.0.4)\n",
200
+ "Collecting yapf (from modelscope)\n",
201
+ " Downloading yapf-0.40.1-py3-none-any.whl (250 kB)\n",
202
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m250.3/250.3 kB\u001b[0m \u001b[31m26.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
203
+ "\u001b[?25hCollecting dill<0.3.7,>=0.3.0 (from datasets<=2.13.0,>=2.8.0->modelscope)\n",
204
+ " Downloading dill-0.3.6-py3-none-any.whl (110 kB)\n",
205
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m110.5/110.5 kB\u001b[0m \u001b[31m14.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
206
+ "\u001b[?25hCollecting xxhash (from datasets<=2.13.0,>=2.8.0->modelscope)\n",
207
+ " Downloading xxhash-3.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194 kB)\n",
208
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m21.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
209
+ "\u001b[?25hCollecting multiprocess (from datasets<=2.13.0,>=2.8.0->modelscope)\n",
210
+ " Downloading multiprocess-0.70.15-py310-none-any.whl (134 kB)\n",
211
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m16.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
212
+ "\u001b[?25hRequirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.10/dist-packages (from datasets<=2.13.0,>=2.8.0->modelscope) (2023.6.0)\n",
213
+ "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets<=2.13.0,>=2.8.0->modelscope) (3.8.5)\n",
214
+ "Collecting huggingface-hub<1.0.0,>=0.11.0 (from datasets<=2.13.0,>=2.8.0->modelscope)\n",
215
+ " Downloading huggingface_hub-0.16.4-py3-none-any.whl (268 kB)\n",
216
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m268.8/268.8 kB\u001b[0m \u001b[31m30.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
217
+ "\u001b[?25hRequirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets<=2.13.0,>=2.8.0->modelscope) (23.1)\n",
218
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.1->modelscope) (1.16.0)\n",
219
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.25->modelscope) (3.2.0)\n",
220
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.25->modelscope) (3.4)\n",
221
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.25->modelscope) (2023.7.22)\n",
222
+ "Collecting crcmod>=1.7 (from oss2->modelscope)\n",
223
+ " Downloading crcmod-1.7.tar.gz (89 kB)\n",
224
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m89.7/89.7 kB\u001b[0m \u001b[31m12.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
225
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
226
+ "Collecting pycryptodome>=3.4.7 (from oss2->modelscope)\n",
227
+ " Downloading pycryptodome-3.18.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)\n",
228
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m90.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
229
+ "\u001b[?25hCollecting aliyun-python-sdk-kms>=2.4.1 (from oss2->modelscope)\n",
230
+ " Downloading aliyun_python_sdk_kms-2.16.1-py2.py3-none-any.whl (70 kB)\n",
231
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m70.8/70.8 kB\u001b[0m \u001b[31m8.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
232
+ "\u001b[?25hCollecting aliyun-python-sdk-core>=2.13.12 (from oss2->modelscope)\n",
233
+ " Downloading aliyun-python-sdk-core-2.13.36.tar.gz (440 kB)\n",
234
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m440.5/440.5 kB\u001b[0m \u001b[31m45.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
235
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
236
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->modelscope) (2023.3)\n",
237
+ "Requirement already satisfied: importlib-metadata>=6.6.0 in /usr/local/lib/python3.10/dist-packages (from yapf->modelscope) (6.8.0)\n",
238
+ "Requirement already satisfied: platformdirs>=3.5.1 in /usr/local/lib/python3.10/dist-packages (from yapf->modelscope) (3.10.0)\n",
239
+ "Requirement already satisfied: tomli>=2.0.1 in /usr/local/lib/python3.10/dist-packages (from yapf->modelscope) (2.0.1)\n",
240
+ "Collecting jmespath<1.0.0,>=0.9.3 (from aliyun-python-sdk-core>=2.13.12->oss2->modelscope)\n",
241
+ " Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)\n",
242
+ "Requirement already satisfied: cryptography>=2.6.0 in /usr/local/lib/python3.10/dist-packages (from aliyun-python-sdk-core>=2.13.12->oss2->modelscope) (41.0.3)\n",
243
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets<=2.13.0,>=2.8.0->modelscope) (6.0.4)\n",
244
+ "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets<=2.13.0,>=2.8.0->modelscope) (4.0.3)\n",
245
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets<=2.13.0,>=2.8.0->modelscope) (1.9.2)\n",
246
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets<=2.13.0,>=2.8.0->modelscope) (1.4.0)\n",
247
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets<=2.13.0,>=2.8.0->modelscope) (1.3.1)\n",
248
+ "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0.0,>=0.11.0->datasets<=2.13.0,>=2.8.0->modelscope) (4.7.1)\n",
249
+ "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata>=6.6.0->yapf->modelscope) (3.16.2)\n",
250
+ "INFO: pip is looking at multiple versions of multiprocess to determine which version is compatible with other requirements. This could take a while.\n",
251
+ "Collecting multiprocess (from datasets<=2.13.0,>=2.8.0->modelscope)\n",
252
+ " Downloading multiprocess-0.70.14-py310-none-any.whl (134 kB)\n",
253
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.3/134.3 kB\u001b[0m \u001b[31m16.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
254
+ "\u001b[?25hRequirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.10/dist-packages (from cryptography>=2.6.0->aliyun-python-sdk-core>=2.13.12->oss2->modelscope) (1.15.1)\n",
255
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.12->cryptography>=2.6.0->aliyun-python-sdk-core>=2.13.12->oss2->modelscope) (2.21)\n",
256
+ "Building wheels for collected packages: oss2, aliyun-python-sdk-core, crcmod\n",
257
+ " Building wheel for oss2 (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
258
+ " Created wheel for oss2: filename=oss2-2.18.1-py3-none-any.whl size=115175 sha256=2902a22b29235e69d55720bc93c3b6d72fccccbe9e1211538db502da0f129a3a\n",
259
+ " Stored in directory: /root/.cache/pip/wheels/54/b1/27/f9d5791a1f01ee0ad99c934aa0e1df3eaae375b5d5aa3da184\n",
260
+ " Building wheel for aliyun-python-sdk-core (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
261
+ " Created wheel for aliyun-python-sdk-core: filename=aliyun_python_sdk_core-2.13.36-py3-none-any.whl size=533190 sha256=630d5bd7cc39123af8b9ce7e2b6d7ec588fbd60800db17c3b668f66edf8487c7\n",
262
+ " Stored in directory: /root/.cache/pip/wheels/c0/f4/0e/87c534857132bd3bd2c4465c0b15b4db650cf6c15a876bda34\n",
263
+ " Building wheel for crcmod (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
264
+ " Created wheel for crcmod: filename=crcmod-1.7-cp310-cp310-linux_x86_64.whl size=31405 sha256=5969199ddbffe80016650574a05f5ba65cbc83bb839dc881302a238ea4b462f5\n",
265
+ " Stored in directory: /root/.cache/pip/wheels/85/4c/07/72215c529bd59d67e3dac29711d7aba1b692f543c808ba9e86\n",
266
+ "Successfully built oss2 aliyun-python-sdk-core crcmod\n",
267
+ "Installing collected packages: crcmod, addict, xxhash, simplejson, pycryptodome, pyarrow, jmespath, einops, dill, yapf, multiprocess, huggingface-hub, aliyun-python-sdk-core, datasets, aliyun-python-sdk-kms, oss2, modelscope\n",
268
+ " Attempting uninstall: pyarrow\n",
269
+ " Found existing installation: pyarrow 9.0.0\n",
270
+ " Uninstalling pyarrow-9.0.0:\n",
271
+ " Successfully uninstalled pyarrow-9.0.0\n",
272
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
273
+ "pandas-gbq 0.17.9 requires pyarrow<10.0dev,>=3.0.0, but you have pyarrow 13.0.0 which is incompatible.\u001b[0m\u001b[31m\n",
274
+ "\u001b[0mSuccessfully installed addict-2.4.0 aliyun-python-sdk-core-2.13.36 aliyun-python-sdk-kms-2.16.1 crcmod-1.7 datasets-2.13.0 dill-0.3.6 einops-0.6.1 huggingface-hub-0.16.4 jmespath-0.10.0 modelscope-1.8.4 multiprocess-0.70.14 oss2-2.18.1 pyarrow-13.0.0 pycryptodome-3.18.0 simplejson-3.19.1 xxhash-3.3.0 yapf-0.40.1\n",
275
+ "Looking in links: https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html\n",
276
+ "Collecting tts-autolabel\n",
277
+ " Downloading https://modelscope.oss-cn-beijing.aliyuncs.com/releases/dependencies/kantts/tts_autolabel-1.1.8-py3-none-any.whl (117 kB)\n",
278
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m117.3/117.3 kB\u001b[0m \u001b[31m216.0 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
279
+ "\u001b[?25hRequirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from tts-autolabel) (2.0.1+cu118)\n",
280
+ "Requirement already satisfied: torchaudio in /usr/local/lib/python3.10/dist-packages (from tts-autolabel) (2.0.2+cu118)\n",
281
+ "Collecting onnxruntime (from tts-autolabel)\n",
282
+ " Downloading onnxruntime-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB)\n",
283
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.9/5.9 MB\u001b[0m \u001b[31m15.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
284
+ "\u001b[?25hRequirement already satisfied: librosa in /usr/local/lib/python3.10/dist-packages (from tts-autolabel) (0.10.1)\n",
285
+ "Collecting numpy<=1.23.1 (from tts-autolabel)\n",
286
+ " Downloading numpy-1.23.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.0 MB)\n",
287
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m17.0/17.0 MB\u001b[0m \u001b[31m54.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
288
+ "\u001b[?25hCollecting sox (from tts-autolabel)\n",
289
+ " Downloading sox-1.4.1-py2.py3-none-any.whl (39 kB)\n",
290
+ "Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from tts-autolabel) (6.0.1)\n",
291
+ "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from tts-autolabel) (4.66.1)\n",
292
+ "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from tts-autolabel) (1.10.1)\n",
293
+ "Collecting nls-fa (from tts-autolabel)\n",
294
+ " Downloading https://modelscope.oss-cn-beijing.aliyuncs.com/releases/dependencies/nls_fa-0.1-cp310-cp310-linux_x86_64.whl (1.2 MB)\n",
295
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m1.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
296
+ "\u001b[?25hCollecting kaldi-native-fbank (from tts-autolabel)\n",
297
+ " Downloading kaldi_native_fbank-1.18.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210 kB)\n",
298
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m210.5/210.5 kB\u001b[0m \u001b[31m23.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
299
+ "\u001b[?25hCollecting typeguard<=2.13.3 (from tts-autolabel)\n",
300
+ " Downloading typeguard-2.13.3-py3-none-any.whl (17 kB)\n",
301
+ "Collecting ttsfrd>=0.2.1 (from tts-autolabel)\n",
302
+ " Downloading https://modelscope.oss-cn-beijing.aliyuncs.com/releases/dependencies/ttsfrd/linux/ttsfrd-0.2.1-cp310-cp310-linux_x86_64.whl (53.4 MB)\n",
303
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m53.4/53.4 MB\u001b[0m \u001b[31m10.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
304
+ "\u001b[?25hRequirement already satisfied: audioread>=2.1.9 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (3.0.0)\n",
305
+ "Requirement already satisfied: scikit-learn>=0.20.0 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (1.2.2)\n",
306
+ "Requirement already satisfied: joblib>=0.14 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (1.3.2)\n",
307
+ "Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (4.4.2)\n",
308
+ "Requirement already satisfied: numba>=0.51.0 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (0.56.4)\n",
309
+ "Requirement already satisfied: soundfile>=0.12.1 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (0.12.1)\n",
310
+ "Requirement already satisfied: pooch>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (1.7.0)\n",
311
+ "Requirement already satisfied: soxr>=0.3.2 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (0.3.6)\n",
312
+ "Requirement already satisfied: typing-extensions>=4.1.1 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (4.7.1)\n",
313
+ "Requirement already satisfied: lazy-loader>=0.1 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (0.3)\n",
314
+ "Requirement already satisfied: msgpack>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa->tts-autolabel) (1.0.5)\n",
315
+ "Collecting coloredlogs (from onnxruntime->tts-autolabel)\n",
316
+ " Downloading coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)\n",
317
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.0/46.0 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
318
+ "\u001b[?25hRequirement already satisfied: flatbuffers in /usr/local/lib/python3.10/dist-packages (from onnxruntime->tts-autolabel) (23.5.26)\n",
319
+ "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from onnxruntime->tts-autolabel) (23.1)\n",
320
+ "Requirement already satisfied: protobuf in /usr/local/lib/python3.10/dist-packages (from onnxruntime->tts-autolabel) (3.20.3)\n",
321
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from onnxruntime->tts-autolabel) (1.12)\n",
322
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch->tts-autolabel) (3.12.2)\n",
323
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->tts-autolabel) (3.1)\n",
324
+ "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch->tts-autolabel) (3.1.2)\n",
325
+ "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch->tts-autolabel) (2.0.0)\n",
326
+ "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch->tts-autolabel) (3.27.2)\n",
327
+ "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch->tts-autolabel) (16.0.6)\n",
328
+ "Requirement already satisfied: llvmlite<0.40,>=0.39.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba>=0.51.0->librosa->tts-autolabel) (0.39.1)\n",
329
+ "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from numba>=0.51.0->librosa->tts-autolabel) (67.7.2)\n",
330
+ "Requirement already satisfied: platformdirs>=2.5.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.0->librosa->tts-autolabel) (3.10.0)\n",
331
+ "Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.0->librosa->tts-autolabel) (2.31.0)\n",
332
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.20.0->librosa->tts-autolabel) (3.2.0)\n",
333
+ "Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile>=0.12.1->librosa->tts-autolabel) (1.15.1)\n",
334
+ "Collecting humanfriendly>=9.1 (from coloredlogs->onnxruntime->tts-autolabel)\n",
335
+ " Downloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)\n",
336
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.8/86.8 kB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
337
+ "\u001b[?25hRequirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch->tts-autolabel) (2.1.3)\n",
338
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->onnxruntime->tts-autolabel) (1.3.0)\n",
339
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile>=0.12.1->librosa->tts-autolabel) (2.21)\n",
340
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.0->librosa->tts-autolabel) (3.2.0)\n",
341
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.0->librosa->tts-autolabel) (3.4)\n",
342
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.0->librosa->tts-autolabel) (2.0.4)\n",
343
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.0->librosa->tts-autolabel) (2023.7.22)\n",
344
+ "Installing collected packages: typeguard, ttsfrd, numpy, nls-fa, kaldi-native-fbank, humanfriendly, sox, coloredlogs, onnxruntime, tts-autolabel\n",
345
+ " Attempting uninstall: numpy\n",
346
+ " Found existing installation: numpy 1.23.5\n",
347
+ " Uninstalling numpy-1.23.5:\n",
348
+ " Successfully uninstalled numpy-1.23.5\n",
349
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
350
+ "pandas-gbq 0.17.9 requires pyarrow<10.0dev,>=3.0.0, but you have pyarrow 13.0.0 which is incompatible.\u001b[0m\u001b[31m\n",
351
+ "\u001b[0mSuccessfully installed coloredlogs-15.0.1 humanfriendly-10.0 kaldi-native-fbank-1.18.4 nls-fa-0.1 numpy-1.23.1 onnxruntime-1.15.1 sox-1.4.1 tts-autolabel-1.1.8 ttsfrd-0.2.1 typeguard-2.13.3\n"
352
+ ]
353
+ },
354
+ {
355
+ "output_type": "display_data",
356
+ "data": {
357
+ "application/vnd.colab-display-data+json": {
358
+ "pip_warning": {
359
+ "packages": [
360
+ "numpy"
361
+ ]
362
+ }
363
+ }
364
+ },
365
+ "metadata": {}
366
+ },
367
+ {
368
+ "output_type": "stream",
369
+ "name": "stdout",
370
+ "text": [
371
+ "Collecting typeguard==2.3.1\n",
372
+ " Downloading typeguard-2.3.1-py3-none-any.whl (10 kB)\n",
373
+ "Installing collected packages: typeguard\n",
374
+ " Attempting uninstall: typeguard\n",
375
+ " Found existing installation: typeguard 2.13.3\n",
376
+ " Uninstalling typeguard-2.13.3:\n",
377
+ " Successfully uninstalled typeguard-2.13.3\n",
378
+ "Successfully installed typeguard-2.3.1\n",
379
+ "Requirement already satisfied: sox in /usr/local/lib/python3.10/dist-packages (1.4.1)\n",
380
+ "Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.10/dist-packages (from sox) (1.23.1)\n",
381
+ "Collecting bitstring\n",
382
+ " Downloading bitstring-4.1.1-py3-none-any.whl (56 kB)\n",
383
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.8/56.8 kB\u001b[0m \u001b[31m1.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
384
+ "\u001b[?25hCollecting bitarray<3.0.0,>=2.8.0 (from bitstring)\n",
385
+ " Downloading bitarray-2.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (286 kB)\n",
386
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m286.2/286.2 kB\u001b[0m \u001b[31m9.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
387
+ "\u001b[?25hInstalling collected packages: bitarray, bitstring\n",
388
+ "Successfully installed bitarray-2.8.1 bitstring-4.1.1\n",
389
+ "Collecting pysptk\n",
390
+ " Downloading pysptk-0.2.1.tar.gz (419 kB)\n",
391
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m419.7/419.7 kB\u001b[0m \u001b[31m5.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
392
+ "\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
393
+ "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from pysptk) (1.10.1)\n",
394
+ "Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from pysptk) (4.4.2)\n",
395
+ "Requirement already satisfied: cython>=0.28.0 in /usr/local/lib/python3.10/dist-packages (from pysptk) (0.29.36)\n",
396
+ "Requirement already satisfied: numpy<1.27.0,>=1.19.5 in /usr/local/lib/python3.10/dist-packages (from scipy->pysptk) (1.23.1)\n",
397
+ "Building wheels for collected packages: pysptk\n",
398
+ " Building wheel for pysptk (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
399
+ " Created wheel for pysptk: filename=pysptk-0.2.1-cp310-cp310-linux_x86_64.whl size=1137273 sha256=b57158ca005bb75139e737d40ee28c7fb86b5e166def7734f2a1dfd5997e5812\n",
400
+ " Stored in directory: /root/.cache/pip/wheels/aa/96/e5/2348f6f568b9888d3505a97dc53287152ffd0440526cc6105d\n",
401
+ "Successfully built pysptk\n",
402
+ "Installing collected packages: pysptk\n",
403
+ "Successfully installed pysptk-0.2.1\n",
404
+ "Looking in links: https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html\n",
405
+ "Collecting kantts\n",
406
+ " Downloading https://modelscope.oss-cn-beijing.aliyuncs.com/releases/dependencies/kantts/kantts-1.0.1-py3-none-any.whl (147 kB)\n",
407
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━��━━━━━━━━\u001b[0m \u001b[32m147.2/147.2 kB\u001b[0m \u001b[31m212.0 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
408
+ "\u001b[?25hRequirement already satisfied: librosa>=0.9.2 in /usr/local/lib/python3.10/dist-packages (from kantts) (0.10.1)\n",
409
+ "Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from kantts) (3.7.1)\n",
410
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from kantts) (1.23.1)\n",
411
+ "Requirement already satisfied: numba in /usr/local/lib/python3.10/dist-packages (from kantts) (0.56.4)\n",
412
+ "Collecting unidecode (from kantts)\n",
413
+ " Downloading Unidecode-1.3.6-py3-none-any.whl (235 kB)\n",
414
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m235.9/235.9 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
415
+ "\u001b[?25hRequirement already satisfied: inflect in /usr/local/lib/python3.10/dist-packages (from kantts) (7.0.0)\n",
416
+ "Requirement already satisfied: pywavelets>=1.3.0 in /usr/local/lib/python3.10/dist-packages (from kantts) (1.4.1)\n",
417
+ "Requirement already satisfied: scikit-learn>=1.0.2 in /usr/local/lib/python3.10/dist-packages (from kantts) (1.2.2)\n",
418
+ "Requirement already satisfied: scipy>=1.7.3 in /usr/local/lib/python3.10/dist-packages (from kantts) (1.10.1)\n",
419
+ "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from kantts) (4.66.1)\n",
420
+ "Requirement already satisfied: pysptk in /usr/local/lib/python3.10/dist-packages (from kantts) (0.2.1)\n",
421
+ "Requirement already satisfied: sox in /usr/local/lib/python3.10/dist-packages (from kantts) (1.4.1)\n",
422
+ "Requirement already satisfied: ttsfrd in /usr/local/lib/python3.10/dist-packages (from kantts) (0.2.1)\n",
423
+ "Requirement already satisfied: audioread>=2.1.9 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.9.2->kantts) (3.0.0)\n",
424
+ "Requirement already satisfied: joblib>=0.14 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.9.2->kantts) (1.3.2)\n",
425
+ "Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.9.2->kantts) (4.4.2)\n",
426
+ "Requirement already satisfied: soundfile>=0.12.1 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.9.2->kantts) (0.12.1)\n",
427
+ "Requirement already satisfied: pooch>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.9.2->kantts) (1.7.0)\n",
428
+ "Requirement already satisfied: soxr>=0.3.2 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.9.2->kantts) (0.3.6)\n",
429
+ "Requirement already satisfied: typing-extensions>=4.1.1 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.9.2->kantts) (4.7.1)\n",
430
+ "Requirement already satisfied: lazy-loader>=0.1 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.9.2->kantts) (0.3)\n",
431
+ "Requirement already satisfied: msgpack>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.9.2->kantts) (1.0.5)\n",
432
+ "Requirement already satisfied: llvmlite<0.40,>=0.39.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba->kantts) (0.39.1)\n",
433
+ "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from numba->kantts) (67.7.2)\n",
434
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=1.0.2->kantts) (3.2.0)\n",
435
+ "Requirement already satisfied: pydantic>=1.9.1 in /usr/local/lib/python3.10/dist-packages (from inflect->kantts) (2.2.1)\n",
436
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->kantts) (1.1.0)\n",
437
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->kantts) (0.11.0)\n",
438
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->kantts) (4.42.1)\n",
439
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->kantts) (1.4.4)\n",
440
+ "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->kantts) (23.1)\n",
441
+ "Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->kantts) (9.4.0)\n",
442
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->kantts) (3.1.1)\n",
443
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib->kantts) (2.8.2)\n",
444
+ "Requirement already satisfied: cython>=0.28.0 in /usr/local/lib/python3.10/dist-packages (from pysptk->kantts) (0.29.36)\n",
445
+ "Requirement already satisfied: platformdirs>=2.5.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.0->librosa>=0.9.2->kantts) (3.10.0)\n",
446
+ "Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.0->librosa>=0.9.2->kantts) (2.31.0)\n",
447
+ "Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=1.9.1->inflect->kantts) (0.5.0)\n",
448
+ "Requirement already satisfied: pydantic-core==2.6.1 in /usr/local/lib/python3.10/dist-packages (from pydantic>=1.9.1->inflect->kantts) (2.6.1)\n",
449
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib->kantts) (1.16.0)\n",
450
+ "Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile>=0.12.1->librosa>=0.9.2->kantts) (1.15.1)\n",
451
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile>=0.12.1->librosa>=0.9.2->kantts) (2.21)\n",
452
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.0->librosa>=0.9.2->kantts) (3.2.0)\n",
453
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.0->librosa>=0.9.2->kantts) (3.4)\n",
454
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.0->librosa>=0.9.2->kantts) (2.0.4)\n",
455
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.0->librosa>=0.9.2->kantts) (2023.7.22)\n",
456
+ "Installing collected packages: unidecode, kantts\n",
457
+ "Successfully installed kantts-1.0.1 unidecode-1.3.6\n",
458
+ "Collecting pytorch_wavelets\n",
459
+ " Downloading pytorch_wavelets-1.3.0-py3-none-any.whl (54 kB)\n",
460
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.9/54.9 kB\u001b[0m \u001b[31m1.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
461
+ "\u001b[?25hRequirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from pytorch_wavelets) (1.23.1)\n",
462
+ "Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from pytorch_wavelets) (1.16.0)\n",
463
+ "Requirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from pytorch_wavelets) (2.0.1+cu118)\n",
464
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch->pytorch_wavelets) (3.12.2)\n",
465
+ "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch->pytorch_wavelets) (4.7.1)\n",
466
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch->pytorch_wavelets) (1.12)\n",
467
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->pytorch_wavelets) (3.1)\n",
468
+ "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch->pytorch_wavelets) (3.1.2)\n",
469
+ "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch->pytorch_wavelets) (2.0.0)\n",
470
+ "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch->pytorch_wavelets) (3.27.2)\n",
471
+ "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch->pytorch_wavelets) (16.0.6)\n",
472
+ "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch->pytorch_wavelets) (2.1.3)\n",
473
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch->pytorch_wavelets) (1.3.0)\n",
474
+ "Installing collected packages: pytorch_wavelets\n",
475
+ "Successfully installed pytorch_wavelets-1.3.0\n",
476
+ "Collecting tensorboardX\n",
477
+ " Downloading tensorboardX-2.6.2.2-py2.py3-none-any.whl (101 kB)\n",
478
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m101.7/101.7 kB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
479
+ "\u001b[?25hRequirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from tensorboardX) (1.23.1)\n",
480
+ "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from tensorboardX) (23.1)\n",
481
+ "Requirement already satisfied: protobuf>=3.20 in /usr/local/lib/python3.10/dist-packages (from tensorboardX) (3.20.3)\n",
482
+ "Installing collected packages: tensorboardX\n",
483
+ "Successfully installed tensorboardX-2.6.2.2\n",
484
+ "Cloning into 'pytorch_wavelets'...\n",
485
+ "remote: Enumerating objects: 978, done.\u001b[K\n",
486
+ "remote: Counting objects: 100% (142/142), done.\u001b[K\n",
487
+ "remote: Compressing objects: 100% (96/96), done.\u001b[K\n",
488
+ "remote: Total 978 (delta 79), reused 91 (delta 46), pack-reused 836\u001b[K\n",
489
+ "Receiving objects: 100% (978/978), 6.80 MiB | 7.11 MiB/s, done.\n",
490
+ "Resolving deltas: 100% (663/663), done.\n",
491
+ "Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (3.7.1)\n",
492
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.1.0)\n",
493
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (0.11.0)\n",
494
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (4.42.1)\n",
495
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.4.4)\n",
496
+ "Requirement already satisfied: numpy>=1.20 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.23.1)\n",
497
+ "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (23.1)\n",
498
+ "Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (9.4.0)\n",
499
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (3.1.1)\n",
500
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (2.8.2)\n",
501
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)\n",
502
+ "Collecting numpy==1.22.0\n",
503
+ " Downloading numpy-1.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)\n",
504
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m16.8/16.8 MB\u001b[0m \u001b[31m84.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
505
+ "\u001b[?25hInstalling collected packages: numpy\n",
506
+ " Attempting uninstall: numpy\n",
507
+ " Found existing installation: numpy 1.23.1\n",
508
+ " Uninstalling numpy-1.23.1:\n",
509
+ " Successfully uninstalled numpy-1.23.1\n",
510
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
511
+ "librosa 0.10.1 requires numpy!=1.22.0,!=1.22.1,!=1.22.2,>=1.20.3, but you have numpy 1.22.0 which is incompatible.\n",
512
+ "pandas-gbq 0.17.9 requires pyarrow<10.0dev,>=3.0.0, but you have pyarrow 13.0.0 which is incompatible.\n",
513
+ "plotnine 0.12.2 requires numpy>=1.23.0, but you have numpy 1.22.0 which is incompatible.\u001b[0m\u001b[31m\n",
514
+ "\u001b[0mSuccessfully installed numpy-1.22.0\n"
515
+ ]
516
+ },
517
+ {
518
+ "output_type": "display_data",
519
+ "data": {
520
+ "application/vnd.colab-display-data+json": {
521
+ "pip_warning": {
522
+ "packages": [
523
+ "numpy"
524
+ ]
525
+ }
526
+ }
527
+ },
528
+ "metadata": {}
529
+ }
530
+ ]
531
+ },
532
+ {
533
+ "cell_type": "code",
534
+ "source": [
535
+ "!apt-get install sox"
536
+ ],
537
+ "metadata": {
538
+ "colab": {
539
+ "base_uri": "https://localhost:8080/"
540
+ },
541
+ "id": "b4uSdumvUcQC",
542
+ "outputId": "df09129e-5df0-44cf-bd46-d5589cb1b438"
543
+ },
544
+ "execution_count": null,
545
+ "outputs": [
546
+ {
547
+ "output_type": "stream",
548
+ "name": "stdout",
549
+ "text": [
550
+ "Reading package lists... Done\n",
551
+ "Building dependency tree... Done\n",
552
+ "Reading state information... Done\n",
553
+ "The following additional packages will be installed:\n",
554
+ " libopencore-amrnb0 libopencore-amrwb0 libsox-fmt-alsa libsox-fmt-base\n",
555
+ " libsox3 libwavpack1\n",
556
+ "Suggested packages:\n",
557
+ " libsox-fmt-all\n",
558
+ "The following NEW packages will be installed:\n",
559
+ " libopencore-amrnb0 libopencore-amrwb0 libsox-fmt-alsa libsox-fmt-base\n",
560
+ " libsox3 libwavpack1 sox\n",
561
+ "0 upgraded, 7 newly installed, 0 to remove and 16 not upgraded.\n",
562
+ "Need to get 617 kB of archives.\n",
563
+ "After this operation, 1,760 kB of additional disk space will be used.\n",
564
+ "Get:1 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libopencore-amrnb0 amd64 0.1.5-1 [94.8 kB]\n",
565
+ "Get:2 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libopencore-amrwb0 amd64 0.1.5-1 [49.1 kB]\n",
566
+ "Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox3 amd64 14.4.2+git20190427-2+deb11u2build0.22.04.1 [240 kB]\n",
567
+ "Get:4 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox-fmt-alsa amd64 14.4.2+git20190427-2+deb11u2build0.22.04.1 [11.2 kB]\n",
568
+ "Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 libwavpack1 amd64 5.4.0-1build2 [83.7 kB]\n",
569
+ "Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox-fmt-base amd64 14.4.2+git20190427-2+deb11u2build0.22.04.1 [33.7 kB]\n",
570
+ "Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 sox amd64 14.4.2+git20190427-2+deb11u2build0.22.04.1 [104 kB]\n",
571
+ "Fetched 617 kB in 1s (580 kB/s)\n",
572
+ "Selecting previously unselected package libopencore-amrnb0:amd64.\n",
573
+ "(Reading database ... 120831 files and directories currently installed.)\n",
574
+ "Preparing to unpack .../0-libopencore-amrnb0_0.1.5-1_amd64.deb ...\n",
575
+ "Unpacking libopencore-amrnb0:amd64 (0.1.5-1) ...\n",
576
+ "Selecting previously unselected package libopencore-amrwb0:amd64.\n",
577
+ "Preparing to unpack .../1-libopencore-amrwb0_0.1.5-1_amd64.deb ...\n",
578
+ "Unpacking libopencore-amrwb0:amd64 (0.1.5-1) ...\n",
579
+ "Selecting previously unselected package libsox3:amd64.\n",
580
+ "Preparing to unpack .../2-libsox3_14.4.2+git20190427-2+deb11u2build0.22.04.1_amd64.deb ...\n",
581
+ "Unpacking libsox3:amd64 (14.4.2+git20190427-2+deb11u2build0.22.04.1) ...\n",
582
+ "Selecting previously unselected package libsox-fmt-alsa:amd64.\n",
583
+ "Preparing to unpack .../3-libsox-fmt-alsa_14.4.2+git20190427-2+deb11u2build0.22.04.1_amd64.deb ...\n",
584
+ "Unpacking libsox-fmt-alsa:amd64 (14.4.2+git20190427-2+deb11u2build0.22.04.1) ...\n",
585
+ "Selecting previously unselected package libwavpack1:amd64.\n",
586
+ "Preparing to unpack .../4-libwavpack1_5.4.0-1build2_amd64.deb ...\n",
587
+ "Unpacking libwavpack1:amd64 (5.4.0-1build2) ...\n",
588
+ "Selecting previously unselected package libsox-fmt-base:amd64.\n",
589
+ "Preparing to unpack .../5-libsox-fmt-base_14.4.2+git20190427-2+deb11u2build0.22.04.1_amd64.deb ...\n",
590
+ "Unpacking libsox-fmt-base:amd64 (14.4.2+git20190427-2+deb11u2build0.22.04.1) ...\n",
591
+ "Selecting previously unselected package sox.\n",
592
+ "Preparing to unpack .../6-sox_14.4.2+git20190427-2+deb11u2build0.22.04.1_amd64.deb ...\n",
593
+ "Unpacking sox (14.4.2+git20190427-2+deb11u2build0.22.04.1) ...\n",
594
+ "Setting up libsox3:amd64 (14.4.2+git20190427-2+deb11u2build0.22.04.1) ...\n",
595
+ "Setting up libopencore-amrwb0:amd64 (0.1.5-1) ...\n",
596
+ "Setting up libsox-fmt-alsa:amd64 (14.4.2+git20190427-2+deb11u2build0.22.04.1) ...\n",
597
+ "Setting up libwavpack1:amd64 (5.4.0-1build2) ...\n",
598
+ "Setting up libopencore-amrnb0:amd64 (0.1.5-1) ...\n",
599
+ "Setting up libsox-fmt-base:amd64 (14.4.2+git20190427-2+deb11u2build0.22.04.1) ...\n",
600
+ "Setting up sox (14.4.2+git20190427-2+deb11u2build0.22.04.1) ...\n",
601
+ "Processing triggers for man-db (2.10.2-1) ...\n",
602
+ "Processing triggers for libc-bin (2.35-0ubuntu3.1) ...\n",
603
+ "/sbin/ldconfig.real: /usr/local/lib/libtbb.so.12 is not a symbolic link\n",
604
+ "\n",
605
+ "/sbin/ldconfig.real: /usr/local/lib/libtbbbind.so.3 is not a symbolic link\n",
606
+ "\n",
607
+ "/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc_proxy.so.2 is not a symbolic link\n",
608
+ "\n",
609
+ "/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_0.so.3 is not a symbolic link\n",
610
+ "\n",
611
+ "/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc.so.2 is not a symbolic link\n",
612
+ "\n",
613
+ "/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_5.so.3 is not a symbolic link\n",
614
+ "\n"
615
+ ]
616
+ }
617
+ ]
618
+ },
619
+ {
620
+ "cell_type": "code",
621
+ "source": [
622
+ "cd pytorch_wavelets"
623
+ ],
624
+ "metadata": {
625
+ "colab": {
626
+ "base_uri": "https://localhost:8080/"
627
+ },
628
+ "id": "A5mtXiAEUeOi",
629
+ "outputId": "e777914d-f3a1-4dfe-b0f9-b44a49b1bd21"
630
+ },
631
+ "execution_count": null,
632
+ "outputs": [
633
+ {
634
+ "output_type": "stream",
635
+ "name": "stdout",
636
+ "text": [
637
+ "/content/pytorch_wavelets\n"
638
+ ]
639
+ }
640
+ ]
641
+ },
642
+ {
643
+ "cell_type": "code",
644
+ "source": [
645
+ "pip install ."
646
+ ],
647
+ "metadata": {
648
+ "colab": {
649
+ "base_uri": "https://localhost:8080/"
650
+ },
651
+ "id": "0279o9cEUgYo",
652
+ "outputId": "db8ed7e3-834e-4624-b7c2-44291426a63a"
653
+ },
654
+ "execution_count": null,
655
+ "outputs": [
656
+ {
657
+ "output_type": "stream",
658
+ "name": "stdout",
659
+ "text": [
660
+ "Processing /content/pytorch_wavelets\n",
661
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
662
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from pytorch-wavelets==1.3.0) (1.22.0)\n",
663
+ "Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from pytorch-wavelets==1.3.0) (1.16.0)\n",
664
+ "Requirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from pytorch-wavelets==1.3.0) (2.0.1+cu118)\n",
665
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch->pytorch-wavelets==1.3.0) (3.12.2)\n",
666
+ "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch->pytorch-wavelets==1.3.0) (4.7.1)\n",
667
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch->pytorch-wavelets==1.3.0) (1.12)\n",
668
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->pytorch-wavelets==1.3.0) (3.1)\n",
669
+ "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch->pytorch-wavelets==1.3.0) (3.1.2)\n",
670
+ "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch->pytorch-wavelets==1.3.0) (2.0.0)\n",
671
+ "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch->pytorch-wavelets==1.3.0) (3.27.2)\n",
672
+ "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch->pytorch-wavelets==1.3.0) (16.0.6)\n",
673
+ "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch->pytorch-wavelets==1.3.0) (2.1.3)\n",
674
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch->pytorch-wavelets==1.3.0) (1.3.0)\n",
675
+ "Building wheels for collected packages: pytorch-wavelets\n",
676
+ " Building wheel for pytorch-wavelets (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
677
+ " Created wheel for pytorch-wavelets: filename=pytorch_wavelets-1.3.0-py3-none-any.whl size=54852 sha256=6db8460229d2f3b684b7c3e8ef429bb0dee02914a30baba28db7994e49ea6ae9\n",
678
+ " Stored in directory: /tmp/pip-ephem-wheel-cache-2bodt4br/wheels/f6/77/89/ac0462961f441a5dd4d226216613ef64f3eb2c7f2883efcebf\n",
679
+ "Successfully built pytorch-wavelets\n",
680
+ "Installing collected packages: pytorch-wavelets\n",
681
+ " Attempting uninstall: pytorch-wavelets\n",
682
+ " Found existing installation: pytorch-wavelets 1.3.0\n",
683
+ " Uninstalling pytorch-wavelets-1.3.0:\n",
684
+ " Successfully uninstalled pytorch-wavelets-1.3.0\n",
685
+ "Successfully installed pytorch-wavelets-1.3.0\n"
686
+ ]
687
+ }
688
+ ]
689
+ },
690
+ {
691
+ "cell_type": "code",
692
+ "source": [
693
+ "import os\n",
694
+ "os._exit(00) # 重启notebook"
695
+ ],
696
+ "metadata": {
697
+ "id": "lO29uxHrVafx"
698
+ },
699
+ "execution_count": null,
700
+ "outputs": []
701
+ },
702
+ {
703
+ "cell_type": "code",
704
+ "source": [
705
+ "import sox"
706
+ ],
707
+ "metadata": {
708
+ "id": "UsOLbeoYFO04"
709
+ },
710
+ "execution_count": null,
711
+ "outputs": []
712
+ },
713
+ {
714
+ "cell_type": "markdown",
715
+ "source": [
716
+ "## 对音频切片处理"
717
+ ],
718
+ "metadata": {
719
+ "id": "YZqH0DtGcsXJ"
720
+ }
721
+ },
722
+ {
723
+ "cell_type": "code",
724
+ "source": [
725
+ "import subprocess\n",
726
+ "from pathlib import Path\n",
727
+ "import librosa\n",
728
+ "from scipy.io import wavfile\n",
729
+ "import numpy as np\n",
730
+ "import torch\n",
731
+ "import csv\n",
732
+ "import whisper\n",
733
+ "\n",
734
+ "def split_long_audio(model, filepaths, save_dir=\"data_dir\", out_sr=44100):\n",
735
+ " if isinstance(filepaths, str):\n",
736
+ " filepaths = [filepaths]\n",
737
+ "\n",
738
+ " for file_idx, filepath in enumerate(filepaths):\n",
739
+ "\n",
740
+ " save_path = Path(save_dir)\n",
741
+ " save_path.mkdir(exist_ok=True, parents=True)\n",
742
+ "\n",
743
+ " print(f\"Transcribing file {file_idx}: '{filepath}' to segments...\")\n",
744
+ " result = model.transcribe(filepath, word_timestamps=True, task=\"transcribe\", beam_size=5, best_of=5)\n",
745
+ " segments = result['segments']\n",
746
+ "\n",
747
+ " wav, sr = librosa.load(filepath, sr=None, offset=0, duration=None, mono=True)\n",
748
+ " wav, _ = librosa.effects.trim(wav, top_db=20)\n",
749
+ " peak = np.abs(wav).max()\n",
750
+ " if peak > 1.0:\n",
751
+ " wav = 0.98 * wav / peak\n",
752
+ " wav2 = librosa.resample(wav, orig_sr=sr, target_sr=out_sr)\n",
753
+ " wav2 /= max(wav2.max(), -wav2.min())\n",
754
+ "\n",
755
+ " for i, seg in enumerate(segments):\n",
756
+ " start_time = seg['start']\n",
757
+ " end_time = seg['end']\n",
758
+ " wav_seg = wav2[int(start_time * out_sr):int(end_time * out_sr)]\n",
759
+ " wav_seg_name = f\"{file_idx}_{i}.wav\"\n",
760
+ " out_fpath = save_path / wav_seg_name\n",
761
+ " wavfile.write(out_fpath, rate=out_sr, data=(wav_seg * np.iinfo(np.int16).max).astype(np.int16))"
762
+ ],
763
+ "metadata": {
764
+ "id": "NdoD-ZnIaWhN"
765
+ },
766
+ "execution_count": null,
767
+ "outputs": []
768
+ },
769
+ {
770
+ "cell_type": "code",
771
+ "source": [
772
+ "whisper_size = \"medium\"\n",
773
+ "whisper_model = whisper.load_model(whisper_size)"
774
+ ],
775
+ "metadata": {
776
+ "id": "yXrxpjEGaWlT",
777
+ "colab": {
778
+ "base_uri": "https://localhost:8080/"
779
+ },
780
+ "outputId": "5fa21ff1-9b8b-4e5a-c45f-c97951ea12e2"
781
+ },
782
+ "execution_count": null,
783
+ "outputs": [
784
+ {
785
+ "output_type": "stream",
786
+ "name": "stderr",
787
+ "text": [
788
+ "100%|██████████████████████████████████████| 1.42G/1.42G [00:08<00:00, 190MiB/s]\n"
789
+ ]
790
+ }
791
+ ]
792
+ },
793
+ {
794
+ "cell_type": "markdown",
795
+ "source": [
796
+ "## 需要新建两个文件夹,分别是:\"output_training_data\", \"pretrain_work_dir\""
797
+ ],
798
+ "metadata": {
799
+ "id": "ccQC4ZcWbtXy"
800
+ }
801
+ },
802
+ {
803
+ "cell_type": "code",
804
+ "source": [
805
+ "from modelscope.tools import run_auto_label\n",
806
+ "\n",
807
+ "import os\n",
808
+ "from modelscope.models.audio.tts import SambertHifigan\n",
809
+ "from modelscope.pipelines import pipeline\n",
810
+ "from modelscope.utils.constant import Tasks\n",
811
+ "\n",
812
+ "from modelscope.metainfo import Trainers\n",
813
+ "from modelscope.trainers import build_trainer\n",
814
+ "from modelscope.utils.audio.audio_utils import TtsTrainType\n",
815
+ "\n",
816
+ "pretrained_model_id = 'damo/speech_personal_sambert-hifigan_nsf_tts_zh-cn_pretrain_16k'\n",
817
+ "\n",
818
+ "dataset_id = \"./output_training_data/\"\n",
819
+ "pretrain_work_dir = \"./pretrain_work_dir/\"\n",
820
+ "\n"
821
+ ],
822
+ "metadata": {
823
+ "id": "X6U1kIM8ouSs",
824
+ "colab": {
825
+ "base_uri": "https://localhost:8080/"
826
+ },
827
+ "outputId": "7edf72aa-df6e-465c-90a8-4114beb17112"
828
+ },
829
+ "execution_count": null,
830
+ "outputs": [
831
+ {
832
+ "output_type": "stream",
833
+ "name": "stderr",
834
+ "text": [
835
+ "2023-08-31 07:49:43,205 - modelscope - INFO - PyTorch version 2.0.1+cu118 Found.\n",
836
+ "2023-08-31 07:49:43,208 - modelscope - INFO - TensorFlow version 2.12.0 Found.\n",
837
+ "2023-08-31 07:49:43,209 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer\n",
838
+ "2023-08-31 07:49:43,212 - modelscope - INFO - No valid ast index found from /root/.cache/modelscope/ast_indexer, generating ast index from prebuilt!\n",
839
+ "2023-08-31 07:49:43,268 - modelscope - INFO - Loading done! Current index file version is 1.8.4, with md5 0b679d299d0b8626e3c5221da77c0ae7 and a total number of 902 components indexed\n"
840
+ ]
841
+ }
842
+ ]
843
+ },
844
+ {
845
+ "cell_type": "code",
846
+ "source": [
847
+ "def auto_label(audio):\n",
848
+ " try:\n",
849
+ " split_long_audio(whisper_model, audio, \"test_wavs\")\n",
850
+ " os.makedirs(\"output_training_data\", exist_ok=True)\n",
851
+ " input_wav = \"./test_wavs/\"\n",
852
+ " output_data = \"./output_training_data/\"\n",
853
+ " ret, report = run_auto_label(input_wav=input_wav, work_dir=output_data, resource_revision=\"v1.0.7\")\n",
854
+ "\n",
855
+ " except Exception:\n",
856
+ " pass\n",
857
+ " return \"标注成功\""
858
+ ],
859
+ "metadata": {
860
+ "id": "uq5Jdd7umcvj"
861
+ },
862
+ "execution_count": null,
863
+ "outputs": []
864
+ },
865
+ {
866
+ "cell_type": "code",
867
+ "source": [
868
+ "def train(a):\n",
869
+ " try:\n",
870
+ " os.makedirs(\"pretrain_work_dir\", exist_ok=True)\n",
871
+ "\n",
872
+ " train_info = {\n",
873
+ " TtsTrainType.TRAIN_TYPE_SAMBERT: { # 配置训练AM(sambert)模型\n",
874
+ " 'train_steps': 52, # 训练多少个step\n",
875
+ " 'save_interval_steps': 50, # 每训练多少个step保存一次checkpoint\n",
876
+ " 'log_interval': 10 # 每训练多少个step打印一次训练日志\n",
877
+ " }\n",
878
+ " }\n",
879
+ "\n",
880
+ " # 配置训练参数,指定数据集,临时工作目录和train_info\n",
881
+ " kwargs = dict(\n",
882
+ " model=pretrained_model_id, # 指定要finetune的模型\n",
883
+ " model_revision = \"v1.0.6\",\n",
884
+ " work_dir=pretrain_work_dir, # 指定临时工作目录\n",
885
+ " train_dataset=dataset_id, # 指定数据集id\n",
886
+ " train_type=train_info # 指定要训练类型及参数\n",
887
+ " )\n",
888
+ "\n",
889
+ " trainer = build_trainer(Trainers.speech_kantts_trainer,\n",
890
+ " default_args=kwargs)\n",
891
+ "\n",
892
+ " trainer.train()\n",
893
+ "\n",
894
+ " except Exception:\n",
895
+ " pass\n",
896
+ "\n",
897
+ " return \"训练完成\"\n"
898
+ ],
899
+ "metadata": {
900
+ "id": "36jXpTLyoO3s"
901
+ },
902
+ "execution_count": null,
903
+ "outputs": []
904
+ },
905
+ {
906
+ "cell_type": "code",
907
+ "source": [
908
+ "import random\n",
909
+ "\n",
910
+ "def infer(text):\n",
911
+ "\n",
912
+ " model_dir = os.path.abspath(\"./pretrain_work_dir\")\n",
913
+ "\n",
914
+ " custom_infer_abs = {\n",
915
+ " 'voice_name':\n",
916
+ " 'F7',\n",
917
+ " 'am_ckpt':\n",
918
+ " os.path.join(model_dir, 'tmp_am', 'ckpt'),\n",
919
+ " 'am_config':\n",
920
+ " os.path.join(model_dir, 'tmp_am', 'config.yaml'),\n",
921
+ " 'voc_ckpt':\n",
922
+ " os.path.join(model_dir, 'orig_model', 'basemodel_16k', 'hifigan', 'ckpt'),\n",
923
+ " 'voc_config':\n",
924
+ " os.path.join(model_dir, 'orig_model', 'basemodel_16k', 'hifigan',\n",
925
+ " 'config.yaml'),\n",
926
+ " 'audio_config':\n",
927
+ " os.path.join(model_dir, 'data', 'audio_config.yaml'),\n",
928
+ " 'se_file':\n",
929
+ " os.path.join(model_dir, 'data', 'se', 'se.npy')\n",
930
+ " }\n",
931
+ " kwargs = {'custom_ckpt': custom_infer_abs}\n",
932
+ "\n",
933
+ " model_id = SambertHifigan(os.path.join(model_dir, \"orig_model\"), **kwargs)\n",
934
+ "\n",
935
+ " inference = pipeline(task=Tasks.text_to_speech, model=model_id)\n",
936
+ " output = inference(input=text)\n",
937
+ "\n",
938
+ " filename = str(random.randint(1, 1000000000000))\n",
939
+ "\n",
940
+ " with open(filename + \"myfile.wav\", mode='bx') as f:\n",
941
+ " f.write(output[\"output_wav\"])\n",
942
+ " return filename + \"myfile.wav\"\n"
943
+ ],
944
+ "metadata": {
945
+ "id": "qw7KYommooFU"
946
+ },
947
+ "execution_count": null,
948
+ "outputs": []
949
+ },
950
+ {
951
+ "cell_type": "code",
952
+ "source": [
953
+ "pip install gradio"
954
+ ],
955
+ "metadata": {
956
+ "id": "GNJhguT6q4ej",
957
+ "colab": {
958
+ "base_uri": "https://localhost:8080/"
959
+ },
960
+ "outputId": "cba0f880-4dc5-40a1-9fa5-2d2c42b556a4"
961
+ },
962
+ "execution_count": null,
963
+ "outputs": [
964
+ {
965
+ "output_type": "stream",
966
+ "name": "stdout",
967
+ "text": [
968
+ "Collecting gradio\n",
969
+ " Downloading gradio-3.41.2-py3-none-any.whl (20.1 MB)\n",
970
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m20.1/20.1 MB\u001b[0m \u001b[31m42.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
971
+ "\u001b[?25hCollecting aiofiles<24.0,>=22.0 (from gradio)\n",
972
+ " Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
973
+ "Requirement already satisfied: altair<6.0,>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.2.2)\n",
974
+ "Collecting fastapi (from gradio)\n",
975
+ " Downloading fastapi-0.103.0-py3-none-any.whl (66 kB)\n",
976
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m66.2/66.2 kB\u001b[0m \u001b[31m8.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
977
+ "\u001b[?25hCollecting ffmpy (from gradio)\n",
978
+ " Downloading ffmpy-0.3.1.tar.gz (5.5 kB)\n",
979
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
980
+ "Collecting gradio-client==0.5.0 (from gradio)\n",
981
+ " Downloading gradio_client-0.5.0-py3-none-any.whl (298 kB)\n",
982
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m298.2/298.2 kB\u001b[0m \u001b[31m30.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
983
+ "\u001b[?25hCollecting httpx (from gradio)\n",
984
+ " Downloading httpx-0.24.1-py3-none-any.whl (75 kB)\n",
985
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.4/75.4 kB\u001b[0m \u001b[31m9.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
986
+ "\u001b[?25hRequirement already satisfied: huggingface-hub>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.16.4)\n",
987
+ "Requirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.1)\n",
988
+ "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.1.2)\n",
989
+ "Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.1.3)\n",
990
+ "Requirement already satisfied: matplotlib~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.7.1)\n",
991
+ "Requirement already satisfied: numpy~=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.22.0)\n",
992
+ "Collecting orjson~=3.0 (from gradio)\n",
993
+ " Downloading orjson-3.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (139 kB)\n",
994
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m139.9/139.9 kB\u001b[0m \u001b[31m17.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
995
+ "\u001b[?25hRequirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio) (23.1)\n",
996
+ "Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.5.3)\n",
997
+ "Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (9.4.0)\n",
998
+ "Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.2.1)\n",
999
+ "Collecting pydub (from gradio)\n",
1000
+ " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
1001
+ "Collecting python-multipart (from gradio)\n",
1002
+ " Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)\n",
1003
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m5.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
1004
+ "\u001b[?25hRequirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.1)\n",
1005
+ "Requirement already satisfied: requests~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.31.0)\n",
1006
+ "Collecting semantic-version~=2.0 (from gradio)\n",
1007
+ " Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
1008
+ "Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.7.1)\n",
1009
+ "Collecting uvicorn>=0.14.0 (from gradio)\n",
1010
+ " Downloading uvicorn-0.23.2-py3-none-any.whl (59 kB)\n",
1011
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.5/59.5 kB\u001b[0m \u001b[31m7.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
1012
+ "\u001b[?25hCollecting websockets<12.0,>=10.0 (from gradio)\n",
1013
+ " Downloading websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)\n",
1014
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m16.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
1015
+ "\u001b[?25hRequirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==0.5.0->gradio) (2023.6.0)\n",
1016
+ "Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio) (0.4)\n",
1017
+ "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio) (4.19.0)\n",
1018
+ "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio) (0.12.0)\n",
1019
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.14.0->gradio) (3.12.2)\n",
1020
+ "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.14.0->gradio) (4.66.1)\n",
1021
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (1.1.0)\n",
1022
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (0.11.0)\n",
1023
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (4.42.1)\n",
1024
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (1.4.4)\n",
1025
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (3.1.1)\n",
1026
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (2.8.2)\n",
1027
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2023.3)\n",
1028
+ "Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio) (0.5.0)\n",
1029
+ "Requirement already satisfied: pydantic-core==2.6.1 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio) (2.6.1)\n",
1030
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (3.2.0)\n",
1031
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (3.4)\n",
1032
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (2.0.4)\n",
1033
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (2023.7.22)\n",
1034
+ "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn>=0.14.0->gradio) (8.1.7)\n",
1035
+ "Collecting h11>=0.8 (from uvicorn>=0.14.0->gradio)\n",
1036
+ " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
1037
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
1038
+ "\u001b[?25hCollecting starlette<0.28.0,>=0.27.0 (from fastapi->gradio)\n",
1039
+ " Downloading starlette-0.27.0-py3-none-any.whl (66 kB)\n",
1040
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m8.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
1041
+ "\u001b[?25hCollecting httpcore<0.18.0,>=0.15.0 (from httpx->gradio)\n",
1042
+ " Downloading httpcore-0.17.3-py3-none-any.whl (74 kB)\n",
1043
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m74.5/74.5 kB\u001b[0m \u001b[31m9.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
1044
+ "\u001b[?25hRequirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->gradio) (1.3.0)\n",
1045
+ "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from httpcore<0.18.0,>=0.15.0->httpx->gradio) (3.7.1)\n",
1046
+ "Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (23.1.0)\n",
1047
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (2023.7.1)\n",
1048
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.30.2)\n",
1049
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.9.2)\n",
1050
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)\n",
1051
+ "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->httpcore<0.18.0,>=0.15.0->httpx->gradio) (1.1.3)\n",
1052
+ "Building wheels for collected packages: ffmpy\n",
1053
+ " Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
1054
+ " Created wheel for ffmpy: filename=ffmpy-0.3.1-py3-none-any.whl size=5579 sha256=050e26280ad1f47f4cc51ef4bd0044dadd4befcb088f21983acc55ff71a10c87\n",
1055
+ " Stored in directory: /root/.cache/pip/wheels/01/a6/d1/1c0828c304a4283b2c1639a09ad86f83d7c487ef34c6b4a1bf\n",
1056
+ "Successfully built ffmpy\n",
1057
+ "Installing collected packages: pydub, ffmpy, websockets, semantic-version, python-multipart, orjson, h11, aiofiles, uvicorn, starlette, httpcore, httpx, fastapi, gradio-client, gradio\n",
1058
+ "Successfully installed aiofiles-23.2.1 fastapi-0.103.0 ffmpy-0.3.1 gradio-3.41.2 gradio-client-0.5.0 h11-0.14.0 httpcore-0.17.3 httpx-0.24.1 orjson-3.9.5 pydub-0.25.1 python-multipart-0.0.6 semantic-version-2.10.0 starlette-0.27.0 uvicorn-0.23.2 websockets-11.0.3\n"
1059
+ ]
1060
+ }
1061
+ ]
1062
+ },
1063
+ {
1064
+ "cell_type": "code",
1065
+ "source": [
1066
+ "import gradio as gr"
1067
+ ],
1068
+ "metadata": {
1069
+ "id": "e30tBe6vtzGU"
1070
+ },
1071
+ "execution_count": null,
1072
+ "outputs": []
1073
+ },
1074
+ {
1075
+ "cell_type": "code",
1076
+ "source": [
1077
+ "app = gr.Blocks()\n",
1078
+ "\n",
1079
+ "with app:\n",
1080
+ " gr.Markdown(\"# <center>🥳🎶🎡 - Sambert中文声音克隆</center>\")\n",
1081
+ " gr.Markdown(\"## <center>🌟 - 训练3分钟,推理5秒钟,中英自然发音 </center>\")\n",
1082
+ " gr.Markdown(\"### <center>🌊 - 更多精彩应用,敬请关注[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>\")\n",
1083
+ "\n",
1084
+ " with gr.Row():\n",
1085
+ " inp1 = gr.Audio(type=\"filepath\", label=\"请上传一段音频\")\n",
1086
+ " out1 = gr.Textbox(label=\"标注情况\", lines=1, interactive=False)\n",
1087
+ "\n",
1088
+ " out2 = gr.Textbox(label=\"训练情况\", lines=1, interactive=False)\n",
1089
+ " inp2 = gr.Textbox(label=\"文本\", lines=3)\n",
1090
+ " out3 = gr.Audio(type=\"filepath\", label=\"合成的音频\")\n",
1091
+ " btn1 = gr.Button(\"标注数据\")\n",
1092
+ " btn2 = gr.Button(\"训练\")\n",
1093
+ " btn3 = gr.Button(\"推理\")\n",
1094
+ "\n",
1095
+ " btn1.click(auto_label, inp1, out1)\n",
1096
+ " btn2.click(train, out1, out2)\n",
1097
+ " btn3.click(infer, inp2, out3)\n",
1098
+ "\n",
1099
+ " gr.Markdown(\"### <center>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。</center>\")\n",
1100
+ " gr.HTML('''\n",
1101
+ " <div class=\"footer\">\n",
1102
+ " <p>🌊🏞️🎶 - 江水东流急,滔滔无尽声。 明·顾璘\n",
1103
+ " </p>\n",
1104
+ " </div>\n",
1105
+ " ''')\n",
1106
+ "app.launch(show_error=True)"
1107
+ ],
1108
+ "metadata": {
1109
+ "id": "P03LT9IOrq2C",
1110
+ "colab": {
1111
+ "base_uri": "https://localhost:8080/",
1112
+ "height": 617
1113
+ },
1114
+ "outputId": "1a0453cf-b81e-442b-e1fe-130dea4be07a"
1115
+ },
1116
+ "execution_count": null,
1117
+ "outputs": [
1118
+ {
1119
+ "output_type": "stream",
1120
+ "name": "stdout",
1121
+ "text": [
1122
+ "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
1123
+ "Note: opening Chrome Inspector may crash demo inside Colab notebooks.\n",
1124
+ "\n",
1125
+ "To create a public link, set `share=True` in `launch()`.\n"
1126
+ ]
1127
+ },
1128
+ {
1129
+ "output_type": "display_data",
1130
+ "data": {
1131
+ "text/plain": [
1132
+ "<IPython.core.display.Javascript object>"
1133
+ ],
1134
+ "application/javascript": [
1135
+ "(async (port, path, width, height, cache, element) => {\n",
1136
+ " if (!google.colab.kernel.accessAllowed && !cache) {\n",
1137
+ " return;\n",
1138
+ " }\n",
1139
+ " element.appendChild(document.createTextNode(''));\n",
1140
+ " const url = await google.colab.kernel.proxyPort(port, {cache});\n",
1141
+ "\n",
1142
+ " const external_link = document.createElement('div');\n",
1143
+ " external_link.innerHTML = `\n",
1144
+ " <div style=\"font-family: monospace; margin-bottom: 0.5rem\">\n",
1145
+ " Running on <a href=${new URL(path, url).toString()} target=\"_blank\">\n",
1146
+ " https://localhost:${port}${path}\n",
1147
+ " </a>\n",
1148
+ " </div>\n",
1149
+ " `;\n",
1150
+ " element.appendChild(external_link);\n",
1151
+ "\n",
1152
+ " const iframe = document.createElement('iframe');\n",
1153
+ " iframe.src = new URL(path, url).toString();\n",
1154
+ " iframe.height = height;\n",
1155
+ " iframe.allow = \"autoplay; camera; microphone; clipboard-read; clipboard-write;\"\n",
1156
+ " iframe.width = width;\n",
1157
+ " iframe.style.border = 0;\n",
1158
+ " element.appendChild(iframe);\n",
1159
+ " })(7860, \"/\", \"100%\", 500, false, window.element)"
1160
+ ]
1161
+ },
1162
+ "metadata": {}
1163
+ },
1164
+ {
1165
+ "output_type": "execute_result",
1166
+ "data": {
1167
+ "text/plain": []
1168
+ },
1169
+ "metadata": {},
1170
+ "execution_count": 12
1171
+ }
1172
+ ]
1173
+ },
1174
+ {
1175
+ "cell_type": "code",
1176
+ "source": [
1177
+ "#infer(\"欢迎使用滔滔智能的声音克隆产品\")"
1178
+ ],
1179
+ "metadata": {
1180
+ "id": "YCm0L5U9tmP9"
1181
+ },
1182
+ "execution_count": null,
1183
+ "outputs": []
1184
+ },
1185
+ {
1186
+ "cell_type": "code",
1187
+ "source": [],
1188
+ "metadata": {
1189
+ "id": "onmCp6Ou2Lqb"
1190
+ },
1191
+ "execution_count": null,
1192
+ "outputs": []
1193
+ }
1194
+ ]
1195
+ }
VALL_E_X.ipynb ADDED
@@ -0,0 +1,877 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "machine_shape": "hm",
8
+ "gpuType": "T4",
9
+ "authorship_tag": "ABX9TyMO/tpgj4AoYNCrsOSYZTus",
10
+ "include_colab_link": true
11
+ },
12
+ "kernelspec": {
13
+ "name": "python3",
14
+ "display_name": "Python 3"
15
+ },
16
+ "language_info": {
17
+ "name": "python"
18
+ },
19
+ "accelerator": "GPU",
20
+ "widgets": {
21
+ "application/vnd.jupyter.widget-state+json": {
22
+ "a31c166927d64e228ba4ff68cf5144d5": {
23
+ "model_module": "@jupyter-widgets/controls",
24
+ "model_name": "HBoxModel",
25
+ "model_module_version": "1.5.0",
26
+ "state": {
27
+ "_dom_classes": [],
28
+ "_model_module": "@jupyter-widgets/controls",
29
+ "_model_module_version": "1.5.0",
30
+ "_model_name": "HBoxModel",
31
+ "_view_count": null,
32
+ "_view_module": "@jupyter-widgets/controls",
33
+ "_view_module_version": "1.5.0",
34
+ "_view_name": "HBoxView",
35
+ "box_style": "",
36
+ "children": [
37
+ "IPY_MODEL_f261808bc2ad4f46b1ec886d0413c1b5",
38
+ "IPY_MODEL_61d1129560064d43a6d46bffb9a60e08",
39
+ "IPY_MODEL_c23321a1d5bf4f48bc41c11ca8dc826f"
40
+ ],
41
+ "layout": "IPY_MODEL_79ecdcce6e384ab58d8beb82bdead39a"
42
+ }
43
+ },
44
+ "f261808bc2ad4f46b1ec886d0413c1b5": {
45
+ "model_module": "@jupyter-widgets/controls",
46
+ "model_name": "HTMLModel",
47
+ "model_module_version": "1.5.0",
48
+ "state": {
49
+ "_dom_classes": [],
50
+ "_model_module": "@jupyter-widgets/controls",
51
+ "_model_module_version": "1.5.0",
52
+ "_model_name": "HTMLModel",
53
+ "_view_count": null,
54
+ "_view_module": "@jupyter-widgets/controls",
55
+ "_view_module_version": "1.5.0",
56
+ "_view_name": "HTMLView",
57
+ "description": "",
58
+ "description_tooltip": null,
59
+ "layout": "IPY_MODEL_cf8057b3e32d45239695043cdd72b70c",
60
+ "placeholder": "​",
61
+ "style": "IPY_MODEL_72d69bbcf94e414a8cff0c0153d88a4a",
62
+ "value": "100%"
63
+ }
64
+ },
65
+ "61d1129560064d43a6d46bffb9a60e08": {
66
+ "model_module": "@jupyter-widgets/controls",
67
+ "model_name": "FloatProgressModel",
68
+ "model_module_version": "1.5.0",
69
+ "state": {
70
+ "_dom_classes": [],
71
+ "_model_module": "@jupyter-widgets/controls",
72
+ "_model_module_version": "1.5.0",
73
+ "_model_name": "FloatProgressModel",
74
+ "_view_count": null,
75
+ "_view_module": "@jupyter-widgets/controls",
76
+ "_view_module_version": "1.5.0",
77
+ "_view_name": "ProgressView",
78
+ "bar_style": "success",
79
+ "description": "",
80
+ "description_tooltip": null,
81
+ "layout": "IPY_MODEL_d83db74172ed438f9769e55615c80336",
82
+ "max": 93171529,
83
+ "min": 0,
84
+ "orientation": "horizontal",
85
+ "style": "IPY_MODEL_319be19d267b4d65bfc83ecb717daabe",
86
+ "value": 93171529
87
+ }
88
+ },
89
+ "c23321a1d5bf4f48bc41c11ca8dc826f": {
90
+ "model_module": "@jupyter-widgets/controls",
91
+ "model_name": "HTMLModel",
92
+ "model_module_version": "1.5.0",
93
+ "state": {
94
+ "_dom_classes": [],
95
+ "_model_module": "@jupyter-widgets/controls",
96
+ "_model_module_version": "1.5.0",
97
+ "_model_name": "HTMLModel",
98
+ "_view_count": null,
99
+ "_view_module": "@jupyter-widgets/controls",
100
+ "_view_module_version": "1.5.0",
101
+ "_view_name": "HTMLView",
102
+ "description": "",
103
+ "description_tooltip": null,
104
+ "layout": "IPY_MODEL_7e1c68ee7f1e4ba8a53dcd4f2dc4350e",
105
+ "placeholder": "​",
106
+ "style": "IPY_MODEL_eb5fa81975c341d1b49427b3552bc5be",
107
+ "value": " 88.9M/88.9M [00:00&lt;00:00, 190MB/s]"
108
+ }
109
+ },
110
+ "79ecdcce6e384ab58d8beb82bdead39a": {
111
+ "model_module": "@jupyter-widgets/base",
112
+ "model_name": "LayoutModel",
113
+ "model_module_version": "1.2.0",
114
+ "state": {
115
+ "_model_module": "@jupyter-widgets/base",
116
+ "_model_module_version": "1.2.0",
117
+ "_model_name": "LayoutModel",
118
+ "_view_count": null,
119
+ "_view_module": "@jupyter-widgets/base",
120
+ "_view_module_version": "1.2.0",
121
+ "_view_name": "LayoutView",
122
+ "align_content": null,
123
+ "align_items": null,
124
+ "align_self": null,
125
+ "border": null,
126
+ "bottom": null,
127
+ "display": null,
128
+ "flex": null,
129
+ "flex_flow": null,
130
+ "grid_area": null,
131
+ "grid_auto_columns": null,
132
+ "grid_auto_flow": null,
133
+ "grid_auto_rows": null,
134
+ "grid_column": null,
135
+ "grid_gap": null,
136
+ "grid_row": null,
137
+ "grid_template_areas": null,
138
+ "grid_template_columns": null,
139
+ "grid_template_rows": null,
140
+ "height": null,
141
+ "justify_content": null,
142
+ "justify_items": null,
143
+ "left": null,
144
+ "margin": null,
145
+ "max_height": null,
146
+ "max_width": null,
147
+ "min_height": null,
148
+ "min_width": null,
149
+ "object_fit": null,
150
+ "object_position": null,
151
+ "order": null,
152
+ "overflow": null,
153
+ "overflow_x": null,
154
+ "overflow_y": null,
155
+ "padding": null,
156
+ "right": null,
157
+ "top": null,
158
+ "visibility": null,
159
+ "width": null
160
+ }
161
+ },
162
+ "cf8057b3e32d45239695043cdd72b70c": {
163
+ "model_module": "@jupyter-widgets/base",
164
+ "model_name": "LayoutModel",
165
+ "model_module_version": "1.2.0",
166
+ "state": {
167
+ "_model_module": "@jupyter-widgets/base",
168
+ "_model_module_version": "1.2.0",
169
+ "_model_name": "LayoutModel",
170
+ "_view_count": null,
171
+ "_view_module": "@jupyter-widgets/base",
172
+ "_view_module_version": "1.2.0",
173
+ "_view_name": "LayoutView",
174
+ "align_content": null,
175
+ "align_items": null,
176
+ "align_self": null,
177
+ "border": null,
178
+ "bottom": null,
179
+ "display": null,
180
+ "flex": null,
181
+ "flex_flow": null,
182
+ "grid_area": null,
183
+ "grid_auto_columns": null,
184
+ "grid_auto_flow": null,
185
+ "grid_auto_rows": null,
186
+ "grid_column": null,
187
+ "grid_gap": null,
188
+ "grid_row": null,
189
+ "grid_template_areas": null,
190
+ "grid_template_columns": null,
191
+ "grid_template_rows": null,
192
+ "height": null,
193
+ "justify_content": null,
194
+ "justify_items": null,
195
+ "left": null,
196
+ "margin": null,
197
+ "max_height": null,
198
+ "max_width": null,
199
+ "min_height": null,
200
+ "min_width": null,
201
+ "object_fit": null,
202
+ "object_position": null,
203
+ "order": null,
204
+ "overflow": null,
205
+ "overflow_x": null,
206
+ "overflow_y": null,
207
+ "padding": null,
208
+ "right": null,
209
+ "top": null,
210
+ "visibility": null,
211
+ "width": null
212
+ }
213
+ },
214
+ "72d69bbcf94e414a8cff0c0153d88a4a": {
215
+ "model_module": "@jupyter-widgets/controls",
216
+ "model_name": "DescriptionStyleModel",
217
+ "model_module_version": "1.5.0",
218
+ "state": {
219
+ "_model_module": "@jupyter-widgets/controls",
220
+ "_model_module_version": "1.5.0",
221
+ "_model_name": "DescriptionStyleModel",
222
+ "_view_count": null,
223
+ "_view_module": "@jupyter-widgets/base",
224
+ "_view_module_version": "1.2.0",
225
+ "_view_name": "StyleView",
226
+ "description_width": ""
227
+ }
228
+ },
229
+ "d83db74172ed438f9769e55615c80336": {
230
+ "model_module": "@jupyter-widgets/base",
231
+ "model_name": "LayoutModel",
232
+ "model_module_version": "1.2.0",
233
+ "state": {
234
+ "_model_module": "@jupyter-widgets/base",
235
+ "_model_module_version": "1.2.0",
236
+ "_model_name": "LayoutModel",
237
+ "_view_count": null,
238
+ "_view_module": "@jupyter-widgets/base",
239
+ "_view_module_version": "1.2.0",
240
+ "_view_name": "LayoutView",
241
+ "align_content": null,
242
+ "align_items": null,
243
+ "align_self": null,
244
+ "border": null,
245
+ "bottom": null,
246
+ "display": null,
247
+ "flex": null,
248
+ "flex_flow": null,
249
+ "grid_area": null,
250
+ "grid_auto_columns": null,
251
+ "grid_auto_flow": null,
252
+ "grid_auto_rows": null,
253
+ "grid_column": null,
254
+ "grid_gap": null,
255
+ "grid_row": null,
256
+ "grid_template_areas": null,
257
+ "grid_template_columns": null,
258
+ "grid_template_rows": null,
259
+ "height": null,
260
+ "justify_content": null,
261
+ "justify_items": null,
262
+ "left": null,
263
+ "margin": null,
264
+ "max_height": null,
265
+ "max_width": null,
266
+ "min_height": null,
267
+ "min_width": null,
268
+ "object_fit": null,
269
+ "object_position": null,
270
+ "order": null,
271
+ "overflow": null,
272
+ "overflow_x": null,
273
+ "overflow_y": null,
274
+ "padding": null,
275
+ "right": null,
276
+ "top": null,
277
+ "visibility": null,
278
+ "width": null
279
+ }
280
+ },
281
+ "319be19d267b4d65bfc83ecb717daabe": {
282
+ "model_module": "@jupyter-widgets/controls",
283
+ "model_name": "ProgressStyleModel",
284
+ "model_module_version": "1.5.0",
285
+ "state": {
286
+ "_model_module": "@jupyter-widgets/controls",
287
+ "_model_module_version": "1.5.0",
288
+ "_model_name": "ProgressStyleModel",
289
+ "_view_count": null,
290
+ "_view_module": "@jupyter-widgets/base",
291
+ "_view_module_version": "1.2.0",
292
+ "_view_name": "StyleView",
293
+ "bar_color": null,
294
+ "description_width": ""
295
+ }
296
+ },
297
+ "7e1c68ee7f1e4ba8a53dcd4f2dc4350e": {
298
+ "model_module": "@jupyter-widgets/base",
299
+ "model_name": "LayoutModel",
300
+ "model_module_version": "1.2.0",
301
+ "state": {
302
+ "_model_module": "@jupyter-widgets/base",
303
+ "_model_module_version": "1.2.0",
304
+ "_model_name": "LayoutModel",
305
+ "_view_count": null,
306
+ "_view_module": "@jupyter-widgets/base",
307
+ "_view_module_version": "1.2.0",
308
+ "_view_name": "LayoutView",
309
+ "align_content": null,
310
+ "align_items": null,
311
+ "align_self": null,
312
+ "border": null,
313
+ "bottom": null,
314
+ "display": null,
315
+ "flex": null,
316
+ "flex_flow": null,
317
+ "grid_area": null,
318
+ "grid_auto_columns": null,
319
+ "grid_auto_flow": null,
320
+ "grid_auto_rows": null,
321
+ "grid_column": null,
322
+ "grid_gap": null,
323
+ "grid_row": null,
324
+ "grid_template_areas": null,
325
+ "grid_template_columns": null,
326
+ "grid_template_rows": null,
327
+ "height": null,
328
+ "justify_content": null,
329
+ "justify_items": null,
330
+ "left": null,
331
+ "margin": null,
332
+ "max_height": null,
333
+ "max_width": null,
334
+ "min_height": null,
335
+ "min_width": null,
336
+ "object_fit": null,
337
+ "object_position": null,
338
+ "order": null,
339
+ "overflow": null,
340
+ "overflow_x": null,
341
+ "overflow_y": null,
342
+ "padding": null,
343
+ "right": null,
344
+ "top": null,
345
+ "visibility": null,
346
+ "width": null
347
+ }
348
+ },
349
+ "eb5fa81975c341d1b49427b3552bc5be": {
350
+ "model_module": "@jupyter-widgets/controls",
351
+ "model_name": "DescriptionStyleModel",
352
+ "model_module_version": "1.5.0",
353
+ "state": {
354
+ "_model_module": "@jupyter-widgets/controls",
355
+ "_model_module_version": "1.5.0",
356
+ "_model_name": "DescriptionStyleModel",
357
+ "_view_count": null,
358
+ "_view_module": "@jupyter-widgets/base",
359
+ "_view_module_version": "1.2.0",
360
+ "_view_name": "StyleView",
361
+ "description_width": ""
362
+ }
363
+ }
364
+ }
365
+ }
366
+ },
367
+ "cells": [
368
+ {
369
+ "cell_type": "markdown",
370
+ "metadata": {
371
+ "id": "view-in-github",
372
+ "colab_type": "text"
373
+ },
374
+ "source": [
375
+ "<a href=\"https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/VALL_E_X.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
376
+ ]
377
+ },
378
+ {
379
+ "cell_type": "code",
380
+ "execution_count": 1,
381
+ "metadata": {
382
+ "colab": {
383
+ "base_uri": "https://localhost:8080/",
384
+ "height": 1000,
385
+ "referenced_widgets": [
386
+ "a31c166927d64e228ba4ff68cf5144d5",
387
+ "f261808bc2ad4f46b1ec886d0413c1b5",
388
+ "61d1129560064d43a6d46bffb9a60e08",
389
+ "c23321a1d5bf4f48bc41c11ca8dc826f",
390
+ "79ecdcce6e384ab58d8beb82bdead39a",
391
+ "cf8057b3e32d45239695043cdd72b70c",
392
+ "72d69bbcf94e414a8cff0c0153d88a4a",
393
+ "d83db74172ed438f9769e55615c80336",
394
+ "319be19d267b4d65bfc83ecb717daabe",
395
+ "7e1c68ee7f1e4ba8a53dcd4f2dc4350e",
396
+ "eb5fa81975c341d1b49427b3552bc5be"
397
+ ]
398
+ },
399
+ "id": "IANay-8t7KA7",
400
+ "outputId": "11f6af82-b69e-4c34-8d78-78a39c938565"
401
+ },
402
+ "outputs": [
403
+ {
404
+ "output_type": "stream",
405
+ "name": "stdout",
406
+ "text": [
407
+ "Git LFS initialized.\n",
408
+ "Cloning into 'VALLE'...\n",
409
+ "remote: Enumerating objects: 166, done.\u001b[K\n",
410
+ "remote: Counting objects: 100% (77/77), done.\u001b[K\n",
411
+ "remote: Compressing objects: 100% (74/74), done.\u001b[K\n",
412
+ "remote: Total 166 (delta 36), reused 2 (delta 0), pack-reused 89\u001b[K\n",
413
+ "Receiving objects: 100% (166/166), 142.95 KiB | 822.00 KiB/s, done.\n",
414
+ "Resolving deltas: 100% (36/36), done.\n",
415
+ "Filtering content: 100% (47/47), 1.39 GiB | 5.61 MiB/s, done.\n",
416
+ "/content/VALLE\n",
417
+ "Requirement already satisfied: soundfile in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 1)) (0.12.1)\n",
418
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 2)) (1.23.5)\n",
419
+ "Collecting torch==1.13.0 (from -r requirements.txt (line 3))\n",
420
+ " Downloading torch-1.13.0-cp310-cp310-manylinux1_x86_64.whl (890.1 MB)\n",
421
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m890.1/890.1 MB\u001b[0m \u001b[31m2.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
422
+ "\u001b[?25hCollecting torchvision==0.14.0 (from -r requirements.txt (line 4))\n",
423
+ " Downloading torchvision-0.14.0-cp310-cp310-manylinux1_x86_64.whl (24.3 MB)\n",
424
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m24.3/24.3 MB\u001b[0m \u001b[31m40.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
425
+ "\u001b[?25hCollecting torchaudio==0.13.0 (from -r requirements.txt (line 5))\n",
426
+ " Downloading torchaudio-0.13.0-cp310-cp310-manylinux1_x86_64.whl (4.2 MB)\n",
427
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.2/4.2 MB\u001b[0m \u001b[31m107.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
428
+ "\u001b[?25hCollecting deepfilternet==0.4.0 (from -r requirements.txt (line 6))\n",
429
+ " Downloading deepfilternet-0.4.0-py3-none-any.whl (103 kB)\n",
430
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m103.8/103.8 kB\u001b[0m \u001b[31m13.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
431
+ "\u001b[?25hCollecting matplotlib==3.6 (from -r requirements.txt (line 7))\n",
432
+ " Downloading matplotlib-3.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.8 MB)\n",
433
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m11.8/11.8 MB\u001b[0m \u001b[31m97.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
434
+ "\u001b[?25hCollecting Pillow==9.3 (from -r requirements.txt (line 8))\n",
435
+ " Downloading Pillow-9.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.3 MB)\n",
436
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.3/3.3 MB\u001b[0m \u001b[31m114.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
437
+ "\u001b[?25hCollecting tokenizers (from -r requirements.txt (line 9))\n",
438
+ " Downloading tokenizers-0.13.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)\n",
439
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m132.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
440
+ "\u001b[?25hCollecting encodec (from -r requirements.txt (line 10))\n",
441
+ " Downloading encodec-0.1.1.tar.gz (3.7 MB)\n",
442
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.7/3.7 MB\u001b[0m \u001b[31m123.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
443
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
444
+ "Collecting langid (from -r requirements.txt (line 11))\n",
445
+ " Downloading langid-1.1.6.tar.gz (1.9 MB)\n",
446
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.9/1.9 MB\u001b[0m \u001b[31m94.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
447
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
448
+ "Collecting unidecode (from -r requirements.txt (line 12))\n",
449
+ " Downloading Unidecode-1.3.6-py3-none-any.whl (235 kB)\n",
450
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m235.9/235.9 kB\u001b[0m \u001b[31m26.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
451
+ "\u001b[?25hCollecting pyopenjtalk (from -r requirements.txt (line 13))\n",
452
+ " Downloading pyopenjtalk-0.3.2.tar.gz (1.4 MB)\n",
453
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.4/1.4 MB\u001b[0m \u001b[31m86.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
454
+ "\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
455
+ "Collecting pypinyin (from -r requirements.txt (line 14))\n",
456
+ " Downloading pypinyin-0.49.0-py2.py3-none-any.whl (1.4 MB)\n",
457
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.4/1.4 MB\u001b[0m \u001b[31m84.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
458
+ "\u001b[?25hRequirement already satisfied: inflect in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 15)) (7.0.0)\n",
459
+ "Collecting cn2an (from -r requirements.txt (line 16))\n",
460
+ " Downloading cn2an-0.5.22-py3-none-any.whl (224 kB)\n",
461
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m225.0/225.0 kB\u001b[0m \u001b[31m26.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
462
+ "\u001b[?25hRequirement already satisfied: jieba in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 17)) (0.42.1)\n",
463
+ "Collecting eng_to_ipa (from -r requirements.txt (line 18))\n",
464
+ " Downloading eng_to_ipa-0.0.2.tar.gz (2.8 MB)\n",
465
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.8/2.8 MB\u001b[0m \u001b[31m77.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
466
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
467
+ "Collecting SudachiPy (from -r requirements.txt (line 20))\n",
468
+ " Downloading SudachiPy-0.6.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB)\n",
469
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.2/2.2 MB\u001b[0m \u001b[31m82.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
470
+ "\u001b[?25hRequirement already satisfied: nltk in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 21)) (3.8.1)\n",
471
+ "Collecting openai-whisper (from -r requirements.txt (line 22))\n",
472
+ " Downloading openai-whisper-20230314.tar.gz (792 kB)\n",
473
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m792.9/792.9 kB\u001b[0m \u001b[31m57.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
474
+ "\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
475
+ "Collecting phonemizer (from -r requirements.txt (line 23))\n",
476
+ " Downloading phonemizer-3.2.1-py3-none-any.whl (90 kB)\n",
477
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m90.6/90.6 kB\u001b[0m \u001b[31m12.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
478
+ "\u001b[?25hCollecting gradio (from -r requirements.txt (line 25))\n",
479
+ " Downloading gradio-3.41.2-py3-none-any.whl (20.1 MB)\n",
480
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m20.1/20.1 MB\u001b[0m \u001b[31m94.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
481
+ "\u001b[?25hRequirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch==1.13.0->-r requirements.txt (line 3)) (4.7.1)\n",
482
+ "Collecting nvidia-cuda-runtime-cu11==11.7.99 (from torch==1.13.0->-r requirements.txt (line 3))\n",
483
+ " Downloading nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB)\n",
484
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m849.3/849.3 kB\u001b[0m \u001b[31m68.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
485
+ "\u001b[?25hCollecting nvidia-cudnn-cu11==8.5.0.96 (from torch==1.13.0->-r requirements.txt (line 3))\n",
486
+ " Downloading nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB)\n",
487
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m557.1/557.1 MB\u001b[0m \u001b[31m2.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
488
+ "\u001b[?25hCollecting nvidia-cublas-cu11==11.10.3.66 (from torch==1.13.0->-r requirements.txt (line 3))\n",
489
+ " Downloading nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB)\n",
490
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m317.1/317.1 MB\u001b[0m \u001b[31m3.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
491
+ "\u001b[?25hCollecting nvidia-cuda-nvrtc-cu11==11.7.99 (from torch==1.13.0->-r requirements.txt (line 3))\n",
492
+ " Downloading nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB)\n",
493
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.0/21.0 MB\u001b[0m \u001b[31m97.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
494
+ "\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from torchvision==0.14.0->-r requirements.txt (line 4)) (2.31.0)\n",
495
+ "Requirement already satisfied: appdirs<2.0,>=1.4 in /usr/local/lib/python3.10/dist-packages (from deepfilternet==0.4.0->-r requirements.txt (line 6)) (1.4.4)\n",
496
+ "Collecting deepfilterlib==0.4.0 (from deepfilternet==0.4.0->-r requirements.txt (line 6))\n",
497
+ " Downloading DeepFilterLib-0.4.0-cp310-cp310-manylinux_2_24_x86_64.whl (549 kB)\n",
498
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m549.7/549.7 kB\u001b[0m \u001b[31m53.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
499
+ "\u001b[?25hCollecting loguru>=0.5 (from deepfilternet==0.4.0->-r requirements.txt (line 6))\n",
500
+ " Downloading loguru-0.7.0-py3-none-any.whl (59 kB)\n",
501
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.0/60.0 kB\u001b[0m \u001b[31m8.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
502
+ "\u001b[?25hRequirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.6->-r requirements.txt (line 7)) (1.1.0)\n",
503
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.6->-r requirements.txt (line 7)) (0.11.0)\n",
504
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.6->-r requirements.txt (line 7)) (4.42.1)\n",
505
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.6->-r requirements.txt (line 7)) (1.4.4)\n",
506
+ "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.6->-r requirements.txt (line 7)) (23.1)\n",
507
+ "Requirement already satisfied: pyparsing>=2.2.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.6->-r requirements.txt (line 7)) (3.1.1)\n",
508
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.6->-r requirements.txt (line 7)) (2.8.2)\n",
509
+ "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from nvidia-cublas-cu11==11.10.3.66->torch==1.13.0->-r requirements.txt (line 3)) (67.7.2)\n",
510
+ "Requirement already satisfied: wheel in /usr/local/lib/python3.10/dist-packages (from nvidia-cublas-cu11==11.10.3.66->torch==1.13.0->-r requirements.txt (line 3)) (0.41.2)\n",
511
+ "Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile->-r requirements.txt (line 1)) (1.15.1)\n",
512
+ "Collecting einops (from encodec->-r requirements.txt (line 10))\n",
513
+ " Downloading einops-0.6.1-py3-none-any.whl (42 kB)\n",
514
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m42.2/42.2 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
515
+ "\u001b[?25hRequirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from pyopenjtalk->-r requirements.txt (line 13)) (1.16.0)\n",
516
+ "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from pyopenjtalk->-r requirements.txt (line 13)) (4.66.1)\n",
517
+ "Requirement already satisfied: pydantic>=1.9.1 in /usr/local/lib/python3.10/dist-packages (from inflect->-r requirements.txt (line 15)) (2.2.1)\n",
518
+ "Collecting proces>=0.1.3 (from cn2an->-r requirements.txt (line 16))\n",
519
+ " Downloading proces-0.1.6-py3-none-any.whl (249 kB)\n",
520
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m249.4/249.4 kB\u001b[0m \u001b[31m27.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
521
+ "\u001b[?25hRequirement already satisfied: click in /usr/local/lib/python3.10/dist-packages (from nltk->-r requirements.txt (line 21)) (8.1.7)\n",
522
+ "Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from nltk->-r requirements.txt (line 21)) (1.3.2)\n",
523
+ "Requirement already satisfied: regex>=2021.8.3 in /usr/local/lib/python3.10/dist-packages (from nltk->-r requirements.txt (line 21)) (2023.6.3)\n",
524
+ "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from openai-whisper->-r requirements.txt (line 22)) (2.0.0)\n",
525
+ "Requirement already satisfied: numba in /usr/local/lib/python3.10/dist-packages (from openai-whisper->-r requirements.txt (line 22)) (0.56.4)\n",
526
+ "Requirement already satisfied: more-itertools in /usr/local/lib/python3.10/dist-packages (from openai-whisper->-r requirements.txt (line 22)) (10.1.0)\n",
527
+ "Collecting tiktoken==0.3.1 (from openai-whisper->-r requirements.txt (line 22))\n",
528
+ " Downloading tiktoken-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)\n",
529
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m35.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
530
+ "\u001b[?25hCollecting ffmpeg-python==0.2.0 (from openai-whisper->-r requirements.txt (line 22))\n",
531
+ " Downloading ffmpeg_python-0.2.0-py3-none-any.whl (25 kB)\n",
532
+ "Requirement already satisfied: future in /usr/local/lib/python3.10/dist-packages (from ffmpeg-python==0.2.0->openai-whisper->-r requirements.txt (line 22)) (0.18.3)\n",
533
+ "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->openai-whisper->-r requirements.txt (line 22)) (3.27.2)\n",
534
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->openai-whisper->-r requirements.txt (line 22)) (3.12.2)\n",
535
+ "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->openai-whisper->-r requirements.txt (line 22)) (16.0.6)\n",
536
+ "Collecting segments (from phonemizer->-r requirements.txt (line 23))\n",
537
+ " Downloading segments-2.2.1-py2.py3-none-any.whl (15 kB)\n",
538
+ "Requirement already satisfied: attrs>=18.1 in /usr/local/lib/python3.10/dist-packages (from phonemizer->-r requirements.txt (line 23)) (23.1.0)\n",
539
+ "Collecting dlinfo (from phonemizer->-r requirements.txt (line 23))\n",
540
+ " Downloading dlinfo-1.2.1-py3-none-any.whl (3.6 kB)\n",
541
+ "Collecting aiofiles<24.0,>=22.0 (from gradio->-r requirements.txt (line 25))\n",
542
+ " Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
543
+ "Requirement already satisfied: altair<6.0,>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 25)) (4.2.2)\n",
544
+ "Collecting fastapi (from gradio->-r requirements.txt (line 25))\n",
545
+ " Downloading fastapi-0.102.0-py3-none-any.whl (66 kB)\n",
546
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m66.0/66.0 kB\u001b[0m \u001b[31m9.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
547
+ "\u001b[?25hCollecting ffmpy (from gradio->-r requirements.txt (line 25))\n",
548
+ " Downloading ffmpy-0.3.1.tar.gz (5.5 kB)\n",
549
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
550
+ "Collecting gradio-client==0.5.0 (from gradio->-r requirements.txt (line 25))\n",
551
+ " Downloading gradio_client-0.5.0-py3-none-any.whl (298 kB)\n",
552
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m298.2/298.2 kB\u001b[0m \u001b[31m35.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
553
+ "\u001b[?25hCollecting httpx (from gradio->-r requirements.txt (line 25))\n",
554
+ " Downloading httpx-0.24.1-py3-none-any.whl (75 kB)\n",
555
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.4/75.4 kB\u001b[0m \u001b[31m10.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
556
+ "\u001b[?25hCollecting huggingface-hub>=0.14.0 (from gradio->-r requirements.txt (line 25))\n",
557
+ " Downloading huggingface_hub-0.16.4-py3-none-any.whl (268 kB)\n",
558
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m268.8/268.8 kB\u001b[0m \u001b[31m29.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
559
+ "\u001b[?25hRequirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 25)) (6.0.1)\n",
560
+ "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 25)) (3.1.2)\n",
561
+ "Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 25)) (2.1.3)\n",
562
+ "Collecting orjson~=3.0 (from gradio->-r requirements.txt (line 25))\n",
563
+ " Downloading orjson-3.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (139 kB)\n",
564
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m139.9/139.9 kB\u001b[0m \u001b[31m18.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
565
+ "\u001b[?25hRequirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 25)) (1.5.3)\n",
566
+ "Collecting pydub (from gradio->-r requirements.txt (line 25))\n",
567
+ " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
568
+ "Collecting python-multipart (from gradio->-r requirements.txt (line 25))\n",
569
+ " Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)\n",
570
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m6.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
571
+ "\u001b[?25hRequirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 25)) (6.0.1)\n",
572
+ "Collecting semantic-version~=2.0 (from gradio->-r requirements.txt (line 25))\n",
573
+ " Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
574
+ "Collecting uvicorn>=0.14.0 (from gradio->-r requirements.txt (line 25))\n",
575
+ " Downloading uvicorn-0.23.2-py3-none-any.whl (59 kB)\n",
576
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.5/59.5 kB\u001b[0m \u001b[31m7.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
577
+ "\u001b[?25hCollecting websockets<12.0,>=10.0 (from gradio->-r requirements.txt (line 25))\n",
578
+ " Downloading websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)\n",
579
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m17.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
580
+ "\u001b[?25hRequirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==0.5.0->gradio->-r requirements.txt (line 25)) (2023.6.0)\n",
581
+ "Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 25)) (0.4)\n",
582
+ "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 25)) (4.19.0)\n",
583
+ "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 25)) (0.12.0)\n",
584
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile->-r requirements.txt (line 1)) (2.21)\n",
585
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio->-r requirements.txt (line 25)) (2023.3)\n",
586
+ "Collecting ruamel.yaml>=0.16.5 (from proces>=0.1.3->cn2an->-r requirements.txt (line 16))\n",
587
+ " Downloading ruamel.yaml-0.17.32-py3-none-any.whl (112 kB)\n",
588
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m112.2/112.2 kB\u001b[0m \u001b[31m13.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
589
+ "\u001b[?25hRequirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=1.9.1->inflect->-r requirements.txt (line 15)) (0.5.0)\n",
590
+ "Requirement already satisfied: pydantic-core==2.6.1 in /usr/local/lib/python3.10/dist-packages (from pydantic>=1.9.1->inflect->-r requirements.txt (line 15)) (2.6.1)\n",
591
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->torchvision==0.14.0->-r requirements.txt (line 4)) (3.2.0)\n",
592
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->torchvision==0.14.0->-r requirements.txt (line 4)) (3.4)\n",
593
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->torchvision==0.14.0->-r requirements.txt (line 4)) (2.0.4)\n",
594
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->torchvision==0.14.0->-r requirements.txt (line 4)) (2023.7.22)\n",
595
+ "Collecting h11>=0.8 (from uvicorn>=0.14.0->gradio->-r requirements.txt (line 25))\n",
596
+ " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
597
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m8.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
598
+ "\u001b[?25hCollecting starlette<0.28.0,>=0.27.0 (from fastapi->gradio->-r requirements.txt (line 25))\n",
599
+ " Downloading starlette-0.27.0-py3-none-any.whl (66 kB)\n",
600
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m8.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
601
+ "\u001b[?25hCollecting httpcore<0.18.0,>=0.15.0 (from httpx->gradio->-r requirements.txt (line 25))\n",
602
+ " Downloading httpcore-0.17.3-py3-none-any.whl (74 kB)\n",
603
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m74.5/74.5 kB\u001b[0m \u001b[31m10.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
604
+ "\u001b[?25hRequirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->gradio->-r requirements.txt (line 25)) (1.3.0)\n",
605
+ "Requirement already satisfied: llvmlite<0.40,>=0.39.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba->openai-whisper->-r requirements.txt (line 22)) (0.39.1)\n",
606
+ "Collecting clldutils>=1.7.3 (from segments->phonemizer->-r requirements.txt (line 23))\n",
607
+ " Downloading clldutils-3.19.0-py2.py3-none-any.whl (1.7 MB)\n",
608
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m92.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
609
+ "\u001b[?25hCollecting csvw>=1.5.6 (from segments->phonemizer->-r requirements.txt (line 23))\n",
610
+ " Downloading csvw-3.1.3-py2.py3-none-any.whl (56 kB)\n",
611
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.7/56.7 kB\u001b[0m \u001b[31m7.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
612
+ "\u001b[?25hRequirement already satisfied: tabulate>=0.7.7 in /usr/local/lib/python3.10/dist-packages (from clldutils>=1.7.3->segments->phonemizer->-r requirements.txt (line 23)) (0.9.0)\n",
613
+ "Collecting colorlog (from clldutils>=1.7.3->segments->phonemizer->-r requirements.txt (line 23))\n",
614
+ " Downloading colorlog-6.7.0-py2.py3-none-any.whl (11 kB)\n",
615
+ "Collecting pylatexenc (from clldutils>=1.7.3->segments->phonemizer->-r requirements.txt (line 23))\n",
616
+ " Downloading pylatexenc-2.10.tar.gz (162 kB)\n",
617
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m162.6/162.6 kB\u001b[0m \u001b[31m20.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
618
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
619
+ "Requirement already satisfied: markdown in /usr/local/lib/python3.10/dist-packages (from clldutils>=1.7.3->segments->phonemizer->-r requirements.txt (line 23)) (3.4.4)\n",
620
+ "Requirement already satisfied: lxml in /usr/local/lib/python3.10/dist-packages (from clldutils>=1.7.3->segments->phonemizer->-r requirements.txt (line 23)) (4.9.3)\n",
621
+ "Requirement already satisfied: babel in /usr/local/lib/python3.10/dist-packages (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 23)) (2.12.1)\n",
622
+ "Collecting colorama (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 23))\n",
623
+ " Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)\n",
624
+ "Collecting isodate (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 23))\n",
625
+ " Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)\n",
626
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.7/41.7 kB\u001b[0m \u001b[31m5.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
627
+ "\u001b[?25hCollecting language-tags (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 23))\n",
628
+ " Downloading language_tags-1.2.0-py3-none-any.whl (213 kB)\n",
629
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m213.4/213.4 kB\u001b[0m \u001b[31m26.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
630
+ "\u001b[?25hCollecting rdflib (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 23))\n",
631
+ " Downloading rdflib-7.0.0-py3-none-any.whl (531 kB)\n",
632
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m531.9/531.9 kB\u001b[0m \u001b[31m45.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
633
+ "\u001b[?25hCollecting rfc3986<2 (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 23))\n",
634
+ " Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\n",
635
+ "Requirement already satisfied: uritemplate>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 23)) (4.1.1)\n",
636
+ "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from httpcore<0.18.0,>=0.15.0->httpx->gradio->-r requirements.txt (line 25)) (3.7.1)\n",
637
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 25)) (2023.7.1)\n",
638
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 25)) (0.30.2)\n",
639
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 25)) (0.9.2)\n",
640
+ "Collecting ruamel.yaml.clib>=0.2.7 (from ruamel.yaml>=0.16.5->proces>=0.1.3->cn2an->-r requirements.txt (line 16))\n",
641
+ " Downloading ruamel.yaml.clib-0.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (485 kB)\n",
642
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m485.6/485.6 kB\u001b[0m \u001b[31m47.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
643
+ "\u001b[?25hRequirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->httpcore<0.18.0,>=0.15.0->httpx->gradio->-r requirements.txt (line 25)) (1.1.3)\n",
644
+ "Building wheels for collected packages: encodec, langid, pyopenjtalk, eng_to_ipa, openai-whisper, ffmpy, pylatexenc\n",
645
+ " Building wheel for encodec (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
646
+ " Created wheel for encodec: filename=encodec-0.1.1-py3-none-any.whl size=45760 sha256=17e41f2eaddb730b37085bf756cdb5e8748bb382155be2103fbec7e9314f8933\n",
647
+ " Stored in directory: /root/.cache/pip/wheels/fc/36/cb/81af8b985a5f5e0815312d5e52b41263237af07b977e6bcbf3\n",
648
+ " Building wheel for langid (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
649
+ " Created wheel for langid: filename=langid-1.1.6-py3-none-any.whl size=1941173 sha256=e8079f6d09c82c8b32445073464af9a9c9ccf4b8516d14b60710a812372a8ac3\n",
650
+ " Stored in directory: /root/.cache/pip/wheels/23/c8/c6/eed80894918490a175677414d40bd7c851413bbe03d4856c3c\n",
651
+ " Building wheel for pyopenjtalk (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
652
+ " Created wheel for pyopenjtalk: filename=pyopenjtalk-0.3.2-cp310-cp310-linux_x86_64.whl size=5288200 sha256=33509dd42f58ee2d860e018887fb1986262e1adf4c6e267793e756ecccdefaa5\n",
653
+ " Stored in directory: /root/.cache/pip/wheels/a6/8e/98/7c5f9a3fd3ad8765b31f8dd1c7d520d3e3f7e9f80e3036ba47\n",
654
+ " Building wheel for eng_to_ipa (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
655
+ " Created wheel for eng_to_ipa: filename=eng_to_ipa-0.0.2-py3-none-any.whl size=2822606 sha256=4fb8877bf574ada2381b26dcd1e68520c19da76e58b236d9e1f7cf3cee434ced\n",
656
+ " Stored in directory: /root/.cache/pip/wheels/5b/ab/07/fe6722f710d8ef8bd0ccb4eb689ef96f5552f3fc0c80c1aa9c\n",
657
+ " Building wheel for openai-whisper (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
658
+ " Created wheel for openai-whisper: filename=openai_whisper-20230314-py3-none-any.whl size=796907 sha256=a77b7cc3258916528de013ed0cc0055949ec5800c69e0fbb87f5d1e639e4cac1\n",
659
+ " Stored in directory: /root/.cache/pip/wheels/b2/13/5f/fe8245f6dc59df505879da4b2129932e342f02a80e6b87f27d\n",
660
+ " Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
661
+ " Created wheel for ffmpy: filename=ffmpy-0.3.1-py3-none-any.whl size=5579 sha256=406f621914cf4087158110635cd68b9f1f6c69aa6ce3c3d6f22c4bb4ad5990e6\n",
662
+ " Stored in directory: /root/.cache/pip/wheels/01/a6/d1/1c0828c304a4283b2c1639a09ad86f83d7c487ef34c6b4a1bf\n",
663
+ " Building wheel for pylatexenc (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
664
+ " Created wheel for pylatexenc: filename=pylatexenc-2.10-py3-none-any.whl size=136818 sha256=e855e796b90848740f0d71b0f2d44d79ace46de5c0916bed9138a5b47888b16d\n",
665
+ " Stored in directory: /root/.cache/pip/wheels/d3/31/8b/e09b0386afd80cfc556c00408c9aeea5c35c4d484a9c762fd5\n",
666
+ "Successfully built encodec langid pyopenjtalk eng_to_ipa openai-whisper ffmpy pylatexenc\n",
667
+ "Installing collected packages: tokenizers, SudachiPy, rfc3986, pylatexenc, pydub, language-tags, ffmpy, eng_to_ipa, dlinfo, websockets, unidecode, semantic-version, ruamel.yaml.clib, python-multipart, pypinyin, pyopenjtalk, Pillow, orjson, nvidia-cuda-runtime-cu11, nvidia-cuda-nvrtc-cu11, nvidia-cublas-cu11, loguru, langid, isodate, h11, ffmpeg-python, einops, deepfilterlib, colorlog, colorama, aiofiles, uvicorn, tiktoken, starlette, ruamel.yaml, rdflib, nvidia-cudnn-cu11, matplotlib, huggingface-hub, httpcore, deepfilternet, clldutils, torch, proces, httpx, fastapi, torchvision, torchaudio, gradio-client, csvw, cn2an, segments, openai-whisper, gradio, encodec, phonemizer\n",
668
+ " Attempting uninstall: Pillow\n",
669
+ " Found existing installation: Pillow 9.4.0\n",
670
+ " Uninstalling Pillow-9.4.0:\n",
671
+ " Successfully uninstalled Pillow-9.4.0\n",
672
+ " Attempting uninstall: matplotlib\n",
673
+ " Found existing installation: matplotlib 3.7.1\n",
674
+ " Uninstalling matplotlib-3.7.1:\n",
675
+ " Successfully uninstalled matplotlib-3.7.1\n",
676
+ " Attempting uninstall: torch\n",
677
+ " Found existing installation: torch 2.0.1+cu118\n",
678
+ " Uninstalling torch-2.0.1+cu118:\n",
679
+ " Successfully uninstalled torch-2.0.1+cu118\n",
680
+ " Attempting uninstall: torchvision\n",
681
+ " Found existing installation: torchvision 0.15.2+cu118\n",
682
+ " Uninstalling torchvision-0.15.2+cu118:\n",
683
+ " Successfully uninstalled torchvision-0.15.2+cu118\n",
684
+ " Attempting uninstall: torchaudio\n",
685
+ " Found existing installation: torchaudio 2.0.2+cu118\n",
686
+ " Uninstalling torchaudio-2.0.2+cu118:\n",
687
+ " Successfully uninstalled torchaudio-2.0.2+cu118\n",
688
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
689
+ "torchdata 0.6.1 requires torch==2.0.1, but you have torch 1.13.0 which is incompatible.\n",
690
+ "torchtext 0.15.2 requires torch==2.0.1, but you have torch 1.13.0 which is incompatible.\u001b[0m\u001b[31m\n",
691
+ "\u001b[0mSuccessfully installed Pillow-9.3.0 SudachiPy-0.6.7 aiofiles-23.2.1 clldutils-3.19.0 cn2an-0.5.22 colorama-0.4.6 colorlog-6.7.0 csvw-3.1.3 deepfilterlib-0.4.0 deepfilternet-0.4.0 dlinfo-1.2.1 einops-0.6.1 encodec-0.1.1 eng_to_ipa-0.0.2 fastapi-0.102.0 ffmpeg-python-0.2.0 ffmpy-0.3.1 gradio-3.41.2 gradio-client-0.5.0 h11-0.14.0 httpcore-0.17.3 httpx-0.24.1 huggingface-hub-0.16.4 isodate-0.6.1 langid-1.1.6 language-tags-1.2.0 loguru-0.7.0 matplotlib-3.6.0 nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 openai-whisper-20230314 orjson-3.9.5 phonemizer-3.2.1 proces-0.1.6 pydub-0.25.1 pylatexenc-2.10 pyopenjtalk-0.3.2 pypinyin-0.49.0 python-multipart-0.0.6 rdflib-7.0.0 rfc3986-1.5.0 ruamel.yaml-0.17.32 ruamel.yaml.clib-0.2.7 segments-2.2.1 semantic-version-2.10.0 starlette-0.27.0 tiktoken-0.3.1 tokenizers-0.13.3 torch-1.13.0 torchaudio-0.13.0 torchvision-0.14.0 unidecode-1.3.6 uvicorn-0.23.2 websockets-11.0.3\n"
692
+ ]
693
+ },
694
+ {
695
+ "output_type": "display_data",
696
+ "data": {
697
+ "application/vnd.colab-display-data+json": {
698
+ "pip_warning": {
699
+ "packages": [
700
+ "PIL",
701
+ "matplotlib",
702
+ "mpl_toolkits"
703
+ ]
704
+ }
705
+ }
706
+ },
707
+ "metadata": {}
708
+ },
709
+ {
710
+ "output_type": "stream",
711
+ "name": "stdout",
712
+ "text": [
713
+ "Requirement already satisfied: gradio in /usr/local/lib/python3.10/dist-packages (3.41.2)\n",
714
+ "Requirement already satisfied: aiofiles<24.0,>=22.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (23.2.1)\n",
715
+ "Requirement already satisfied: altair<6.0,>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.2.2)\n",
716
+ "Requirement already satisfied: fastapi in /usr/local/lib/python3.10/dist-packages (from gradio) (0.102.0)\n",
717
+ "Requirement already satisfied: ffmpy in /usr/local/lib/python3.10/dist-packages (from gradio) (0.3.1)\n",
718
+ "Requirement already satisfied: gradio-client==0.5.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.5.0)\n",
719
+ "Requirement already satisfied: httpx in /usr/local/lib/python3.10/dist-packages (from gradio) (0.24.1)\n",
720
+ "Requirement already satisfied: huggingface-hub>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.16.4)\n",
721
+ "Requirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.1)\n",
722
+ "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.1.2)\n",
723
+ "Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.1.3)\n",
724
+ "Requirement already satisfied: matplotlib~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.6.0)\n",
725
+ "Requirement already satisfied: numpy~=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.23.5)\n",
726
+ "Requirement already satisfied: orjson~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.9.5)\n",
727
+ "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio) (23.1)\n",
728
+ "Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.5.3)\n",
729
+ "Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (9.3.0)\n",
730
+ "Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.2.1)\n",
731
+ "Requirement already satisfied: pydub in /usr/local/lib/python3.10/dist-packages (from gradio) (0.25.1)\n",
732
+ "Requirement already satisfied: python-multipart in /usr/local/lib/python3.10/dist-packages (from gradio) (0.0.6)\n",
733
+ "Requirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.1)\n",
734
+ "Requirement already satisfied: requests~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.31.0)\n",
735
+ "Requirement already satisfied: semantic-version~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.10.0)\n",
736
+ "Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.7.1)\n",
737
+ "Requirement already satisfied: uvicorn>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.23.2)\n",
738
+ "Requirement already satisfied: websockets<12.0,>=10.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (11.0.3)\n",
739
+ "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==0.5.0->gradio) (2023.6.0)\n",
740
+ "Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio) (0.4)\n",
741
+ "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio) (4.19.0)\n",
742
+ "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio) (0.12.0)\n",
743
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.14.0->gradio) (3.12.2)\n",
744
+ "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.14.0->gradio) (4.66.1)\n",
745
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (1.1.0)\n",
746
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (0.11.0)\n",
747
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (4.42.1)\n",
748
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (1.4.4)\n",
749
+ "Requirement already satisfied: pyparsing>=2.2.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (3.1.1)\n",
750
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (2.8.2)\n",
751
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2023.3)\n",
752
+ "Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio) (0.5.0)\n",
753
+ "Requirement already satisfied: pydantic-core==2.6.1 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio) (2.6.1)\n",
754
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (3.2.0)\n",
755
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (3.4)\n",
756
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (2.0.4)\n",
757
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio) (2023.7.22)\n",
758
+ "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn>=0.14.0->gradio) (8.1.7)\n",
759
+ "Requirement already satisfied: h11>=0.8 in /usr/local/lib/python3.10/dist-packages (from uvicorn>=0.14.0->gradio) (0.14.0)\n",
760
+ "Requirement already satisfied: starlette<0.28.0,>=0.27.0 in /usr/local/lib/python3.10/dist-packages (from fastapi->gradio) (0.27.0)\n",
761
+ "Requirement already satisfied: httpcore<0.18.0,>=0.15.0 in /usr/local/lib/python3.10/dist-packages (from httpx->gradio) (0.17.3)\n",
762
+ "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->gradio) (1.3.0)\n",
763
+ "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from httpcore<0.18.0,>=0.15.0->httpx->gradio) (3.7.1)\n",
764
+ "Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (23.1.0)\n",
765
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (2023.7.1)\n",
766
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.30.2)\n",
767
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.9.2)\n",
768
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)\n",
769
+ "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->httpcore<0.18.0,>=0.15.0->httpx->gradio) (1.1.3)\n",
770
+ "Use 8 cpu cores for computing\n",
771
+ "\u001b[32m2023-08-26 08:37:46\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mDF\u001b[0m | \u001b[1mRunning on torch 1.13.0+cu117\u001b[0m\n",
772
+ "\u001b[32m2023-08-26 08:37:46\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mDF\u001b[0m | \u001b[1mRunning on host 9c761cac9be2\u001b[0m\n",
773
+ "\u001b[32m2023-08-26 08:37:46\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mDF\u001b[0m | \u001b[1mLoading model settings of DeepFilterNet2\u001b[0m\n",
774
+ "\u001b[32m2023-08-26 08:37:46\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mDF\u001b[0m | \u001b[1mInitializing model `deepfilternet2`\u001b[0m\n",
775
+ "\u001b[32m2023-08-26 08:37:48\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mDF\u001b[0m | \u001b[1mFound checkpoint ./DeepFilterNet2/checkpoints/model_96.ckpt.best with epoch 96\u001b[0m\n",
776
+ "\u001b[32m2023-08-26 08:37:48\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mDF\u001b[0m | \u001b[1mRunning on device cuda:0\u001b[0m\n",
777
+ "\u001b[32m2023-08-26 08:37:48\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mDF\u001b[0m | \u001b[1mModel loaded\u001b[0m\n"
778
+ ]
779
+ },
780
+ {
781
+ "output_type": "stream",
782
+ "name": "stderr",
783
+ "text": [
784
+ "Downloading: \"https://dl.fbaipublicfiles.com/encodec/v0/encodec_24khz-d7cc33bc.th\" to /root/.cache/torch/hub/checkpoints/encodec_24khz-d7cc33bc.th\n"
785
+ ]
786
+ },
787
+ {
788
+ "output_type": "display_data",
789
+ "data": {
790
+ "text/plain": [
791
+ " 0%| | 0.00/88.9M [00:00<?, ?B/s]"
792
+ ],
793
+ "application/vnd.jupyter.widget-view+json": {
794
+ "version_major": 2,
795
+ "version_minor": 0,
796
+ "model_id": "a31c166927d64e228ba4ff68cf5144d5"
797
+ }
798
+ },
799
+ "metadata": {}
800
+ },
801
+ {
802
+ "output_type": "stream",
803
+ "name": "stderr",
804
+ "text": [
805
+ "100%|██████████████████████████████████████| 1.42G/1.42G [00:08<00:00, 186MiB/s]\n",
806
+ "[nltk_data] Downloading package punkt to /root/nltk_data...\n",
807
+ "[nltk_data] Unzipping tokenizers/punkt.zip.\n"
808
+ ]
809
+ },
810
+ {
811
+ "output_type": "stream",
812
+ "name": "stdout",
813
+ "text": [
814
+ "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
815
+ "Note: opening Chrome Inspector may crash demo inside Colab notebooks.\n",
816
+ "\n",
817
+ "To create a public link, set `share=True` in `launch()`.\n"
818
+ ]
819
+ },
820
+ {
821
+ "output_type": "display_data",
822
+ "data": {
823
+ "text/plain": [
824
+ "<IPython.core.display.Javascript object>"
825
+ ],
826
+ "application/javascript": [
827
+ "(async (port, path, width, height, cache, element) => {\n",
828
+ " if (!google.colab.kernel.accessAllowed && !cache) {\n",
829
+ " return;\n",
830
+ " }\n",
831
+ " element.appendChild(document.createTextNode(''));\n",
832
+ " const url = await google.colab.kernel.proxyPort(port, {cache});\n",
833
+ "\n",
834
+ " const external_link = document.createElement('div');\n",
835
+ " external_link.innerHTML = `\n",
836
+ " <div style=\"font-family: monospace; margin-bottom: 0.5rem\">\n",
837
+ " Running on <a href=${new URL(path, url).toString()} target=\"_blank\">\n",
838
+ " https://localhost:${port}${path}\n",
839
+ " </a>\n",
840
+ " </div>\n",
841
+ " `;\n",
842
+ " element.appendChild(external_link);\n",
843
+ "\n",
844
+ " const iframe = document.createElement('iframe');\n",
845
+ " iframe.src = new URL(path, url).toString();\n",
846
+ " iframe.height = height;\n",
847
+ " iframe.allow = \"autoplay; camera; microphone; clipboard-read; clipboard-write;\"\n",
848
+ " iframe.width = width;\n",
849
+ " iframe.style.border = 0;\n",
850
+ " element.appendChild(iframe);\n",
851
+ " })(7860, \"/\", \"100%\", 500, false, window.element)"
852
+ ]
853
+ },
854
+ "metadata": {}
855
+ }
856
+ ],
857
+ "source": [
858
+ "# This takes about 4 minutes until the UI pop up\n",
859
+ "!git lfs install\n",
860
+ "!git clone https://huggingface.co/spaces/kevinwang676/VALLE\n",
861
+ "%cd VALLE\n",
862
+ "!pip install --no-build-isolation -r requirements.txt\n",
863
+ "!pip install gradio\n",
864
+ "%run app.py"
865
+ ]
866
+ },
867
+ {
868
+ "cell_type": "code",
869
+ "source": [],
870
+ "metadata": {
871
+ "id": "Bi3_ZGQM7Yoe"
872
+ },
873
+ "execution_count": null,
874
+ "outputs": []
875
+ }
876
+ ]
877
+ }
Voice_Cloning_for_Chinese_Speech_v2.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
XTTS_Colab.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
app.py ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from cProfile import label
2
+ import dataclasses
3
+ from distutils.command.check import check
4
+ from doctest import Example
5
+ import gradio as gr
6
+ import os
7
+ import sys
8
+ import numpy as np
9
+ import logging
10
+ import torch
11
+ import pytorch_seed
12
+ import time
13
+
14
+ from xml.sax import saxutils
15
+ from bark.api import generate_with_settings
16
+ from bark.api import save_as_prompt
17
+ from util.settings import Settings
18
+ #import nltk
19
+
20
+ from bark import SAMPLE_RATE
21
+ from cloning.clonevoice import clone_voice
22
+ from bark.generation import SAMPLE_RATE, preload_models, _load_history_prompt, codec_decode
23
+ from scipy.io.wavfile import write as write_wav
24
+ from util.parseinput import split_and_recombine_text, build_ssml, is_ssml, create_clips_from_ssml
25
+ from datetime import datetime
26
+ from tqdm.auto import tqdm
27
+ from util.helper import create_filename, add_id3_tag
28
+ from swap_voice import swap_voice_from_audio
29
+ from training.training_prepare import prepare_semantics_from_text, prepare_wavs_from_semantics
30
+ from training.train import training_prepare_files, train
31
+
32
+ settings = Settings('config.yaml')
33
+
34
+ def generate_text_to_speech(text, selected_speaker, text_temp, waveform_temp, eos_prob, quick_generation, complete_settings, seed, batchcount, progress=gr.Progress(track_tqdm=True)):
35
+ # Chunk the text into smaller pieces then combine the generated audio
36
+
37
+ # generation settings
38
+ if selected_speaker == 'None':
39
+ selected_speaker = None
40
+
41
+ voice_name = selected_speaker
42
+
43
+ if text == None or len(text) < 1:
44
+ if selected_speaker == None:
45
+ raise gr.Error('No text entered!')
46
+
47
+ # Extract audio data from speaker if no text and speaker selected
48
+ voicedata = _load_history_prompt(voice_name)
49
+ audio_arr = codec_decode(voicedata["fine_prompt"])
50
+ result = create_filename(settings.output_folder_path, "None", "extract",".wav")
51
+ save_wav(audio_arr, result)
52
+ return result
53
+
54
+ if batchcount < 1:
55
+ batchcount = 1
56
+
57
+
58
+ silenceshort = np.zeros(int((float(settings.silence_sentence) / 1000.0) * SAMPLE_RATE), dtype=np.int16) # quarter second of silence
59
+ silencelong = np.zeros(int((float(settings.silence_speakers) / 1000.0) * SAMPLE_RATE), dtype=np.float32) # half a second of silence
60
+ use_last_generation_as_history = "Use last generation as history" in complete_settings
61
+ save_last_generation = "Save generation as Voice" in complete_settings
62
+ for l in range(batchcount):
63
+ currentseed = seed
64
+ if seed != None and seed > 2**32 - 1:
65
+ logger.warning(f"Seed {seed} > 2**32 - 1 (max), setting to random")
66
+ currentseed = None
67
+ if currentseed == None or currentseed <= 0:
68
+ currentseed = np.random.default_rng().integers(1, 2**32 - 1)
69
+ assert(0 < currentseed and currentseed < 2**32)
70
+
71
+ progress(0, desc="Generating")
72
+
73
+ full_generation = None
74
+
75
+ all_parts = []
76
+ complete_text = ""
77
+ text = text.lstrip()
78
+ if is_ssml(text):
79
+ list_speak = create_clips_from_ssml(text)
80
+ prev_speaker = None
81
+ for i, clip in tqdm(enumerate(list_speak), total=len(list_speak)):
82
+ selected_speaker = clip[0]
83
+ # Add pause break between speakers
84
+ if i > 0 and selected_speaker != prev_speaker:
85
+ all_parts += [silencelong.copy()]
86
+ prev_speaker = selected_speaker
87
+ text = clip[1]
88
+ text = saxutils.unescape(text)
89
+ if selected_speaker == "None":
90
+ selected_speaker = None
91
+
92
+ print(f"\nGenerating Text ({i+1}/{len(list_speak)}) -> {selected_speaker} (Seed {currentseed}):`{text}`")
93
+ complete_text += text
94
+ with pytorch_seed.SavedRNG(currentseed):
95
+ audio_array = generate_with_settings(text_prompt=text, voice_name=selected_speaker, semantic_temp=text_temp, coarse_temp=waveform_temp, eos_p=eos_prob)
96
+ currentseed = torch.random.initial_seed()
97
+ if len(list_speak) > 1:
98
+ filename = create_filename(settings.output_folder_path, currentseed, "audioclip",".wav")
99
+ save_wav(audio_array, filename)
100
+ add_id3_tag(filename, text, selected_speaker, currentseed)
101
+
102
+ all_parts += [audio_array]
103
+ else:
104
+ texts = split_and_recombine_text(text, settings.input_text_desired_length, settings.input_text_max_length)
105
+ for i, text in tqdm(enumerate(texts), total=len(texts)):
106
+ print(f"\nGenerating Text ({i+1}/{len(texts)}) -> {selected_speaker} (Seed {currentseed}):`{text}`")
107
+ complete_text += text
108
+ if quick_generation == True:
109
+ with pytorch_seed.SavedRNG(currentseed):
110
+ audio_array = generate_with_settings(text_prompt=text, voice_name=selected_speaker, semantic_temp=text_temp, coarse_temp=waveform_temp, eos_p=eos_prob)
111
+ currentseed = torch.random.initial_seed()
112
+ else:
113
+ full_output = use_last_generation_as_history or save_last_generation
114
+ if full_output:
115
+ full_generation, audio_array = generate_with_settings(text_prompt=text, voice_name=voice_name, semantic_temp=text_temp, coarse_temp=waveform_temp, eos_p=eos_prob, output_full=True)
116
+ else:
117
+ audio_array = generate_with_settings(text_prompt=text, voice_name=voice_name, semantic_temp=text_temp, coarse_temp=waveform_temp, eos_p=eos_prob)
118
+
119
+ # Noticed this in the HF Demo - convert to 16bit int -32767/32767 - most used audio format
120
+ # audio_array = (audio_array * 32767).astype(np.int16)
121
+
122
+ if len(texts) > 1:
123
+ filename = create_filename(settings.output_folder_path, currentseed, "audioclip",".wav")
124
+ save_wav(audio_array, filename)
125
+ add_id3_tag(filename, text, selected_speaker, currentseed)
126
+
127
+ if quick_generation == False and (save_last_generation == True or use_last_generation_as_history == True):
128
+ # save to npz
129
+ voice_name = create_filename(settings.output_folder_path, seed, "audioclip", ".npz")
130
+ save_as_prompt(voice_name, full_generation)
131
+ if use_last_generation_as_history:
132
+ selected_speaker = voice_name
133
+
134
+ all_parts += [audio_array]
135
+ # Add short pause between sentences
136
+ if text[-1] in "!?.\n" and i > 1:
137
+ all_parts += [silenceshort.copy()]
138
+
139
+ # save & play audio
140
+ result = create_filename(settings.output_folder_path, currentseed, "final",".wav")
141
+ save_wav(np.concatenate(all_parts), result)
142
+ # write id3 tag with text truncated to 60 chars, as a precaution...
143
+ add_id3_tag(result, complete_text, selected_speaker, currentseed)
144
+
145
+ return result
146
+
147
+
148
+
149
+ def save_wav(audio_array, filename):
150
+ write_wav(filename, SAMPLE_RATE, audio_array)
151
+
152
+ def save_voice(filename, semantic_prompt, coarse_prompt, fine_prompt):
153
+ np.savez_compressed(
154
+ filename,
155
+ semantic_prompt=semantic_prompt,
156
+ coarse_prompt=coarse_prompt,
157
+ fine_prompt=fine_prompt
158
+ )
159
+
160
+
161
+ def on_quick_gen_changed(checkbox):
162
+ if checkbox == False:
163
+ return gr.CheckboxGroup.update(visible=True)
164
+ return gr.CheckboxGroup.update(visible=False)
165
+
166
+ def delete_output_files(checkbox_state):
167
+ if checkbox_state:
168
+ outputs_folder = os.path.join(os.getcwd(), settings.output_folder_path)
169
+ if os.path.exists(outputs_folder):
170
+ purgedir(outputs_folder)
171
+ return False
172
+
173
+
174
+ # https://stackoverflow.com/a/54494779
175
+ def purgedir(parent):
176
+ for root, dirs, files in os.walk(parent):
177
+ for item in files:
178
+ # Delete subordinate files
179
+ filespec = os.path.join(root, item)
180
+ os.unlink(filespec)
181
+ for item in dirs:
182
+ # Recursively perform this operation for subordinate directories
183
+ purgedir(os.path.join(root, item))
184
+
185
+ def convert_text_to_ssml(text, selected_speaker):
186
+ return build_ssml(text, selected_speaker)
187
+
188
+
189
+ def training_prepare(selected_step, num_text_generations, progress=gr.Progress(track_tqdm=True)):
190
+ if selected_step == prepare_training_list[0]:
191
+ prepare_semantics_from_text()
192
+ else:
193
+ prepare_wavs_from_semantics()
194
+ return None
195
+
196
+
197
+ def start_training(save_model_epoch, max_epochs, progress=gr.Progress(track_tqdm=True)):
198
+ training_prepare_files("./training/data/", "./training/data/checkpoint/hubert_base_ls960.pt")
199
+ train("./training/data/", save_model_epoch, max_epochs)
200
+ return None
201
+
202
+
203
+
204
+ def apply_settings(themes, input_server_name, input_server_port, input_server_public, input_desired_len, input_max_len, input_silence_break, input_silence_speaker):
205
+ settings.selected_theme = themes
206
+ settings.server_name = input_server_name
207
+ settings.server_port = input_server_port
208
+ settings.server_share = input_server_public
209
+ settings.input_text_desired_length = input_desired_len
210
+ settings.input_text_max_length = input_max_len
211
+ settings.silence_sentence = input_silence_break
212
+ settings.silence_speaker = input_silence_speaker
213
+ settings.save()
214
+
215
+ def restart():
216
+ global restart_server
217
+ restart_server = True
218
+
219
+
220
+ def create_version_html():
221
+ python_version = ".".join([str(x) for x in sys.version_info[0:3]])
222
+ versions_html = f"""
223
+ python: <span title="{sys.version}">{python_version}</span>
224
+  •
225
+ torch: {getattr(torch, '__long_version__',torch.__version__)}
226
+  •
227
+ gradio: {gr.__version__}
228
+ """
229
+ return versions_html
230
+
231
+
232
+
233
+ logger = logging.getLogger(__name__)
234
+ APPTITLE = "Bark Voice Cloning UI"
235
+
236
+
237
+ autolaunch = False
238
+
239
+ if len(sys.argv) > 1:
240
+ autolaunch = "-autolaunch" in sys.argv
241
+
242
+ if torch.cuda.is_available() == False:
243
+ os.environ['BARK_FORCE_CPU'] = 'True'
244
+ logger.warning("No CUDA detected, fallback to CPU!")
245
+
246
+ print(f'smallmodels={os.environ.get("SUNO_USE_SMALL_MODELS", False)}')
247
+ print(f'enablemps={os.environ.get("SUNO_ENABLE_MPS", False)}')
248
+ print(f'offloadcpu={os.environ.get("SUNO_OFFLOAD_CPU", False)}')
249
+ print(f'forcecpu={os.environ.get("BARK_FORCE_CPU", False)}')
250
+ print(f'autolaunch={autolaunch}\n\n')
251
+
252
+ #print("Updating nltk\n")
253
+ #nltk.download('punkt')
254
+
255
+ print("Preloading Models\n")
256
+ preload_models()
257
+
258
+ available_themes = ["Default", "gradio/glass", "gradio/monochrome", "gradio/seafoam", "gradio/soft", "gstaff/xkcd", "freddyaboulton/dracula_revamped", "ysharma/steampunk"]
259
+ tokenizer_language_list = ["de","en", "pl"]
260
+ prepare_training_list = ["Step 1: Semantics from Text","Step 2: WAV from Semantics"]
261
+
262
+ seed = -1
263
+ server_name = settings.server_name
264
+ if len(server_name) < 1:
265
+ server_name = None
266
+ server_port = settings.server_port
267
+ if server_port <= 0:
268
+ server_port = None
269
+ global run_server
270
+ global restart_server
271
+
272
+ run_server = True
273
+
274
+ while run_server:
275
+ # Collect all existing speakers/voices in dir
276
+ speakers_list = []
277
+
278
+ for root, dirs, files in os.walk("./bark/assets/prompts"):
279
+ for file in files:
280
+ if file.endswith(".npz"):
281
+ pathpart = root.replace("./bark/assets/prompts", "")
282
+ name = os.path.join(pathpart, file[:-4])
283
+ if name.startswith("/") or name.startswith("\\"):
284
+ name = name[1:]
285
+ speakers_list.append(name)
286
+
287
+ speakers_list = sorted(speakers_list, key=lambda x: x.lower())
288
+ speakers_list.insert(0, 'None')
289
+
290
+ print(f'Launching {APPTITLE} Server')
291
+
292
+ # Create Gradio Blocks
293
+
294
+ with gr.Blocks(title=f"{APPTITLE}", mode=f"{APPTITLE}", theme=settings.selected_theme) as barkgui:
295
+ gr.Markdown("# <center>🐶🎶⭐ - Bark Voice Cloning</center>")
296
+ gr.Markdown("## <center>🤗 - If you like this space, please star my [github repo](https://github.com/KevinWang676/Bark-Voice-Cloning)</center>")
297
+ gr.Markdown("### <center>🎡 - Based on [bark-gui](https://github.com/C0untFloyd/bark-gui)</center>")
298
+ gr.Markdown(f""" You can duplicate and use it with a GPU: <a href="https://huggingface.co/spaces/{os.getenv('SPACE_ID')}?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a>
299
+ or open in [Colab](https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/Bark_Voice_Cloning_UI.ipynb) for quick start 🌟
300
+ """)
301
+
302
+ with gr.Tab("🎙️ - Clone Voice"):
303
+ with gr.Row():
304
+ input_audio_filename = gr.Audio(label="Input audio.wav", source="upload", type="filepath")
305
+ #transcription_text = gr.Textbox(label="Transcription Text", lines=1, placeholder="Enter Text of your Audio Sample here...")
306
+ with gr.Row():
307
+ with gr.Column():
308
+ initialname = "/content/Bark-Voice-Cloning/bark/assets/prompts/file"
309
+ output_voice = gr.Textbox(label="Filename of trained Voice (do not change the initial name)", lines=1, placeholder=initialname, value=initialname, visible=False)
310
+ with gr.Column():
311
+ tokenizerlang = gr.Dropdown(tokenizer_language_list, label="Base Language Tokenizer", value=tokenizer_language_list[1], visible=False)
312
+ with gr.Row():
313
+ clone_voice_button = gr.Button("Create Voice", variant="primary")
314
+ with gr.Row():
315
+ dummy = gr.Text(label="Progress")
316
+ npz_file = gr.File(label=".npz file")
317
+ speakers_list.insert(0, npz_file) # add prompt
318
+
319
+ with gr.Tab("🎵 - TTS"):
320
+ with gr.Row():
321
+ with gr.Column():
322
+ placeholder = "Enter text here."
323
+ input_text = gr.Textbox(label="Input Text", lines=4, placeholder=placeholder)
324
+ convert_to_ssml_button = gr.Button("Convert Input Text to SSML")
325
+ with gr.Column():
326
+ seedcomponent = gr.Number(label="Seed (default -1 = Random)", precision=0, value=-1)
327
+ batchcount = gr.Number(label="Batch count", precision=0, value=1)
328
+
329
+ with gr.Row():
330
+ with gr.Column():
331
+ gr.Markdown("[Voice Prompt Library](https://suno-ai.notion.site/8b8e8749ed514b0cbf3f699013548683?v=bc67cff786b04b50b3ceb756fd05f68c)")
332
+ speaker = gr.Dropdown(speakers_list, value=speakers_list[0], label="Voice (Choose “file” if you wanna use the custom voice)")
333
+
334
+ with gr.Column():
335
+ text_temp = gr.Slider(0.1, 1.0, value=0.6, label="Generation Temperature", info="1.0 more diverse, 0.1 more conservative")
336
+ waveform_temp = gr.Slider(0.1, 1.0, value=0.7, label="Waveform temperature", info="1.0 more diverse, 0.1 more conservative")
337
+
338
+ with gr.Row():
339
+ with gr.Column():
340
+ quick_gen_checkbox = gr.Checkbox(label="Quick Generation", value=True)
341
+ settings_checkboxes = ["Use last generation as history", "Save generation as Voice"]
342
+ complete_settings = gr.CheckboxGroup(choices=settings_checkboxes, value=settings_checkboxes, label="Detailed Generation Settings", type="value", interactive=True, visible=False)
343
+ with gr.Column():
344
+ eos_prob = gr.Slider(0.0, 0.5, value=0.05, label="End of sentence probability")
345
+
346
+ with gr.Row():
347
+ with gr.Column():
348
+ tts_create_button = gr.Button("Generate", variant="primary")
349
+ with gr.Column():
350
+ hidden_checkbox = gr.Checkbox(visible=False)
351
+ button_stop_generation = gr.Button("Stop generation")
352
+ with gr.Row():
353
+ output_audio = gr.Audio(label="Generated Audio", type="filepath")
354
+
355
+ with gr.Tab("🔮 - Voice Conversion"):
356
+ with gr.Row():
357
+ swap_audio_filename = gr.Audio(label="Input audio.wav to swap voice", source="upload", type="filepath")
358
+ with gr.Row():
359
+ with gr.Column():
360
+ swap_tokenizer_lang = gr.Dropdown(tokenizer_language_list, label="Base Language Tokenizer", value=tokenizer_language_list[1])
361
+ swap_seed = gr.Number(label="Seed (default -1 = Random)", precision=0, value=-1)
362
+ with gr.Column():
363
+ speaker_swap = gr.Dropdown(speakers_list, value=speakers_list[0], label="Voice (Choose “file” if you wanna use the custom voice)")
364
+ swap_batchcount = gr.Number(label="Batch count", precision=0, value=1)
365
+ with gr.Row():
366
+ swap_voice_button = gr.Button("Generate", variant="primary")
367
+ with gr.Row():
368
+ output_swap = gr.Audio(label="Generated Audio", type="filepath")
369
+
370
+
371
+ quick_gen_checkbox.change(fn=on_quick_gen_changed, inputs=quick_gen_checkbox, outputs=complete_settings)
372
+ convert_to_ssml_button.click(convert_text_to_ssml, inputs=[input_text, speaker],outputs=input_text)
373
+ gen_click = tts_create_button.click(generate_text_to_speech, inputs=[input_text, speaker, text_temp, waveform_temp, eos_prob, quick_gen_checkbox, complete_settings, seedcomponent, batchcount],outputs=output_audio)
374
+ button_stop_generation.click(fn=None, inputs=None, outputs=None, cancels=[gen_click])
375
+
376
+
377
+
378
+ swap_voice_button.click(swap_voice_from_audio, inputs=[swap_audio_filename, speaker_swap, swap_tokenizer_lang, swap_seed, swap_batchcount], outputs=output_swap)
379
+ clone_voice_button.click(clone_voice, inputs=[input_audio_filename, output_voice], outputs=[dummy, npz_file])
380
+
381
+
382
+ restart_server = False
383
+ try:
384
+ barkgui.queue().launch(show_error=True, share=True)
385
+ except:
386
+ restart_server = True
387
+ run_server = False
388
+ try:
389
+ while restart_server == False:
390
+ time.sleep(1.0)
391
+ except (KeyboardInterrupt, OSError):
392
+ print("Keyboard interruption in main thread... closing server.")
393
+ run_server = False
394
+ barkgui.close()
bark/.DS_Store ADDED
Binary file (6.15 kB). View file
 
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/api.py ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 generate_with_settings(text_prompt, semantic_temp=0.6, eos_p=0.2, coarse_temp=0.7, fine_temp=0.5, voice_name=None, output_full=False):
9
+
10
+ # generation with more control
11
+ x_semantic = generate_text_semantic(
12
+ text_prompt,
13
+ history_prompt=voice_name,
14
+ temp=semantic_temp,
15
+ min_eos_p = eos_p,
16
+ use_kv_caching=True
17
+ )
18
+
19
+ x_coarse_gen = generate_coarse(
20
+ x_semantic,
21
+ history_prompt=voice_name,
22
+ temp=coarse_temp,
23
+ use_kv_caching=True
24
+ )
25
+ x_fine_gen = generate_fine(
26
+ x_coarse_gen,
27
+ history_prompt=voice_name,
28
+ temp=fine_temp,
29
+ )
30
+
31
+ if output_full:
32
+ full_generation = {
33
+ 'semantic_prompt': x_semantic,
34
+ 'coarse_prompt': x_coarse_gen,
35
+ 'fine_prompt': x_fine_gen
36
+ }
37
+ return full_generation, codec_decode(x_fine_gen)
38
+ return codec_decode(x_fine_gen)
39
+
40
+
41
+ def text_to_semantic(
42
+ text: str,
43
+ history_prompt: Optional[Union[Dict, str]] = None,
44
+ temp: float = 0.7,
45
+ silent: bool = False,
46
+ ):
47
+ """Generate semantic array from text.
48
+
49
+ Args:
50
+ text: text to be turned into audio
51
+ history_prompt: history choice for audio cloning
52
+ temp: generation temperature (1.0 more diverse, 0.0 more conservative)
53
+ silent: disable progress bar
54
+
55
+ Returns:
56
+ numpy semantic array to be fed into `semantic_to_waveform`
57
+ """
58
+ x_semantic = generate_text_semantic(
59
+ text,
60
+ history_prompt=history_prompt,
61
+ temp=temp,
62
+ silent=silent,
63
+ use_kv_caching=True
64
+ )
65
+ return x_semantic
66
+
67
+
68
+ def semantic_to_waveform(
69
+ semantic_tokens: np.ndarray,
70
+ history_prompt: Optional[Union[Dict, str]] = None,
71
+ temp: float = 0.7,
72
+ silent: bool = False,
73
+ output_full: bool = False,
74
+ ):
75
+ """Generate audio array from semantic input.
76
+
77
+ Args:
78
+ semantic_tokens: semantic token output from `text_to_semantic`
79
+ history_prompt: history choice for audio cloning
80
+ temp: generation temperature (1.0 more diverse, 0.0 more conservative)
81
+ silent: disable progress bar
82
+ output_full: return full generation to be used as a history prompt
83
+
84
+ Returns:
85
+ numpy audio array at sample frequency 24khz
86
+ """
87
+ coarse_tokens = generate_coarse(
88
+ semantic_tokens,
89
+ history_prompt=history_prompt,
90
+ temp=temp,
91
+ silent=silent,
92
+ use_kv_caching=True
93
+ )
94
+ fine_tokens = generate_fine(
95
+ coarse_tokens,
96
+ history_prompt=history_prompt,
97
+ temp=0.5,
98
+ )
99
+ audio_arr = codec_decode(fine_tokens)
100
+ if output_full:
101
+ full_generation = {
102
+ "semantic_prompt": semantic_tokens,
103
+ "coarse_prompt": coarse_tokens,
104
+ "fine_prompt": fine_tokens,
105
+ }
106
+ return full_generation, audio_arr
107
+ return audio_arr
108
+
109
+
110
+ def save_as_prompt(filepath, full_generation):
111
+ assert(filepath.endswith(".npz"))
112
+ assert(isinstance(full_generation, dict))
113
+ assert("semantic_prompt" in full_generation)
114
+ assert("coarse_prompt" in full_generation)
115
+ assert("fine_prompt" in full_generation)
116
+ np.savez(filepath, **full_generation)
117
+
118
+
119
+ def generate_audio(
120
+ text: str,
121
+ history_prompt: Optional[Union[Dict, str]] = None,
122
+ text_temp: float = 0.7,
123
+ waveform_temp: float = 0.7,
124
+ silent: bool = False,
125
+ output_full: bool = False,
126
+ ):
127
+ """Generate audio array from input text.
128
+
129
+ Args:
130
+ text: text to be turned into audio
131
+ history_prompt: history choice for audio cloning
132
+ text_temp: generation temperature (1.0 more diverse, 0.0 more conservative)
133
+ waveform_temp: generation temperature (1.0 more diverse, 0.0 more conservative)
134
+ silent: disable progress bar
135
+ output_full: return full generation to be used as a history prompt
136
+
137
+ Returns:
138
+ numpy audio array at sample frequency 24khz
139
+ """
140
+ semantic_tokens = text_to_semantic(
141
+ text,
142
+ history_prompt=history_prompt,
143
+ temp=text_temp,
144
+ silent=silent,
145
+ )
146
+ out = semantic_to_waveform(
147
+ semantic_tokens,
148
+ history_prompt=history_prompt,
149
+ temp=waveform_temp,
150
+ silent=silent,
151
+ output_full=output_full,
152
+ )
153
+ if output_full:
154
+ full_generation, audio_arr = out
155
+ return full_generation, audio_arr
156
+ else:
157
+ audio_arr = out
158
+ 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/v2/en_speaker_0.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:932f40d879ba8659f1ca26319ba64ea3b0647b2050fe24313bf42b0dff1fe241
3
+ size 28100
bark/assets/prompts/v2/en_speaker_1.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e7f18015e1ab9b6302ded1e28a971af5306a72f193bb6c411f1948a083c8578
3
+ size 25220
bark/assets/prompts/v2/en_speaker_2.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d218990680ece5f2d4fc18ea4783b016b3ae353ec413eaee2058f2d57263c9b3
3
+ size 26236
bark/assets/prompts/v2/en_speaker_3.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92c2e2a29145c83738e9b63f082fd1c873d9422468a155463cb27f814aeaea66
3
+ size 34980
bark/assets/prompts/v2/en_speaker_4.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:992f91991a9a5359d72f00b09a11a550e71bb8ebfc0cfd877e39d7d41f98b714
3
+ size 23780
bark/assets/prompts/v2/en_speaker_5.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18831c3f6014e4a2ff60ad5169b1fae06e28ed07f43f8a3616aafb84515091bf
3
+ size 24740
bark/assets/prompts/v2/en_speaker_6.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fab38dc6b6bc9226bcc414f4c5a9524bc1b2441865a586153fb620127a8faa4e
3
+ size 25540
bark/assets/prompts/v2/en_speaker_7.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f4c4eb33f5994be8de5cfd1744ebce13da1618a6da3a7d244514178c61ef7db
3
+ size 22716
bark/assets/prompts/v2/en_speaker_8.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fc9f11b539588f51bbf78150a73e0365c49b2306bd72e5a22b28ef09c4fb15d
3
+ size 23300
bark/assets/prompts/v2/en_speaker_9.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78b3ba32eb9aeb9ed34556856c40633ecc8332d1c3ae3c81e6f5015ac3eefbd5
3
+ size 30180
bark/assets/prompts/v2/zh_speaker_0.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd7ac118a3e944b3f20c89f2446056a00850a630ee16318922acc6572ce80929
3
+ size 20636
bark/assets/prompts/v2/zh_speaker_1.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0eacf5c862dfd3c5ac825f2ebb26f323e64309cb712e7e264cbd31c5bca3f038
3
+ size 19836
bark/assets/prompts/v2/zh_speaker_2.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e324b47f8250e5798c314f395d4e049575e7ca369d0b6074e91c7bba70e9f26d
3
+ size 21060
bark/assets/prompts/v2/zh_speaker_3.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98c476abc7bf634ffb2d71d363284e7bd8c8abd5e33ec5ca21d4aa5b15730d18
3
+ size 31300
bark/assets/prompts/v2/zh_speaker_4.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1fa8673a9895ad3302d13ac94193b5ad5da481f1cc276e6181fa895acaae133b
3
+ size 29964
bark/assets/prompts/v2/zh_speaker_5.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:226edfe5fabc72eeb83a13e350599bc8babe5adc2264b3cdb661fd1258dc4044
3
+ size 17436
bark/assets/prompts/v2/zh_speaker_6.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:285d51fbe81cc263636b5b487fbb6633e6f3cf92c53ca9ab8e6b7f55d4b4a31d
3
+ size 16900
bark/assets/prompts/v2/zh_speaker_7.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0967cdb14ffa79895747b0d52df9f15bdad80d6c55b7630894345c9a7ec87c91
3
+ size 21060
bark/assets/prompts/v2/zh_speaker_8.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c028f78530013f29ab8c0c1cf4fe2138106fbe5252951f5f36e0168056779549
3
+ size 19300
bark/assets/prompts/v2/zh_speaker_9.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6265bb827008d7af8a45a8e057fe3e91efb347d56208180a9ed990ad54e4d75e
3
+ size 16156
bark/generation.py ADDED
@@ -0,0 +1,864 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import contextlib
2
+ import gc
3
+ import os
4
+ import re
5
+ import requests
6
+ import gc
7
+ import sys
8
+
9
+ from encodec import EncodecModel
10
+ import funcy
11
+ import logging
12
+ import numpy as np
13
+ from scipy.special import softmax
14
+ import torch
15
+ import torch.nn.functional as F
16
+ import tqdm
17
+ from transformers import BertTokenizer
18
+ from huggingface_hub import hf_hub_download, hf_hub_url
19
+
20
+ from .model import GPTConfig, GPT
21
+ from .model_fine import FineGPT, FineGPTConfig
22
+ from .settings import initenv
23
+
24
+ initenv(sys.argv)
25
+ global_force_cpu = os.environ.get("BARK_FORCE_CPU", False)
26
+ if (
27
+ global_force_cpu != True and
28
+ torch.cuda.is_available() and
29
+ hasattr(torch.cuda, "amp") and
30
+ hasattr(torch.cuda.amp, "autocast") and
31
+ hasattr(torch.cuda, "is_bf16_supported") and
32
+ torch.cuda.is_bf16_supported()
33
+ ):
34
+ autocast = funcy.partial(torch.cuda.amp.autocast, dtype=torch.bfloat16)
35
+ else:
36
+ @contextlib.contextmanager
37
+ def autocast():
38
+ yield
39
+
40
+
41
+ # hold models in global scope to lazy load
42
+ global models
43
+ models = {}
44
+
45
+ global models_devices
46
+ models_devices = {}
47
+
48
+
49
+ CONTEXT_WINDOW_SIZE = 1024
50
+
51
+ SEMANTIC_RATE_HZ = 49.9
52
+ SEMANTIC_VOCAB_SIZE = 10_000
53
+
54
+ CODEBOOK_SIZE = 1024
55
+ N_COARSE_CODEBOOKS = 2
56
+ N_FINE_CODEBOOKS = 8
57
+ COARSE_RATE_HZ = 75
58
+
59
+ SAMPLE_RATE = 24_000
60
+
61
+
62
+ SUPPORTED_LANGS = [
63
+ ("English", "en"),
64
+ ("German", "de"),
65
+ ("Spanish", "es"),
66
+ ("French", "fr"),
67
+ ("Hindi", "hi"),
68
+ ("Italian", "it"),
69
+ ("Japanese", "ja"),
70
+ ("Korean", "ko"),
71
+ ("Polish", "pl"),
72
+ ("Portuguese", "pt"),
73
+ ("Russian", "ru"),
74
+ ("Turkish", "tr"),
75
+ ("Chinese", "zh"),
76
+ ]
77
+
78
+ ALLOWED_PROMPTS = {"announcer"}
79
+ for _, lang in SUPPORTED_LANGS:
80
+ for prefix in ("", f"v2{os.path.sep}"):
81
+ for n in range(10):
82
+ ALLOWED_PROMPTS.add(f"{prefix}{lang}_speaker_{n}")
83
+
84
+
85
+ logger = logging.getLogger(__name__)
86
+
87
+
88
+ CUR_PATH = os.path.dirname(os.path.abspath(__file__))
89
+
90
+
91
+ #default_cache_dir = os.path.join(os.path.expanduser("~"), ".cache")
92
+ #CACHE_DIR = os.path.join(os.getenv("XDG_CACHE_HOME", default_cache_dir), "suno", "bark_v0")
93
+ #CACHE_DIR = os.path.join(os.getcwd(), "models"
94
+ CACHE_DIR = "./models"
95
+
96
+
97
+ def _cast_bool_env_var(s):
98
+ return s.lower() in ('true', '1', 't')
99
+
100
+ USE_SMALL_MODELS = _cast_bool_env_var(os.environ.get("SUNO_USE_SMALL_MODELS", "False"))
101
+ GLOBAL_ENABLE_MPS = _cast_bool_env_var(os.environ.get("SUNO_ENABLE_MPS", "False"))
102
+ OFFLOAD_CPU = _cast_bool_env_var(os.environ.get("SUNO_OFFLOAD_CPU", "False"))
103
+
104
+ REMOTE_MODEL_PATHS = {
105
+ "text_small": {
106
+ "repo_id": "suno/bark",
107
+ "file_name": "text.pt",
108
+ },
109
+ "coarse_small": {
110
+ "repo_id": "suno/bark",
111
+ "file_name": "coarse.pt",
112
+ },
113
+ "fine_small": {
114
+ "repo_id": "suno/bark",
115
+ "file_name": "fine.pt",
116
+ },
117
+ "text": {
118
+ "repo_id": "suno/bark",
119
+ "file_name": "text_2.pt",
120
+ },
121
+ "coarse": {
122
+ "repo_id": "suno/bark",
123
+ "file_name": "coarse_2.pt",
124
+ },
125
+ "fine": {
126
+ "repo_id": "suno/bark",
127
+ "file_name": "fine_2.pt",
128
+ },
129
+ }
130
+
131
+
132
+ if not hasattr(torch.nn.functional, 'scaled_dot_product_attention') and torch.cuda.is_available():
133
+ logger.warning(
134
+ "torch version does not support flash attention. You will get faster" +
135
+ " inference speed by upgrade torch to newest nightly version."
136
+ )
137
+
138
+
139
+ def grab_best_device(use_gpu=True):
140
+ if torch.cuda.device_count() > 0 and use_gpu:
141
+ device = "cuda"
142
+ elif torch.backends.mps.is_available() and use_gpu and GLOBAL_ENABLE_MPS:
143
+ device = "mps"
144
+ else:
145
+ device = "cpu"
146
+ return device
147
+
148
+
149
+ def _get_ckpt_path(model_type, use_small=False):
150
+ key = model_type
151
+ if use_small or USE_SMALL_MODELS:
152
+ key += "_small"
153
+ return os.path.join(CACHE_DIR, REMOTE_MODEL_PATHS[key]["file_name"])
154
+
155
+ """
156
+ def _download(from_hf_path, file_name, destfilename):
157
+ os.makedirs(CACHE_DIR, exist_ok=True)
158
+ hf_hub_download(repo_id=from_hf_path, filename=file_name, local_dir=CACHE_DIR, local_dir_use_symlinks=False)
159
+ # Bug in original repo? Downloaded name differs from expected...
160
+ if not os.path.exists(destfilename):
161
+ localname = os.path.join(CACHE_DIR, file_name)
162
+ os.rename(localname, destfilename)
163
+ """
164
+ def _download(from_hf_path, file_name):
165
+ os.makedirs(CACHE_DIR, exist_ok=True)
166
+ hf_hub_download(repo_id=from_hf_path, filename=file_name, local_dir=CACHE_DIR)
167
+
168
+
169
+ class InferenceContext:
170
+ def __init__(self, benchmark=False):
171
+ # we can't expect inputs to be the same length, so disable benchmarking by default
172
+ self._chosen_cudnn_benchmark = benchmark
173
+ self._cudnn_benchmark = None
174
+
175
+ def __enter__(self):
176
+ self._cudnn_benchmark = torch.backends.cudnn.benchmark
177
+ torch.backends.cudnn.benchmark = self._chosen_cudnn_benchmark
178
+
179
+ def __exit__(self, exc_type, exc_value, exc_traceback):
180
+ torch.backends.cudnn.benchmark = self._cudnn_benchmark
181
+
182
+
183
+ if torch.cuda.is_available():
184
+ torch.backends.cuda.matmul.allow_tf32 = True
185
+ torch.backends.cudnn.allow_tf32 = True
186
+
187
+
188
+ @contextlib.contextmanager
189
+ def _inference_mode():
190
+ with InferenceContext(), torch.inference_mode(), torch.no_grad(), autocast():
191
+ yield
192
+
193
+
194
+ def _clear_cuda_cache():
195
+ if torch.cuda.is_available():
196
+ torch.cuda.empty_cache()
197
+ torch.cuda.synchronize()
198
+
199
+
200
+ def clean_models(model_key=None):
201
+ global models
202
+ model_keys = [model_key] if model_key is not None else models.keys()
203
+ for k in model_keys:
204
+ if k in models:
205
+ del models[k]
206
+ _clear_cuda_cache()
207
+ gc.collect()
208
+
209
+
210
+ def _load_model(ckpt_path, device, use_small=False, model_type="text"):
211
+ if model_type == "text":
212
+ ConfigClass = GPTConfig
213
+ ModelClass = GPT
214
+ elif model_type == "coarse":
215
+ ConfigClass = GPTConfig
216
+ ModelClass = GPT
217
+ elif model_type == "fine":
218
+ ConfigClass = FineGPTConfig
219
+ ModelClass = FineGPT
220
+ else:
221
+ raise NotImplementedError()
222
+
223
+ # Force-remove Models to allow running on >12Gb GPU
224
+ # CF: Probably not needed anymore
225
+ #global models
226
+ #models.clear()
227
+ #gc.collect()
228
+ #torch.cuda.empty_cache()
229
+ # to here...
230
+
231
+ model_key = f"{model_type}_small" if use_small or USE_SMALL_MODELS else model_type
232
+ model_info = REMOTE_MODEL_PATHS[model_key]
233
+ if not os.path.exists(ckpt_path):
234
+ logger.info(f"{model_type} model not found, downloading into `{CACHE_DIR}`.")
235
+ ## added next two lines to make it super clear which model is being downloaded
236
+ remote_filename = hf_hub_url(model_info["repo_id"], model_info["file_name"])
237
+ print(f"Downloading {model_key} {model_info['repo_id']} remote model file {remote_filename} {model_info['file_name']} to {CACHE_DIR}")
238
+ _download(model_info["repo_id"], model_info["file_name"])
239
+ # add next line to make it super clear which model is being loaded
240
+ print(f"Loading {model_key} model from {ckpt_path} to {device}") # added
241
+ checkpoint = torch.load(ckpt_path, map_location=device)
242
+ # this is a hack
243
+ model_args = checkpoint["model_args"]
244
+ if "input_vocab_size" not in model_args:
245
+ model_args["input_vocab_size"] = model_args["vocab_size"]
246
+ model_args["output_vocab_size"] = model_args["vocab_size"]
247
+ del model_args["vocab_size"]
248
+ gptconf = ConfigClass(**checkpoint["model_args"])
249
+ model = ModelClass(gptconf)
250
+ state_dict = checkpoint["model"]
251
+ # fixup checkpoint
252
+ unwanted_prefix = "_orig_mod."
253
+ for k, v in list(state_dict.items()):
254
+ if k.startswith(unwanted_prefix):
255
+ state_dict[k[len(unwanted_prefix) :]] = state_dict.pop(k)
256
+ extra_keys = set(state_dict.keys()) - set(model.state_dict().keys())
257
+ extra_keys = set([k for k in extra_keys if not k.endswith(".attn.bias")])
258
+ missing_keys = set(model.state_dict().keys()) - set(state_dict.keys())
259
+ missing_keys = set([k for k in missing_keys if not k.endswith(".attn.bias")])
260
+ if len(extra_keys) != 0:
261
+ raise ValueError(f"extra keys found: {extra_keys}")
262
+ if len(missing_keys) != 0:
263
+ raise ValueError(f"missing keys: {missing_keys}")
264
+ model.load_state_dict(state_dict, strict=False)
265
+ n_params = model.get_num_params()
266
+ val_loss = checkpoint["best_val_loss"].item()
267
+ logger.info(f"model loaded: {round(n_params/1e6,1)}M params, {round(val_loss,3)} loss")
268
+ model.eval()
269
+ model.to(device)
270
+ del checkpoint, state_dict
271
+ _clear_cuda_cache()
272
+ if model_type == "text":
273
+ tokenizer = BertTokenizer.from_pretrained("bert-base-multilingual-cased")
274
+ return {
275
+ "model": model,
276
+ "tokenizer": tokenizer,
277
+ }
278
+ return model
279
+
280
+
281
+ def _load_codec_model(device):
282
+ model = EncodecModel.encodec_model_24khz()
283
+ model.set_target_bandwidth(6.0)
284
+ model.eval()
285
+ model.to(device)
286
+ _clear_cuda_cache()
287
+ return model
288
+
289
+
290
+ def load_model(use_gpu=True, use_small=False, force_reload=False, model_type="text"):
291
+ _load_model_f = funcy.partial(_load_model, model_type=model_type, use_small=use_small)
292
+ if model_type not in ("text", "coarse", "fine"):
293
+ raise NotImplementedError()
294
+ global models
295
+ global models_devices
296
+ device = grab_best_device(use_gpu=use_gpu)
297
+ model_key = f"{model_type}"
298
+ if OFFLOAD_CPU:
299
+ models_devices[model_key] = device
300
+ device = "cpu"
301
+ if model_key not in models or force_reload:
302
+ ckpt_path = _get_ckpt_path(model_type, use_small=use_small)
303
+ clean_models(model_key=model_key)
304
+ model = _load_model_f(ckpt_path, device)
305
+ models[model_key] = model
306
+ if model_type == "text":
307
+ models[model_key]["model"].to(device)
308
+ else:
309
+ models[model_key].to(device)
310
+ return models[model_key]
311
+
312
+
313
+ def load_codec_model(use_gpu=True, force_reload=False):
314
+ global models
315
+ global models_devices
316
+ device = grab_best_device(use_gpu=use_gpu)
317
+ if device == "mps":
318
+ # encodec doesn't support mps
319
+ device = "cpu"
320
+ model_key = "codec"
321
+ if OFFLOAD_CPU:
322
+ models_devices[model_key] = device
323
+ device = "cpu"
324
+ if model_key not in models or force_reload:
325
+ clean_models(model_key=model_key)
326
+ model = _load_codec_model(device)
327
+ models[model_key] = model
328
+ models[model_key].to(device)
329
+ return models[model_key]
330
+
331
+
332
+ def preload_models(
333
+ text_use_gpu=True,
334
+ text_use_small=False,
335
+ coarse_use_gpu=True,
336
+ coarse_use_small=False,
337
+ fine_use_gpu=True,
338
+ fine_use_small=False,
339
+ codec_use_gpu=True,
340
+ force_reload=False
341
+ ):
342
+ """Load all the necessary models for the pipeline."""
343
+ if grab_best_device() == "cpu" and (
344
+ text_use_gpu or coarse_use_gpu or fine_use_gpu or codec_use_gpu
345
+ ):
346
+ logger.warning("No GPU being used. Careful, inference might be very slow!")
347
+ _ = load_model(
348
+ model_type="text", use_gpu=text_use_gpu, use_small=text_use_small, force_reload=force_reload
349
+ )
350
+ _ = load_model(
351
+ model_type="coarse",
352
+ use_gpu=coarse_use_gpu,
353
+ use_small=coarse_use_small,
354
+ force_reload=force_reload,
355
+ )
356
+ _ = load_model(
357
+ model_type="fine", use_gpu=fine_use_gpu, use_small=fine_use_small, force_reload=force_reload
358
+ )
359
+ _ = load_codec_model(use_gpu=codec_use_gpu, force_reload=force_reload)
360
+
361
+
362
+ ####
363
+ # Generation Functionality
364
+ ####
365
+
366
+
367
+ def _tokenize(tokenizer, text):
368
+ return tokenizer.encode(text, add_special_tokens=False)
369
+
370
+
371
+ def _detokenize(tokenizer, enc_text):
372
+ return tokenizer.decode(enc_text)
373
+
374
+
375
+ def _normalize_whitespace(text):
376
+ return re.sub(r"\s+", " ", text).strip()
377
+
378
+
379
+ TEXT_ENCODING_OFFSET = 10_048
380
+ SEMANTIC_PAD_TOKEN = 10_000
381
+ TEXT_PAD_TOKEN = 129_595
382
+ SEMANTIC_INFER_TOKEN = 129_599
383
+
384
+
385
+ def _load_history_prompt(history_prompt_input):
386
+ if isinstance(history_prompt_input, str) and history_prompt_input.endswith(".npz"):
387
+ history_prompt = np.load(history_prompt_input)
388
+ elif isinstance(history_prompt_input, str):
389
+ # make sure this works on non-ubuntu
390
+ history_prompt_input = os.path.join(*history_prompt_input.split("/"))
391
+ # if history_prompt_input not in ALLOWED_PROMPTS:
392
+ # raise ValueError("history prompt not found")
393
+ history_prompt = np.load(
394
+ os.path.join(CUR_PATH, "assets", "prompts", f"{history_prompt_input}.npz")
395
+ )
396
+ elif isinstance(history_prompt_input, dict):
397
+ assert("semantic_prompt" in history_prompt_input)
398
+ assert("coarse_prompt" in history_prompt_input)
399
+ assert("fine_prompt" in history_prompt_input)
400
+ history_prompt = history_prompt_input
401
+ else:
402
+ raise ValueError("history prompt format unrecognized")
403
+ return history_prompt
404
+
405
+
406
+ def generate_text_semantic(
407
+ text,
408
+ history_prompt=None,
409
+ temp=0.7,
410
+ top_k=None,
411
+ top_p=None,
412
+ silent=False,
413
+ min_eos_p=0.2,
414
+ max_gen_duration_s=None,
415
+ allow_early_stop=True,
416
+ use_kv_caching=False,
417
+ ):
418
+ """Generate semantic tokens from text."""
419
+ assert isinstance(text, str)
420
+ text = _normalize_whitespace(text)
421
+ assert len(text.strip()) > 0
422
+ if history_prompt is not None:
423
+ history_prompt = _load_history_prompt(history_prompt)
424
+ semantic_history = history_prompt["semantic_prompt"]
425
+ assert (
426
+ isinstance(semantic_history, np.ndarray)
427
+ and len(semantic_history.shape) == 1
428
+ and len(semantic_history) > 0
429
+ and semantic_history.min() >= 0
430
+ and semantic_history.max() <= SEMANTIC_VOCAB_SIZE - 1
431
+ )
432
+ else:
433
+ semantic_history = None
434
+ # load models if not yet exist
435
+ global models
436
+ global models_devices
437
+ if "text" not in models:
438
+ preload_models()
439
+ model_container = models["text"]
440
+ model = model_container["model"]
441
+ tokenizer = model_container["tokenizer"]
442
+ encoded_text = np.array(_tokenize(tokenizer, text)) + TEXT_ENCODING_OFFSET
443
+ if OFFLOAD_CPU:
444
+ model.to(models_devices["text"])
445
+ device = next(model.parameters()).device
446
+ if len(encoded_text) > 256:
447
+ p = round((len(encoded_text) - 256) / len(encoded_text) * 100, 1)
448
+ logger.warning(f"warning, text too long, lopping of last {p}%")
449
+ encoded_text = encoded_text[:256]
450
+ encoded_text = np.pad(
451
+ encoded_text,
452
+ (0, 256 - len(encoded_text)),
453
+ constant_values=TEXT_PAD_TOKEN,
454
+ mode="constant",
455
+ )
456
+ if semantic_history is not None:
457
+ semantic_history = semantic_history.astype(np.int64)
458
+ # lop off if history is too long, pad if needed
459
+ semantic_history = semantic_history[-256:]
460
+ semantic_history = np.pad(
461
+ semantic_history,
462
+ (0, 256 - len(semantic_history)),
463
+ constant_values=SEMANTIC_PAD_TOKEN,
464
+ mode="constant",
465
+ )
466
+ else:
467
+ semantic_history = np.array([SEMANTIC_PAD_TOKEN] * 256)
468
+ x = torch.from_numpy(
469
+ np.hstack([
470
+ encoded_text, semantic_history, np.array([SEMANTIC_INFER_TOKEN])
471
+ ]).astype(np.int64)
472
+ )[None]
473
+ assert x.shape[1] == 256 + 256 + 1
474
+ with _inference_mode():
475
+ x = x.to(device)
476
+ n_tot_steps = 768
477
+ # custom tqdm updates since we don't know when eos will occur
478
+ pbar = tqdm.tqdm(disable=silent, total=100)
479
+ pbar_state = 0
480
+ tot_generated_duration_s = 0
481
+ kv_cache = None
482
+ for n in range(n_tot_steps):
483
+ if use_kv_caching and kv_cache is not None:
484
+ x_input = x[:, [-1]]
485
+ else:
486
+ x_input = x
487
+ logits, kv_cache = model(
488
+ x_input, merge_context=True, use_cache=use_kv_caching, past_kv=kv_cache
489
+ )
490
+ relevant_logits = logits[0, 0, :SEMANTIC_VOCAB_SIZE]
491
+ if allow_early_stop:
492
+ relevant_logits = torch.hstack(
493
+ (relevant_logits, logits[0, 0, [SEMANTIC_PAD_TOKEN]]) # eos
494
+ )
495
+ if top_p is not None:
496
+ # faster to convert to numpy
497
+ original_device = relevant_logits.device
498
+ relevant_logits = relevant_logits.detach().cpu().type(torch.float32).numpy()
499
+ sorted_indices = np.argsort(relevant_logits)[::-1]
500
+ sorted_logits = relevant_logits[sorted_indices]
501
+ cumulative_probs = np.cumsum(softmax(sorted_logits))
502
+ sorted_indices_to_remove = cumulative_probs > top_p
503
+ sorted_indices_to_remove[1:] = sorted_indices_to_remove[:-1].copy()
504
+ sorted_indices_to_remove[0] = False
505
+ relevant_logits[sorted_indices[sorted_indices_to_remove]] = -np.inf
506
+ relevant_logits = torch.from_numpy(relevant_logits)
507
+ relevant_logits = relevant_logits.to(original_device)
508
+ if top_k is not None:
509
+ v, _ = torch.topk(relevant_logits, min(top_k, relevant_logits.size(-1)))
510
+ relevant_logits[relevant_logits < v[-1]] = -float("Inf")
511
+ probs = F.softmax(relevant_logits / temp, dim=-1)
512
+ # multinomial bugged on mps: shuttle to cpu if necessary
513
+ inf_device = probs.device
514
+ if probs.device.type == "mps":
515
+ probs = probs.to("cpu")
516
+ item_next = torch.multinomial(probs, num_samples=1)
517
+ probs = probs.to(inf_device)
518
+ item_next = item_next.to(inf_device)
519
+ if allow_early_stop and (
520
+ item_next == SEMANTIC_VOCAB_SIZE
521
+ or (min_eos_p is not None and probs[-1] >= min_eos_p)
522
+ ):
523
+ # eos found, so break
524
+ pbar.update(100 - pbar_state)
525
+ break
526
+ x = torch.cat((x, item_next[None]), dim=1)
527
+ tot_generated_duration_s += 1 / SEMANTIC_RATE_HZ
528
+ if max_gen_duration_s is not None and tot_generated_duration_s > max_gen_duration_s:
529
+ pbar.update(100 - pbar_state)
530
+ break
531
+ if n == n_tot_steps - 1:
532
+ pbar.update(100 - pbar_state)
533
+ break
534
+ del logits, relevant_logits, probs, item_next
535
+ req_pbar_state = np.min([100, int(round(100 * n / n_tot_steps))])
536
+ if req_pbar_state > pbar_state:
537
+ pbar.update(req_pbar_state - pbar_state)
538
+ pbar_state = req_pbar_state
539
+ pbar.close()
540
+ out = x.detach().cpu().numpy().squeeze()[256 + 256 + 1 :]
541
+ if OFFLOAD_CPU:
542
+ model.to("cpu")
543
+ assert all(0 <= out) and all(out < SEMANTIC_VOCAB_SIZE)
544
+ _clear_cuda_cache()
545
+ return out
546
+
547
+
548
+ def _flatten_codebooks(arr, offset_size=CODEBOOK_SIZE):
549
+ assert len(arr.shape) == 2
550
+ arr = arr.copy()
551
+ if offset_size is not None:
552
+ for n in range(1, arr.shape[0]):
553
+ arr[n, :] += offset_size * n
554
+ flat_arr = arr.ravel("F")
555
+ return flat_arr
556
+
557
+
558
+ COARSE_SEMANTIC_PAD_TOKEN = 12_048
559
+ COARSE_INFER_TOKEN = 12_050
560
+
561
+
562
+ def generate_coarse(
563
+ x_semantic,
564
+ history_prompt=None,
565
+ temp=0.7,
566
+ top_k=None,
567
+ top_p=None,
568
+ silent=False,
569
+ max_coarse_history=630, # min 60 (faster), max 630 (more context)
570
+ sliding_window_len=60,
571
+ use_kv_caching=False,
572
+ ):
573
+ """Generate coarse audio codes from semantic tokens."""
574
+ # CF: Uncommented because it breaks swap voice more than once
575
+ # assert (
576
+ # isinstance(x_semantic, np.ndarray)
577
+ # and len(x_semantic.shape) == 1
578
+ # and len(x_semantic) > 0
579
+ # and x_semantic.min() >= 0
580
+ # and x_semantic.max() <= SEMANTIC_VOCAB_SIZE - 1
581
+ # )
582
+ assert 60 <= max_coarse_history <= 630
583
+ assert max_coarse_history + sliding_window_len <= 1024 - 256
584
+ semantic_to_coarse_ratio = COARSE_RATE_HZ / SEMANTIC_RATE_HZ * N_COARSE_CODEBOOKS
585
+ max_semantic_history = int(np.floor(max_coarse_history / semantic_to_coarse_ratio))
586
+ if history_prompt is not None:
587
+ history_prompt = _load_history_prompt(history_prompt)
588
+ x_semantic_history = history_prompt["semantic_prompt"]
589
+ x_coarse_history = history_prompt["coarse_prompt"]
590
+ assert (
591
+ isinstance(x_semantic_history, np.ndarray)
592
+ and len(x_semantic_history.shape) == 1
593
+ and len(x_semantic_history) > 0
594
+ and x_semantic_history.min() >= 0
595
+ and x_semantic_history.max() <= SEMANTIC_VOCAB_SIZE - 1
596
+ and isinstance(x_coarse_history, np.ndarray)
597
+ and len(x_coarse_history.shape) == 2
598
+ and x_coarse_history.shape[0] == N_COARSE_CODEBOOKS
599
+ and x_coarse_history.shape[-1] >= 0
600
+ and x_coarse_history.min() >= 0
601
+ and x_coarse_history.max() <= CODEBOOK_SIZE - 1
602
+ #and (
603
+ # round(x_coarse_history.shape[-1] / len(x_semantic_history), 1)
604
+ # == round(semantic_to_coarse_ratio / N_COARSE_CODEBOOKS, 1)
605
+ #)
606
+ )
607
+ x_coarse_history = _flatten_codebooks(x_coarse_history) + SEMANTIC_VOCAB_SIZE
608
+ # trim histories correctly
609
+ n_semantic_hist_provided = np.min(
610
+ [
611
+ max_semantic_history,
612
+ len(x_semantic_history) - len(x_semantic_history) % 2,
613
+ int(np.floor(len(x_coarse_history) / semantic_to_coarse_ratio)),
614
+ ]
615
+ )
616
+ n_coarse_hist_provided = int(round(n_semantic_hist_provided * semantic_to_coarse_ratio))
617
+ x_semantic_history = x_semantic_history[-n_semantic_hist_provided:].astype(np.int32)
618
+ x_coarse_history = x_coarse_history[-n_coarse_hist_provided:].astype(np.int32)
619
+ # TODO: bit of a hack for time alignment (sounds better)
620
+ x_coarse_history = x_coarse_history[:-2]
621
+ else:
622
+ x_semantic_history = np.array([], dtype=np.int32)
623
+ x_coarse_history = np.array([], dtype=np.int32)
624
+ # load models if not yet exist
625
+ global models
626
+ global models_devices
627
+ if "coarse" not in models:
628
+ preload_models()
629
+ model = models["coarse"]
630
+ if OFFLOAD_CPU:
631
+ model.to(models_devices["coarse"])
632
+ device = next(model.parameters()).device
633
+ # start loop
634
+ n_steps = int(
635
+ round(
636
+ np.floor(len(x_semantic) * semantic_to_coarse_ratio / N_COARSE_CODEBOOKS)
637
+ * N_COARSE_CODEBOOKS
638
+ )
639
+ )
640
+ assert n_steps > 0 and n_steps % N_COARSE_CODEBOOKS == 0
641
+ x_semantic = np.hstack([x_semantic_history, x_semantic]).astype(np.int32)
642
+ x_coarse = x_coarse_history.astype(np.int32)
643
+ base_semantic_idx = len(x_semantic_history)
644
+ with _inference_mode():
645
+ x_semantic_in = torch.from_numpy(x_semantic)[None].to(device)
646
+ x_coarse_in = torch.from_numpy(x_coarse)[None].to(device)
647
+ n_window_steps = int(np.ceil(n_steps / sliding_window_len))
648
+ n_step = 0
649
+ for _ in tqdm.tqdm(range(n_window_steps), total=n_window_steps, disable=silent):
650
+ semantic_idx = base_semantic_idx + int(round(n_step / semantic_to_coarse_ratio))
651
+ # pad from right side
652
+ x_in = x_semantic_in[:, np.max([0, semantic_idx - max_semantic_history]) :]
653
+ x_in = x_in[:, :256]
654
+ x_in = F.pad(
655
+ x_in,
656
+ (0, 256 - x_in.shape[-1]),
657
+ "constant",
658
+ COARSE_SEMANTIC_PAD_TOKEN,
659
+ )
660
+ x_in = torch.hstack(
661
+ [
662
+ x_in,
663
+ torch.tensor([COARSE_INFER_TOKEN])[None].to(device),
664
+ x_coarse_in[:, -max_coarse_history:],
665
+ ]
666
+ )
667
+ kv_cache = None
668
+ for _ in range(sliding_window_len):
669
+ if n_step >= n_steps:
670
+ continue
671
+ is_major_step = n_step % N_COARSE_CODEBOOKS == 0
672
+
673
+ if use_kv_caching and kv_cache is not None:
674
+ x_input = x_in[:, [-1]]
675
+ else:
676
+ x_input = x_in
677
+
678
+ logits, kv_cache = model(x_input, use_cache=use_kv_caching, past_kv=kv_cache)
679
+ logit_start_idx = (
680
+ SEMANTIC_VOCAB_SIZE + (1 - int(is_major_step)) * CODEBOOK_SIZE
681
+ )
682
+ logit_end_idx = (
683
+ SEMANTIC_VOCAB_SIZE + (2 - int(is_major_step)) * CODEBOOK_SIZE
684
+ )
685
+ relevant_logits = logits[0, 0, logit_start_idx:logit_end_idx]
686
+ if top_p is not None:
687
+ # faster to convert to numpy
688
+ original_device = relevant_logits.device
689
+ relevant_logits = relevant_logits.detach().cpu().type(torch.float32).numpy()
690
+ sorted_indices = np.argsort(relevant_logits)[::-1]
691
+ sorted_logits = relevant_logits[sorted_indices]
692
+ cumulative_probs = np.cumsum(softmax(sorted_logits))
693
+ sorted_indices_to_remove = cumulative_probs > top_p
694
+ sorted_indices_to_remove[1:] = sorted_indices_to_remove[:-1].copy()
695
+ sorted_indices_to_remove[0] = False
696
+ relevant_logits[sorted_indices[sorted_indices_to_remove]] = -np.inf
697
+ relevant_logits = torch.from_numpy(relevant_logits)
698
+ relevant_logits = relevant_logits.to(original_device)
699
+ if top_k is not None:
700
+ v, _ = torch.topk(relevant_logits, min(top_k, relevant_logits.size(-1)))
701
+ relevant_logits[relevant_logits < v[-1]] = -float("Inf")
702
+ probs = F.softmax(relevant_logits / temp, dim=-1)
703
+ # multinomial bugged on mps: shuttle to cpu if necessary
704
+ inf_device = probs.device
705
+ if probs.device.type == "mps":
706
+ probs = probs.to("cpu")
707
+ item_next = torch.multinomial(probs, num_samples=1)
708
+ probs = probs.to(inf_device)
709
+ item_next = item_next.to(inf_device)
710
+ item_next += logit_start_idx
711
+ x_coarse_in = torch.cat((x_coarse_in, item_next[None]), dim=1)
712
+ x_in = torch.cat((x_in, item_next[None]), dim=1)
713
+ del logits, relevant_logits, probs, item_next
714
+ n_step += 1
715
+ del x_in
716
+ del x_semantic_in
717
+ if OFFLOAD_CPU:
718
+ model.to("cpu")
719
+ gen_coarse_arr = x_coarse_in.detach().cpu().numpy().squeeze()[len(x_coarse_history) :]
720
+ del x_coarse_in
721
+ assert len(gen_coarse_arr) == n_steps
722
+ gen_coarse_audio_arr = gen_coarse_arr.reshape(-1, N_COARSE_CODEBOOKS).T - SEMANTIC_VOCAB_SIZE
723
+ for n in range(1, N_COARSE_CODEBOOKS):
724
+ gen_coarse_audio_arr[n, :] -= n * CODEBOOK_SIZE
725
+ _clear_cuda_cache()
726
+ return gen_coarse_audio_arr
727
+
728
+
729
+ def generate_fine(
730
+ x_coarse_gen,
731
+ history_prompt=None,
732
+ temp=0.5,
733
+ silent=True,
734
+ ):
735
+ """Generate full audio codes from coarse audio codes."""
736
+ assert (
737
+ isinstance(x_coarse_gen, np.ndarray)
738
+ and len(x_coarse_gen.shape) == 2
739
+ and 1 <= x_coarse_gen.shape[0] <= N_FINE_CODEBOOKS - 1
740
+ and x_coarse_gen.shape[1] > 0
741
+ and x_coarse_gen.min() >= 0
742
+ and x_coarse_gen.max() <= CODEBOOK_SIZE - 1
743
+ )
744
+ if history_prompt is not None:
745
+ history_prompt = _load_history_prompt(history_prompt)
746
+ x_fine_history = history_prompt["fine_prompt"]
747
+ assert (
748
+ isinstance(x_fine_history, np.ndarray)
749
+ and len(x_fine_history.shape) == 2
750
+ and x_fine_history.shape[0] == N_FINE_CODEBOOKS
751
+ and x_fine_history.shape[1] >= 0
752
+ and x_fine_history.min() >= 0
753
+ and x_fine_history.max() <= CODEBOOK_SIZE - 1
754
+ )
755
+ else:
756
+ x_fine_history = None
757
+ n_coarse = x_coarse_gen.shape[0]
758
+ # load models if not yet exist
759
+ global models
760
+ global models_devices
761
+ if "fine" not in models:
762
+ preload_models()
763
+ model = models["fine"]
764
+ if OFFLOAD_CPU:
765
+ model.to(models_devices["fine"])
766
+ device = next(model.parameters()).device
767
+ # make input arr
768
+ in_arr = np.vstack(
769
+ [
770
+ x_coarse_gen,
771
+ np.zeros((N_FINE_CODEBOOKS - n_coarse, x_coarse_gen.shape[1]))
772
+ + CODEBOOK_SIZE, # padding
773
+ ]
774
+ ).astype(np.int32)
775
+ # prepend history if available (max 512)
776
+ if x_fine_history is not None:
777
+ x_fine_history = x_fine_history.astype(np.int32)
778
+ in_arr = np.hstack(
779
+ [
780
+ x_fine_history[:, -512:].astype(np.int32),
781
+ in_arr,
782
+ ]
783
+ )
784
+ n_history = x_fine_history[:, -512:].shape[1]
785
+ else:
786
+ n_history = 0
787
+ n_remove_from_end = 0
788
+ # need to pad if too short (since non-causal model)
789
+ if in_arr.shape[1] < 1024:
790
+ n_remove_from_end = 1024 - in_arr.shape[1]
791
+ in_arr = np.hstack(
792
+ [
793
+ in_arr,
794
+ np.zeros((N_FINE_CODEBOOKS, n_remove_from_end), dtype=np.int32) + CODEBOOK_SIZE,
795
+ ]
796
+ )
797
+ # we can be lazy about fractional loop and just keep overwriting codebooks
798
+ n_loops = np.max([0, int(np.ceil((x_coarse_gen.shape[1] - (1024 - n_history)) / 512))]) + 1
799
+ with _inference_mode():
800
+ in_arr = torch.tensor(in_arr.T).to(device)
801
+ for n in tqdm.tqdm(range(n_loops), disable=silent):
802
+ start_idx = np.min([n * 512, in_arr.shape[0] - 1024])
803
+ start_fill_idx = np.min([n_history + n * 512, in_arr.shape[0] - 512])
804
+ rel_start_fill_idx = start_fill_idx - start_idx
805
+ in_buffer = in_arr[start_idx : start_idx + 1024, :][None]
806
+ for nn in range(n_coarse, N_FINE_CODEBOOKS):
807
+ logits = model(nn, in_buffer)
808
+ if temp is None:
809
+ relevant_logits = logits[0, rel_start_fill_idx:, :CODEBOOK_SIZE]
810
+ codebook_preds = torch.argmax(relevant_logits, -1)
811
+ else:
812
+ relevant_logits = logits[0, :, :CODEBOOK_SIZE] / temp
813
+ probs = F.softmax(relevant_logits, dim=-1)
814
+ # multinomial bugged on mps: shuttle to cpu if necessary
815
+ inf_device = probs.device
816
+ if probs.device.type == "mps":
817
+ probs = probs.to("cpu")
818
+ codebook_preds = torch.hstack(
819
+ [
820
+ torch.multinomial(probs[nnn], num_samples=1).to(inf_device)
821
+ for nnn in range(rel_start_fill_idx, 1024)
822
+ ]
823
+ )
824
+ in_buffer[0, rel_start_fill_idx:, nn] = codebook_preds
825
+ del logits, codebook_preds
826
+ # transfer over info into model_in and convert to numpy
827
+ for nn in range(n_coarse, N_FINE_CODEBOOKS):
828
+ in_arr[
829
+ start_fill_idx : start_fill_idx + (1024 - rel_start_fill_idx), nn
830
+ ] = in_buffer[0, rel_start_fill_idx:, nn]
831
+ del in_buffer
832
+ gen_fine_arr = in_arr.detach().cpu().numpy().squeeze().T
833
+ del in_arr
834
+ if OFFLOAD_CPU:
835
+ model.to("cpu")
836
+ gen_fine_arr = gen_fine_arr[:, n_history:]
837
+ if n_remove_from_end > 0:
838
+ gen_fine_arr = gen_fine_arr[:, :-n_remove_from_end]
839
+ assert gen_fine_arr.shape[-1] == x_coarse_gen.shape[-1]
840
+ _clear_cuda_cache()
841
+ return gen_fine_arr
842
+
843
+
844
+ def codec_decode(fine_tokens):
845
+ """Turn quantized audio codes into audio array using encodec."""
846
+ # load models if not yet exist
847
+ global models
848
+ global models_devices
849
+ if "codec" not in models:
850
+ preload_models()
851
+ model = models["codec"]
852
+ if OFFLOAD_CPU:
853
+ model.to(models_devices["codec"])
854
+ device = next(model.parameters()).device
855
+ arr = torch.from_numpy(fine_tokens)[None]
856
+ arr = arr.to(device)
857
+ arr = arr.transpose(0, 1)
858
+ emb = model.quantizer.decode(arr)
859
+ out = model.decoder(emb)
860
+ audio_arr = out.detach().cpu().numpy().squeeze()
861
+ del arr, emb, out
862
+ if OFFLOAD_CPU:
863
+ model.to("cpu")
864
+ return audio_arr
bark/hubert/__init__.py ADDED
File without changes
bark/hubert/customtokenizer.py ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Custom tokenizer model.
3
+ Author: https://www.github.com/gitmylo/
4
+ License: MIT
5
+ """
6
+
7
+ import json
8
+ import os.path
9
+ from zipfile import ZipFile
10
+
11
+ import numpy
12
+ import torch
13
+ from torch import nn, optim
14
+ from torch.serialization import MAP_LOCATION
15
+ from tqdm.auto import tqdm
16
+
17
+
18
+ class CustomTokenizer(nn.Module):
19
+ def __init__(self, hidden_size=1024, input_size=768, output_size=10000, version=0):
20
+ super(CustomTokenizer, self).__init__()
21
+ next_size = input_size
22
+ if version == 0:
23
+ self.lstm = nn.LSTM(input_size, hidden_size, 2, batch_first=True)
24
+ next_size = hidden_size
25
+ if version == 1:
26
+ self.lstm = nn.LSTM(input_size, hidden_size, 2, batch_first=True)
27
+ self.intermediate = nn.Linear(hidden_size, 4096)
28
+ next_size = 4096
29
+
30
+ self.fc = nn.Linear(next_size, output_size)
31
+ self.softmax = nn.LogSoftmax(dim=1)
32
+ self.optimizer: optim.Optimizer = None
33
+ self.lossfunc = nn.CrossEntropyLoss()
34
+ self.input_size = input_size
35
+ self.hidden_size = hidden_size
36
+ self.output_size = output_size
37
+ self.version = version
38
+
39
+ def forward(self, x):
40
+ x, _ = self.lstm(x)
41
+ if self.version == 1:
42
+ x = self.intermediate(x)
43
+ x = self.fc(x)
44
+ x = self.softmax(x)
45
+ return x
46
+
47
+ @torch.no_grad()
48
+ def get_token(self, x):
49
+ """
50
+ Used to get the token for the first
51
+ :param x: An array with shape (N, input_size) where N is a whole number greater or equal to 1, and input_size is the input size used when creating the model.
52
+ :return: An array with shape (N,) where N is the same as N from the input. Every number in the array is a whole number in range 0...output_size - 1 where output_size is the output size used when creating the model.
53
+ """
54
+ return torch.argmax(self(x), dim=1)
55
+
56
+ def prepare_training(self):
57
+ self.optimizer = optim.Adam(self.parameters(), 0.001)
58
+
59
+ def train_step(self, x_train, y_train, log_loss=False):
60
+ # y_train = y_train[:-1]
61
+ # y_train = y_train[1:]
62
+
63
+ optimizer = self.optimizer
64
+ lossfunc = self.lossfunc
65
+ # Zero the gradients
66
+ self.zero_grad()
67
+
68
+ # Forward pass
69
+ y_pred = self(x_train)
70
+
71
+ y_train_len = len(y_train)
72
+ y_pred_len = y_pred.shape[0]
73
+
74
+ if y_train_len > y_pred_len:
75
+ diff = y_train_len - y_pred_len
76
+ y_train = y_train[diff:]
77
+ elif y_train_len < y_pred_len:
78
+ diff = y_pred_len - y_train_len
79
+ y_pred = y_pred[:-diff, :]
80
+
81
+ y_train_hot = torch.zeros(len(y_train), self.output_size)
82
+ y_train_hot[range(len(y_train)), y_train] = 1
83
+ y_train_hot = y_train_hot.to('cuda')
84
+
85
+ # Calculate the loss
86
+ loss = lossfunc(y_pred, y_train_hot)
87
+
88
+ # Print loss
89
+ if log_loss:
90
+ print('Loss', loss.item())
91
+
92
+ # Backward pass
93
+ loss.backward()
94
+
95
+ # Update the weights
96
+ optimizer.step()
97
+
98
+ def save(self, path):
99
+ info_path = '.'.join(os.path.basename(path).split('.')[:-1]) + '/.info'
100
+ torch.save(self.state_dict(), path)
101
+ data_from_model = Data(self.input_size, self.hidden_size, self.output_size, self.version)
102
+ with ZipFile(path, 'a') as model_zip:
103
+ model_zip.writestr(info_path, data_from_model.save())
104
+ model_zip.close()
105
+
106
+ @staticmethod
107
+ def load_from_checkpoint(path, map_location: MAP_LOCATION = None):
108
+ old = True
109
+ with ZipFile(path) as model_zip:
110
+ filesMatch = [file for file in model_zip.namelist() if file.endswith('/.info')]
111
+ file = filesMatch[0] if filesMatch else None
112
+ if file:
113
+ old = False
114
+ print(f"Loading Custom Hubert Tokenizer {path}")
115
+ data_from_model = Data.load(model_zip.read(file).decode('utf-8'))
116
+ model_zip.close()
117
+ if old:
118
+ model = CustomTokenizer()
119
+ else:
120
+ model = CustomTokenizer(data_from_model.hidden_size, data_from_model.input_size, data_from_model.output_size, data_from_model.version)
121
+ model.load_state_dict(torch.load(path))
122
+ if map_location:
123
+ model = model.to(map_location)
124
+ return model
125
+
126
+
127
+
128
+ class Data:
129
+ input_size: int
130
+ hidden_size: int
131
+ output_size: int
132
+ version: int
133
+
134
+ def __init__(self, input_size=768, hidden_size=1024, output_size=10000, version=0):
135
+ self.input_size = input_size
136
+ self.hidden_size = hidden_size
137
+ self.output_size = output_size
138
+ self.version = version
139
+
140
+ @staticmethod
141
+ def load(string):
142
+ data = json.loads(string)
143
+ return Data(data['input_size'], data['hidden_size'], data['output_size'], data['version'])
144
+
145
+ def save(self):
146
+ data = {
147
+ 'input_size': self.input_size,
148
+ 'hidden_size': self.hidden_size,
149
+ 'output_size': self.output_size,
150
+ 'version': self.version,
151
+ }
152
+ return json.dumps(data)
153
+
154
+
155
+ def auto_train(data_path, save_path='model.pth', load_model: str | None = None, save_epochs=1, max_epochs=14):
156
+ data_x, data_y = [], []
157
+
158
+ if load_model and os.path.isfile(load_model):
159
+ print('Loading model from', load_model)
160
+ model_training = CustomTokenizer.load_from_checkpoint(load_model, 'cuda')
161
+ else:
162
+ print('Creating new model.')
163
+ model_training = CustomTokenizer(version=1).to('cuda') # Settings for the model to run without lstm
164
+ save_path = os.path.join(data_path, save_path)
165
+ base_save_path = '.'.join(save_path.split('.')[:-1])
166
+
167
+ sem_string = '_semantic.npy'
168
+ feat_string = '_semantic_features.npy'
169
+
170
+ ready = os.path.join(data_path, 'ready')
171
+ for input_file in os.listdir(ready):
172
+ full_path = os.path.join(ready, input_file)
173
+ if input_file.endswith(sem_string):
174
+ data_y.append(numpy.load(full_path))
175
+ elif input_file.endswith(feat_string):
176
+ data_x.append(numpy.load(full_path))
177
+ model_training.prepare_training()
178
+
179
+ epoch = 1
180
+ with tqdm(total=((len(data_x) * len(data_y)) / 50) * save_epochs) as pbar1:
181
+ while epoch <= max_epochs:
182
+ for i in range(save_epochs):
183
+ j = 0
184
+ for x, y in zip(data_x, data_y):
185
+ model_training.train_step(torch.tensor(x).to('cuda'), torch.tensor(y).to('cuda'), j % 50 == 0) # Print loss every 50 steps
186
+ j += 1
187
+ pbar1.update()
188
+
189
+ save_p = save_path
190
+ save_p_2 = f'{base_save_path}_epoch_{epoch}.pth'
191
+ model_training.save(save_p)
192
+ model_training.save(save_p_2)
193
+ print(f'Epoch {epoch} completed')
194
+ epoch += 1
195
+ print(f'Done training for {max_epochs} epochs!')
bark/hubert/hubert_manager.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os.path
2
+ import shutil
3
+ import urllib.request
4
+
5
+ import huggingface_hub
6
+
7
+
8
+ class HuBERTManager:
9
+
10
+
11
+ @staticmethod
12
+ def make_sure_hubert_installed(download_url: str = 'https://dl.fbaipublicfiles.com/hubert/hubert_base_ls960.pt', file_name: str = 'hubert.pt'):
13
+ install_dir = os.path.join('models', 'hubert')
14
+ if not os.path.isdir(install_dir):
15
+ os.makedirs(install_dir, exist_ok=True)
16
+ install_file = os.path.join(install_dir, file_name)
17
+ if not os.path.isfile(install_file):
18
+ print(f'Downloading HuBERT base model from {download_url}')
19
+ urllib.request.urlretrieve(download_url, install_file)
20
+ print('Downloaded HuBERT')
21
+ return install_file
22
+
23
+
24
+ @staticmethod
25
+ def make_sure_tokenizer_installed(model: str = 'quantifier_hubert_base_ls960_14.pth', repo: str = 'GitMylo/bark-voice-cloning', tokenizer_lang: str = 'en'):
26
+ local_file = tokenizer_lang + '_tokenizer.pth'
27
+ install_dir = os.path.join('models', 'hubert')
28
+ if not os.path.isdir(install_dir):
29
+ os.makedirs(install_dir, exist_ok=True)
30
+ install_file = os.path.join(install_dir, local_file)
31
+ if not os.path.isfile(install_file):
32
+ # refactor to use lists
33
+ if tokenizer_lang == 'en':
34
+ repo = 'GitMylo/bark-voice-cloning'
35
+ model = 'quantifier_hubert_base_ls960_14.pth'
36
+ elif tokenizer_lang == 'de':
37
+ repo = 'CountFloyd/bark-voice-cloning-german-HuBERT-quantizer'
38
+ model = 'german-HuBERT-quantizer_14_epoch.pth'
39
+ elif tokenizer_lang == 'pl':
40
+ repo = 'Hobis/bark-voice-cloning-polish-HuBERT-quantizer'
41
+ model = 'polish-HuBERT-quantizer_8_epoch.pth'
42
+ else:
43
+ raise 'Unknown Tokenizer Language!'
44
+ print(f'{local_file} not found. Downloading HuBERT custom tokenizer')
45
+ huggingface_hub.hf_hub_download(repo, model, local_dir=install_dir, local_dir_use_symlinks=False)
46
+ shutil.move(os.path.join(install_dir, model), install_file)
47
+ print('Downloaded tokenizer')
48
+ return install_file
bark/hubert/pre_kmeans_hubert.py ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Modified HuBERT model without kmeans.
3
+ Original author: https://github.com/lucidrains/
4
+ Modified by: https://www.github.com/gitmylo/
5
+ License: MIT
6
+ """
7
+
8
+ # Modified code from https://github.com/lucidrains/audiolm-pytorch/blob/main/audiolm_pytorch/hubert_kmeans.py
9
+
10
+ from pathlib import Path
11
+
12
+ import torch
13
+ from torch import nn
14
+ from einops import pack, unpack
15
+
16
+ import fairseq
17
+
18
+ from torchaudio.functional import resample
19
+
20
+ from audiolm_pytorch.utils import curtail_to_multiple
21
+
22
+ import logging
23
+ logging.root.setLevel(logging.ERROR)
24
+
25
+
26
+ def exists(val):
27
+ return val is not None
28
+
29
+
30
+ def default(val, d):
31
+ return val if exists(val) else d
32
+
33
+
34
+ class CustomHubert(nn.Module):
35
+ """
36
+ checkpoint and kmeans can be downloaded at https://github.com/facebookresearch/fairseq/tree/main/examples/hubert
37
+ or you can train your own
38
+ """
39
+
40
+ def __init__(
41
+ self,
42
+ checkpoint_path,
43
+ target_sample_hz=16000,
44
+ seq_len_multiple_of=None,
45
+ output_layer=9,
46
+ device=None
47
+ ):
48
+ super().__init__()
49
+ self.target_sample_hz = target_sample_hz
50
+ self.seq_len_multiple_of = seq_len_multiple_of
51
+ self.output_layer = output_layer
52
+
53
+ if device is not None:
54
+ self.to(device)
55
+
56
+ model_path = Path(checkpoint_path)
57
+
58
+ assert model_path.exists(), f'path {checkpoint_path} does not exist'
59
+
60
+ print(f"Loading Hubert {checkpoint_path}")
61
+ checkpoint = torch.load(checkpoint_path)
62
+ load_model_input = {checkpoint_path: checkpoint}
63
+ model, *_ = fairseq.checkpoint_utils.load_model_ensemble_and_task(load_model_input)
64
+
65
+ if device is not None:
66
+ model[0].to(device)
67
+
68
+ self.model = model[0]
69
+ self.model.eval()
70
+
71
+ @property
72
+ def groups(self):
73
+ return 1
74
+
75
+ @torch.no_grad()
76
+ def forward(
77
+ self,
78
+ wav_input,
79
+ flatten=True,
80
+ input_sample_hz=None
81
+ ):
82
+ device = wav_input.device
83
+
84
+ if exists(input_sample_hz):
85
+ wav_input = resample(wav_input, input_sample_hz, self.target_sample_hz)
86
+
87
+ if exists(self.seq_len_multiple_of):
88
+ wav_input = curtail_to_multiple(wav_input, self.seq_len_multiple_of)
89
+
90
+ embed = self.model(
91
+ wav_input,
92
+ features_only=True,
93
+ mask=False, # thanks to @maitycyrus for noticing that mask is defaulted to True in the fairseq code
94
+ output_layer=self.output_layer
95
+ )
96
+
97
+ embed, packed_shape = pack([embed['x']], '* d')
98
+
99
+ # codebook_indices = self.kmeans.predict(embed.cpu().detach().numpy())
100
+
101
+ codebook_indices = torch.from_numpy(embed.cpu().detach().numpy()).to(device) # .long()
102
+
103
+ if flatten:
104
+ return codebook_indices
105
+
106
+ codebook_indices, = unpack(codebook_indices, packed_shape, '*')
107
+ return codebook_indices
bark/model.py ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Much of this code is adapted from Andrej Karpathy's NanoGPT
3
+ (https://github.com/karpathy/nanoGPT)
4
+ """
5
+ import math
6
+ from dataclasses import dataclass
7
+
8
+ import torch
9
+ import torch.nn as nn
10
+ from torch.nn import functional as F
11
+
12
+ class LayerNorm(nn.Module):
13
+ """ LayerNorm but with an optional bias. PyTorch doesn't support simply bias=False """
14
+
15
+ def __init__(self, ndim, bias):
16
+ super().__init__()
17
+ self.weight = nn.Parameter(torch.ones(ndim))
18
+ self.bias = nn.Parameter(torch.zeros(ndim)) if bias else None
19
+
20
+ def forward(self, input):
21
+ return F.layer_norm(input, self.weight.shape, self.weight, self.bias, 1e-5)
22
+
23
+ class CausalSelfAttention(nn.Module):
24
+
25
+ def __init__(self, config):
26
+ super().__init__()
27
+ assert config.n_embd % config.n_head == 0
28
+ # key, query, value projections for all heads, but in a batch
29
+ self.c_attn = nn.Linear(config.n_embd, 3 * config.n_embd, bias=config.bias)
30
+ # output projection
31
+ self.c_proj = nn.Linear(config.n_embd, config.n_embd, bias=config.bias)
32
+ # regularization
33
+ self.attn_dropout = nn.Dropout(config.dropout)
34
+ self.resid_dropout = nn.Dropout(config.dropout)
35
+ self.n_head = config.n_head
36
+ self.n_embd = config.n_embd
37
+ self.dropout = config.dropout
38
+ # flash attention make GPU go brrrrr but support is only in PyTorch nightly and still a bit scary
39
+ self.flash = hasattr(torch.nn.functional, 'scaled_dot_product_attention')
40
+ if not self.flash:
41
+ # print("WARNING: using slow attention. Flash Attention atm needs PyTorch nightly and dropout=0.0")
42
+ # causal mask to ensure that attention is only applied to the left in the input sequence
43
+ self.register_buffer("bias", torch.tril(torch.ones(config.block_size, config.block_size))
44
+ .view(1, 1, config.block_size, config.block_size))
45
+
46
+ def forward(self, x, past_kv=None, use_cache=False):
47
+ B, T, C = x.size() # batch size, sequence length, embedding dimensionality (n_embd)
48
+
49
+ # calculate query, key, values for all heads in batch and move head forward to be the batch dim
50
+ q, k ,v = self.c_attn(x).split(self.n_embd, dim=2)
51
+ k = k.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
52
+ q = q.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
53
+ v = v.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
54
+
55
+ if past_kv is not None:
56
+ past_key = past_kv[0]
57
+ past_value = past_kv[1]
58
+ k = torch.cat((past_key, k), dim=-2)
59
+ v = torch.cat((past_value, v), dim=-2)
60
+
61
+ FULL_T = k.shape[-2]
62
+
63
+ if use_cache is True:
64
+ present = (k, v)
65
+ else:
66
+ present = None
67
+
68
+ # causal self-attention; Self-attend: (B, nh, T, hs) x (B, nh, hs, T) -> (B, nh, T, T)
69
+ if self.flash:
70
+ # efficient attention using Flash Attention CUDA kernels
71
+ if past_kv is not None:
72
+ # When `past_kv` is provided, we're doing incremental decoding and `q.shape[2] == 1`: q only contains
73
+ # the query for the last token. scaled_dot_product_attention interprets this as the first token in the
74
+ # sequence, so if is_causal=True it will mask out all attention from it. This is not what we want, so
75
+ # to work around this we set is_causal=False.
76
+ is_causal = False
77
+ else:
78
+ is_causal = True
79
+
80
+ y = torch.nn.functional.scaled_dot_product_attention(q, k, v, dropout_p=self.dropout, is_causal=is_causal)
81
+ else:
82
+ # manual implementation of attention
83
+ att = (q @ k.transpose(-2, -1)) * (1.0 / math.sqrt(k.size(-1)))
84
+ att = att.masked_fill(self.bias[:,:,FULL_T-T:FULL_T,:FULL_T] == 0, float('-inf'))
85
+ att = F.softmax(att, dim=-1)
86
+ att = self.attn_dropout(att)
87
+ y = att @ v # (B, nh, T, T) x (B, nh, T, hs) -> (B, nh, T, hs)
88
+ y = y.transpose(1, 2).contiguous().view(B, T, C) # re-assemble all head outputs side by side
89
+
90
+ # output projection
91
+ y = self.resid_dropout(self.c_proj(y))
92
+ return (y, present)
93
+
94
+ class MLP(nn.Module):
95
+
96
+ def __init__(self, config):
97
+ super().__init__()
98
+ self.c_fc = nn.Linear(config.n_embd, 4 * config.n_embd, bias=config.bias)
99
+ self.c_proj = nn.Linear(4 * config.n_embd, config.n_embd, bias=config.bias)
100
+ self.dropout = nn.Dropout(config.dropout)
101
+ self.gelu = nn.GELU()
102
+
103
+ def forward(self, x):
104
+ x = self.c_fc(x)
105
+ x = self.gelu(x)
106
+ x = self.c_proj(x)
107
+ x = self.dropout(x)
108
+ return x
109
+
110
+ class Block(nn.Module):
111
+
112
+ def __init__(self, config, layer_idx):
113
+ super().__init__()
114
+ self.ln_1 = LayerNorm(config.n_embd, bias=config.bias)
115
+ self.attn = CausalSelfAttention(config)
116
+ self.ln_2 = LayerNorm(config.n_embd, bias=config.bias)
117
+ self.mlp = MLP(config)
118
+ self.layer_idx = layer_idx
119
+
120
+ def forward(self, x, past_kv=None, use_cache=False):
121
+ attn_output, prev_kvs = self.attn(self.ln_1(x), past_kv=past_kv, use_cache=use_cache)
122
+ x = x + attn_output
123
+ x = x + self.mlp(self.ln_2(x))
124
+ return (x, prev_kvs)
125
+
126
+ @dataclass
127
+ class GPTConfig:
128
+ block_size: int = 1024
129
+ input_vocab_size: int = 10_048
130
+ output_vocab_size: int = 10_048
131
+ n_layer: int = 12
132
+ n_head: int = 12
133
+ n_embd: int = 768
134
+ dropout: float = 0.0
135
+ bias: bool = True # True: bias in Linears and LayerNorms, like GPT-2. False: a bit better and faster
136
+
137
+ class GPT(nn.Module):
138
+
139
+ def __init__(self, config):
140
+ super().__init__()
141
+ assert config.input_vocab_size is not None
142
+ assert config.output_vocab_size is not None
143
+ assert config.block_size is not None
144
+ self.config = config
145
+
146
+ self.transformer = nn.ModuleDict(dict(
147
+ wte = nn.Embedding(config.input_vocab_size, config.n_embd),
148
+ wpe = nn.Embedding(config.block_size, config.n_embd),
149
+ drop = nn.Dropout(config.dropout),
150
+ h = nn.ModuleList([Block(config, idx) for idx in range(config.n_layer)]),
151
+ ln_f = LayerNorm(config.n_embd, bias=config.bias),
152
+ ))
153
+ self.lm_head = nn.Linear(config.n_embd, config.output_vocab_size, bias=False)
154
+
155
+ def get_num_params(self, non_embedding=True):
156
+ """
157
+ Return the number of parameters in the model.
158
+ For non-embedding count (default), the position embeddings get subtracted.
159
+ The token embeddings would too, except due to the parameter sharing these
160
+ params are actually used as weights in the final layer, so we include them.
161
+ """
162
+ n_params = sum(p.numel() for p in self.parameters())
163
+ if non_embedding:
164
+ n_params -= self.transformer.wte.weight.numel()
165
+ n_params -= self.transformer.wpe.weight.numel()
166
+ return n_params
167
+
168
+ def forward(self, idx, merge_context=False, past_kv=None, position_ids=None, use_cache=False):
169
+ device = idx.device
170
+ b, t = idx.size()
171
+ if past_kv is not None:
172
+ assert t == 1
173
+ tok_emb = self.transformer.wte(idx) # token embeddings of shape (b, t, n_embd)
174
+ else:
175
+ if merge_context:
176
+ assert(idx.shape[1] >= 256+256+1)
177
+ t = idx.shape[1] - 256
178
+ else:
179
+ assert t <= self.config.block_size, f"Cannot forward sequence of length {t}, block size is only {self.config.block_size}"
180
+
181
+ # forward the GPT model itself
182
+ if merge_context:
183
+ tok_emb = torch.cat([
184
+ self.transformer.wte(idx[:,:256]) + self.transformer.wte(idx[:,256:256+256]),
185
+ self.transformer.wte(idx[:,256+256:])
186
+ ], dim=1)
187
+ else:
188
+ tok_emb = self.transformer.wte(idx) # token embeddings of shape (b, t, n_embd)
189
+
190
+ if past_kv is None:
191
+ past_length = 0
192
+ past_kv = tuple([None] * len(self.transformer.h))
193
+ else:
194
+ past_length = past_kv[0][0].size(-2)
195
+
196
+ if position_ids is None:
197
+ position_ids = torch.arange(past_length, t + past_length, dtype=torch.long, device=device)
198
+ position_ids = position_ids.unsqueeze(0) # shape (1, t)
199
+ assert position_ids.shape == (1, t)
200
+
201
+ pos_emb = self.transformer.wpe(position_ids) # position embeddings of shape (1, t, n_embd)
202
+
203
+ x = self.transformer.drop(tok_emb + pos_emb)
204
+
205
+ new_kv = () if use_cache else None
206
+
207
+ for i, (block, past_layer_kv) in enumerate(zip(self.transformer.h, past_kv)):
208
+ x, kv = block(x, past_kv=past_layer_kv, use_cache=use_cache)
209
+
210
+ if use_cache:
211
+ new_kv = new_kv + (kv,)
212
+
213
+ x = self.transformer.ln_f(x)
214
+
215
+ # inference-time mini-optimization: only forward the lm_head on the very last position
216
+ logits = self.lm_head(x[:, [-1], :]) # note: using list [-1] to preserve the time dim
217
+
218
+ return (logits, new_kv)
bark/model_fine.py ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Much of this code is adapted from Andrej Karpathy's NanoGPT
3
+ (https://github.com/karpathy/nanoGPT)
4
+ """
5
+ from dataclasses import dataclass
6
+ import math
7
+
8
+ import torch
9
+ import torch.nn as nn
10
+ from torch.nn import functional as F
11
+
12
+ from .model import GPT, GPTConfig, MLP
13
+
14
+
15
+ class NonCausalSelfAttention(nn.Module):
16
+ def __init__(self, config):
17
+ super().__init__()
18
+ assert config.n_embd % config.n_head == 0
19
+ # key, query, value projections for all heads, but in a batch
20
+ self.c_attn = nn.Linear(config.n_embd, 3 * config.n_embd, bias=config.bias)
21
+ # output projection
22
+ self.c_proj = nn.Linear(config.n_embd, config.n_embd, bias=config.bias)
23
+ # regularization
24
+ self.attn_dropout = nn.Dropout(config.dropout)
25
+ self.resid_dropout = nn.Dropout(config.dropout)
26
+ self.n_head = config.n_head
27
+ self.n_embd = config.n_embd
28
+ self.dropout = config.dropout
29
+ # flash attention make GPU go brrrrr but support is only in PyTorch nightly and still a bit scary
30
+ self.flash = (
31
+ hasattr(torch.nn.functional, "scaled_dot_product_attention") and self.dropout == 0.0
32
+ )
33
+
34
+ def forward(self, x):
35
+ B, T, C = x.size() # batch size, sequence length, embedding dimensionality (n_embd)
36
+
37
+ # calculate query, key, values for all heads in batch and move head forward to be the batch dim
38
+ q, k, v = self.c_attn(x).split(self.n_embd, dim=2)
39
+ k = k.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
40
+ q = q.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
41
+ v = v.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
42
+
43
+ # causal self-attention; Self-attend: (B, nh, T, hs) x (B, nh, hs, T) -> (B, nh, T, T)
44
+ if self.flash:
45
+ # efficient attention using Flash Attention CUDA kernels
46
+ y = torch.nn.functional.scaled_dot_product_attention(
47
+ q, k, v, attn_mask=None, dropout_p=self.dropout, is_causal=False
48
+ )
49
+ else:
50
+ # manual implementation of attention
51
+ att = (q @ k.transpose(-2, -1)) * (1.0 / math.sqrt(k.size(-1)))
52
+ att = F.softmax(att, dim=-1)
53
+ att = self.attn_dropout(att)
54
+ y = att @ v # (B, nh, T, T) x (B, nh, T, hs) -> (B, nh, T, hs)
55
+ y = (
56
+ y.transpose(1, 2).contiguous().view(B, T, C)
57
+ ) # re-assemble all head outputs side by side
58
+
59
+ # output projection
60
+ y = self.resid_dropout(self.c_proj(y))
61
+ return y
62
+
63
+
64
+ class FineBlock(nn.Module):
65
+ def __init__(self, config):
66
+ super().__init__()
67
+ self.ln_1 = nn.LayerNorm(config.n_embd)
68
+ self.attn = NonCausalSelfAttention(config)
69
+ self.ln_2 = nn.LayerNorm(config.n_embd)
70
+ self.mlp = MLP(config)
71
+
72
+ def forward(self, x):
73
+ x = x + self.attn(self.ln_1(x))
74
+ x = x + self.mlp(self.ln_2(x))
75
+ return x
76
+
77
+
78
+ class FineGPT(GPT):
79
+ def __init__(self, config):
80
+ super().__init__(config)
81
+ del self.lm_head
82
+ self.config = config
83
+ self.n_codes_total = config.n_codes_total
84
+ self.transformer = nn.ModuleDict(
85
+ dict(
86
+ wtes=nn.ModuleList(
87
+ [
88
+ nn.Embedding(config.input_vocab_size, config.n_embd)
89
+ for _ in range(config.n_codes_total)
90
+ ]
91
+ ),
92
+ wpe=nn.Embedding(config.block_size, config.n_embd),
93
+ drop=nn.Dropout(config.dropout),
94
+ h=nn.ModuleList([FineBlock(config) for _ in range(config.n_layer)]),
95
+ ln_f=nn.LayerNorm(config.n_embd),
96
+ )
97
+ )
98
+ self.lm_heads = nn.ModuleList(
99
+ [
100
+ nn.Linear(config.n_embd, config.output_vocab_size, bias=False)
101
+ for _ in range(config.n_codes_given, self.n_codes_total)
102
+ ]
103
+ )
104
+ for i in range(self.n_codes_total - config.n_codes_given):
105
+ self.transformer.wtes[i + 1].weight = self.lm_heads[i].weight
106
+
107
+ def forward(self, pred_idx, idx):
108
+ device = idx.device
109
+ b, t, codes = idx.size()
110
+ assert (
111
+ t <= self.config.block_size
112
+ ), f"Cannot forward sequence of length {t}, block size is only {self.config.block_size}"
113
+ assert pred_idx > 0, "cannot predict 0th codebook"
114
+ assert codes == self.n_codes_total, (b, t, codes)
115
+ pos = torch.arange(0, t, dtype=torch.long, device=device).unsqueeze(0) # shape (1, t)
116
+
117
+ # forward the GPT model itself
118
+ tok_embs = [
119
+ wte(idx[:, :, i]).unsqueeze(-1) for i, wte in enumerate(self.transformer.wtes)
120
+ ] # token embeddings of shape (b, t, n_embd)
121
+ tok_emb = torch.cat(tok_embs, dim=-1)
122
+ pos_emb = self.transformer.wpe(pos) # position embeddings of shape (1, t, n_embd)
123
+ x = tok_emb[:, :, :, : pred_idx + 1].sum(dim=-1)
124
+ x = self.transformer.drop(x + pos_emb)
125
+ for block in self.transformer.h:
126
+ x = block(x)
127
+ x = self.transformer.ln_f(x)
128
+ logits = self.lm_heads[pred_idx - self.config.n_codes_given](x)
129
+ return logits
130
+
131
+ def get_num_params(self, non_embedding=True):
132
+ """
133
+ Return the number of parameters in the model.
134
+ For non-embedding count (default), the position embeddings get subtracted.
135
+ The token embeddings would too, except due to the parameter sharing these
136
+ params are actually used as weights in the final layer, so we include them.
137
+ """
138
+ n_params = sum(p.numel() for p in self.parameters())
139
+ if non_embedding:
140
+ for wte in self.transformer.wtes:
141
+ n_params -= wte.weight.numel()
142
+ n_params -= self.transformer.wpe.weight.numel()
143
+ return n_params
144
+
145
+
146
+ @dataclass
147
+ class FineGPTConfig(GPTConfig):
148
+ n_codes_total: int = 8
149
+ n_codes_given: int = 1
bark/settings.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ def initenv(args):
4
+ os.environ['SUNO_USE_SMALL_MODELS'] = str("-smallmodels" in args)
5
+ os.environ['BARK_FORCE_CPU'] = str("-forcecpu" in args)
6
+ os.environ['SUNO_ENABLE_MPS'] = str("-enablemps" in args)
7
+ os.environ['SUNO_OFFLOAD_CPU'] = str("-offloadcpu" in args)
cloning/__init__.py ADDED
File without changes
cloning/clonevoice.py ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from bark.generation import load_codec_model, generate_text_semantic, grab_best_device
2
+ from encodec.utils import convert_audio
3
+ from bark.hubert.hubert_manager import HuBERTManager
4
+ from bark.hubert.pre_kmeans_hubert import CustomHubert
5
+ from bark.hubert.customtokenizer import CustomTokenizer
6
+
7
+ import torchaudio
8
+ import torch
9
+ import os
10
+ import gradio
11
+
12
+
13
+ def clone_voice(audio_filepath, dest_filename, progress=gradio.Progress(track_tqdm=True)):
14
+ # if len(text) < 1:
15
+ # raise gradio.Error('No transcription text entered!')
16
+
17
+ use_gpu = not os.environ.get("BARK_FORCE_CPU", False)
18
+ progress(0, desc="Loading Codec")
19
+ model = load_codec_model(use_gpu=use_gpu)
20
+
21
+ # From https://github.com/gitmylo/bark-voice-cloning-HuBERT-quantizer
22
+ hubert_manager = HuBERTManager()
23
+ hubert_manager.make_sure_hubert_installed()
24
+ hubert_manager.make_sure_tokenizer_installed()
25
+
26
+ # From https://github.com/gitmylo/bark-voice-cloning-HuBERT-quantizer
27
+ # Load HuBERT for semantic tokens
28
+
29
+ # Load the HuBERT model
30
+ device = grab_best_device(use_gpu)
31
+ hubert_model = CustomHubert(checkpoint_path='./models/hubert/hubert.pt').to(device)
32
+
33
+ # Load the CustomTokenizer model
34
+ tokenizer = CustomTokenizer.load_from_checkpoint('./models/hubert/en_tokenizer.pth').to(device) # change to the correct path
35
+
36
+ progress(0.25, desc="Converting WAV")
37
+
38
+ # Load and pre-process the audio waveform
39
+ wav, sr = torchaudio.load(audio_filepath)
40
+ if wav.shape[0] == 2: # Stereo to mono if needed
41
+ wav = wav.mean(0, keepdim=True)
42
+
43
+ wav = convert_audio(wav, sr, model.sample_rate, model.channels)
44
+ wav = wav.to(device)
45
+ progress(0.5, desc="Extracting codes")
46
+
47
+ semantic_vectors = hubert_model.forward(wav, input_sample_hz=model.sample_rate)
48
+ semantic_tokens = tokenizer.get_token(semantic_vectors)
49
+
50
+ # Extract discrete codes from EnCodec
51
+ with torch.no_grad():
52
+ encoded_frames = model.encode(wav.unsqueeze(0))
53
+ codes = torch.cat([encoded[0] for encoded in encoded_frames], dim=-1).squeeze() # [n_q, T]
54
+
55
+ # get seconds of audio
56
+ # seconds = wav.shape[-1] / model.sample_rate
57
+ # generate semantic tokens
58
+ # semantic_tokens = generate_text_semantic(text, max_gen_duration_s=seconds, top_k=50, top_p=.95, temp=0.7)
59
+
60
+ # move codes to cpu
61
+ codes = codes.cpu().numpy()
62
+ # move semantic tokens to cpu
63
+ semantic_tokens = semantic_tokens.cpu().numpy()
64
+
65
+ import numpy as np
66
+ output_path = dest_filename + '.npz'
67
+ np.savez(output_path, fine_prompt=codes, coarse_prompt=codes[:2, :], semantic_prompt=semantic_tokens)
68
+ return ["Finished", output_path]
config.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ input_text_desired_length: 110
2
+ input_text_max_length: 170
3
+ selected_theme: JohnSmith9982/small_and_pretty
4
+ server_name: ''
5
+ server_port: 0
6
+ server_share: false
7
+ silence_between_sentences: 250
8
+ silence_between_speakers: 500
notebooks/AI_Agent.ipynb ADDED
@@ -0,0 +1,789 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {
6
+ "id": "view-in-github",
7
+ "colab_type": "text"
8
+ },
9
+ "source": [
10
+ "<a href=\"https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/notebooks/AI_Agent.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
11
+ ]
12
+ },
13
+ {
14
+ "cell_type": "code",
15
+ "execution_count": 1,
16
+ "metadata": {
17
+ "colab": {
18
+ "base_uri": "https://localhost:8080/"
19
+ },
20
+ "id": "Nsx1ZPePslRk",
21
+ "outputId": "a555d1bf-3d81-4dc3-9ddd-5357800cd0f4"
22
+ },
23
+ "outputs": [
24
+ {
25
+ "output_type": "stream",
26
+ "name": "stdout",
27
+ "text": [
28
+ "Cloning into 'modelscope-agent'...\n",
29
+ "remote: Enumerating objects: 1599, done.\u001b[K\n",
30
+ "remote: Counting objects: 100% (854/854), done.\u001b[K\n",
31
+ "remote: Compressing objects: 100% (371/371), done.\u001b[K\n",
32
+ "remote: Total 1599 (delta 633), reused 574 (delta 478), pack-reused 745\u001b[K\n",
33
+ "Receiving objects: 100% (1599/1599), 32.93 MiB | 47.63 MiB/s, done.\n",
34
+ "Resolving deltas: 100% (1004/1004), done.\n"
35
+ ]
36
+ }
37
+ ],
38
+ "source": [
39
+ "!git clone https://github.com/KevinWang676/modelscope-agent.git"
40
+ ]
41
+ },
42
+ {
43
+ "cell_type": "code",
44
+ "execution_count": 2,
45
+ "metadata": {
46
+ "colab": {
47
+ "base_uri": "https://localhost:8080/"
48
+ },
49
+ "id": "ZGv88YgNuxGJ",
50
+ "outputId": "289ed9ea-bbee-4da1-c278-0195344fada2"
51
+ },
52
+ "outputs": [
53
+ {
54
+ "output_type": "stream",
55
+ "name": "stdout",
56
+ "text": [
57
+ "/content/modelscope-agent\n"
58
+ ]
59
+ }
60
+ ],
61
+ "source": [
62
+ "cd modelscope-agent"
63
+ ]
64
+ },
65
+ {
66
+ "cell_type": "code",
67
+ "execution_count": 3,
68
+ "metadata": {
69
+ "colab": {
70
+ "base_uri": "https://localhost:8080/"
71
+ },
72
+ "id": "st1WOwAEu5CH",
73
+ "outputId": "3c7620f6-637f-4dc6-ef58-cca52ce12f2e"
74
+ },
75
+ "outputs": [
76
+ {
77
+ "output_type": "stream",
78
+ "name": "stdout",
79
+ "text": [
80
+ "Collecting dashscope (from -r requirements.txt (line 1))\n",
81
+ " Downloading dashscope-1.13.4-py3-none-any.whl (78 kB)\n",
82
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.7/78.7 kB\u001b[0m \u001b[31m1.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
83
+ "\u001b[?25hCollecting datasets>=2.8.0 (from -r requirements.txt (line 2))\n",
84
+ " Downloading datasets-2.15.0-py3-none-any.whl (521 kB)\n",
85
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m521.2/521.2 kB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
86
+ "\u001b[?25hRequirement already satisfied: ipython in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 3)) (7.34.0)\n",
87
+ "Collecting jupyter>=1.0.0 (from -r requirements.txt (line 4))\n",
88
+ " Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)\n",
89
+ "Collecting langchain<=0.0.292 (from -r requirements.txt (line 5))\n",
90
+ " Downloading langchain-0.0.292-py3-none-any.whl (1.7 MB)\n",
91
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m33.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
92
+ "\u001b[?25hCollecting modelscope>=1.7.0 (from -r requirements.txt (line 6))\n",
93
+ " Downloading modelscope-1.10.0-py3-none-any.whl (5.4 MB)\n",
94
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.4/5.4 MB\u001b[0m \u001b[31m85.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
95
+ "\u001b[?25hRequirement already satisfied: moviepy in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (1.0.3)\n",
96
+ "Collecting ms-swift (from -r requirements.txt (line 8))\n",
97
+ " Downloading ms_swift-1.4.0-py3-none-any.whl (216 kB)\n",
98
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m216.9/216.9 kB\u001b[0m \u001b[31m27.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
99
+ "\u001b[?25hCollecting openai (from -r requirements.txt (line 9))\n",
100
+ " Downloading openai-1.3.8-py3-none-any.whl (221 kB)\n",
101
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m221.5/221.5 kB\u001b[0m \u001b[31m28.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
102
+ "\u001b[?25hRequirement already satisfied: opencv-python in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 10)) (4.8.0.76)\n",
103
+ "Requirement already satisfied: openpyxl in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 11)) (3.1.2)\n",
104
+ "Requirement already satisfied: Pillow in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 12)) (9.4.0)\n",
105
+ "Collecting pydantic>=2.0.0 (from -r requirements.txt (line 13))\n",
106
+ " Downloading pydantic-2.5.2-py3-none-any.whl (381 kB)\n",
107
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m381.9/381.9 kB\u001b[0m \u001b[31m46.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
108
+ "\u001b[?25hCollecting pypdf (from -r requirements.txt (line 14))\n",
109
+ " Downloading pypdf-3.17.1-py3-none-any.whl (277 kB)\n",
110
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m277.6/277.6 kB\u001b[0m \u001b[31m36.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
111
+ "\u001b[?25hRequirement already satisfied: pytest in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 15)) (7.4.3)\n",
112
+ "Collecting python-dotenv (from -r requirements.txt (line 16))\n",
113
+ " Downloading python_dotenv-1.0.0-py3-none-any.whl (19 kB)\n",
114
+ "Requirement already satisfied: seaborn in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 17)) (0.12.2)\n",
115
+ "Requirement already satisfied: soundfile in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 18)) (0.12.1)\n",
116
+ "Requirement already satisfied: transformers>=4.29.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 19)) (4.35.2)\n",
117
+ "Collecting transformers_stream_generator (from -r requirements.txt (line 20))\n",
118
+ " Downloading transformers-stream-generator-0.0.4.tar.gz (12 kB)\n",
119
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
120
+ "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from dashscope->-r requirements.txt (line 1)) (3.9.1)\n",
121
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from dashscope->-r requirements.txt (line 1)) (2.31.0)\n",
122
+ "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.8.0->-r requirements.txt (line 2)) (1.23.5)\n",
123
+ "Requirement already satisfied: pyarrow>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.8.0->-r requirements.txt (line 2)) (9.0.0)\n",
124
+ "Collecting pyarrow-hotfix (from datasets>=2.8.0->-r requirements.txt (line 2))\n",
125
+ " Downloading pyarrow_hotfix-0.6-py3-none-any.whl (7.9 kB)\n",
126
+ "Collecting dill<0.3.8,>=0.3.0 (from datasets>=2.8.0->-r requirements.txt (line 2))\n",
127
+ " Downloading dill-0.3.7-py3-none-any.whl (115 kB)\n",
128
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m115.3/115.3 kB\u001b[0m \u001b[31m16.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
129
+ "\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets>=2.8.0->-r requirements.txt (line 2)) (1.5.3)\n",
130
+ "Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.8.0->-r requirements.txt (line 2)) (4.66.1)\n",
131
+ "Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets>=2.8.0->-r requirements.txt (line 2)) (3.4.1)\n",
132
+ "Collecting multiprocess (from datasets>=2.8.0->-r requirements.txt (line 2))\n",
133
+ " Downloading multiprocess-0.70.15-py310-none-any.whl (134 kB)\n",
134
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m18.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
135
+ "\u001b[?25hRequirement already satisfied: fsspec[http]<=2023.10.0,>=2023.1.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.8.0->-r requirements.txt (line 2)) (2023.6.0)\n",
136
+ "Requirement already satisfied: huggingface-hub>=0.18.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.8.0->-r requirements.txt (line 2)) (0.19.4)\n",
137
+ "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets>=2.8.0->-r requirements.txt (line 2)) (23.2)\n",
138
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.8.0->-r requirements.txt (line 2)) (6.0.1)\n",
139
+ "Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 3)) (67.7.2)\n",
140
+ "Collecting jedi>=0.16 (from ipython->-r requirements.txt (line 3))\n",
141
+ " Downloading jedi-0.19.1-py2.py3-none-any.whl (1.6 MB)\n",
142
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m88.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
143
+ "\u001b[?25hRequirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 3)) (4.4.2)\n",
144
+ "Requirement already satisfied: pickleshare in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 3)) (0.7.5)\n",
145
+ "Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 3)) (5.7.1)\n",
146
+ "Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 3)) (3.0.41)\n",
147
+ "Requirement already satisfied: pygments in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 3)) (2.16.1)\n",
148
+ "Requirement already satisfied: backcall in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 3)) (0.2.0)\n",
149
+ "Requirement already satisfied: matplotlib-inline in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 3)) (0.1.6)\n",
150
+ "Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.10/dist-packages (from ipython->-r requirements.txt (line 3)) (4.9.0)\n",
151
+ "Requirement already satisfied: notebook in /usr/local/lib/python3.10/dist-packages (from jupyter>=1.0.0->-r requirements.txt (line 4)) (6.5.5)\n",
152
+ "Collecting qtconsole (from jupyter>=1.0.0->-r requirements.txt (line 4))\n",
153
+ " Downloading qtconsole-5.5.1-py3-none-any.whl (123 kB)\n",
154
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m123.4/123.4 kB\u001b[0m \u001b[31m17.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
155
+ "\u001b[?25hRequirement already satisfied: jupyter-console in /usr/local/lib/python3.10/dist-packages (from jupyter>=1.0.0->-r requirements.txt (line 4)) (6.1.0)\n",
156
+ "Requirement already satisfied: nbconvert in /usr/local/lib/python3.10/dist-packages (from jupyter>=1.0.0->-r requirements.txt (line 4)) (6.5.4)\n",
157
+ "Requirement already satisfied: ipykernel in /usr/local/lib/python3.10/dist-packages (from jupyter>=1.0.0->-r requirements.txt (line 4)) (5.5.6)\n",
158
+ "Requirement already satisfied: ipywidgets in /usr/local/lib/python3.10/dist-packages (from jupyter>=1.0.0->-r requirements.txt (line 4)) (7.7.1)\n",
159
+ "Requirement already satisfied: SQLAlchemy<3,>=1.4 in /usr/local/lib/python3.10/dist-packages (from langchain<=0.0.292->-r requirements.txt (line 5)) (2.0.23)\n",
160
+ "Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from langchain<=0.0.292->-r requirements.txt (line 5)) (4.0.3)\n",
161
+ "Collecting dataclasses-json<0.6.0,>=0.5.7 (from langchain<=0.0.292->-r requirements.txt (line 5))\n",
162
+ " Downloading dataclasses_json-0.5.14-py3-none-any.whl (26 kB)\n",
163
+ "Collecting langsmith<0.1.0,>=0.0.21 (from langchain<=0.0.292->-r requirements.txt (line 5))\n",
164
+ " Downloading langsmith-0.0.69-py3-none-any.whl (48 kB)\n",
165
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m48.2/48.2 kB\u001b[0m \u001b[31m6.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
166
+ "\u001b[?25hRequirement already satisfied: numexpr<3.0.0,>=2.8.4 in /usr/local/lib/python3.10/dist-packages (from langchain<=0.0.292->-r requirements.txt (line 5)) (2.8.7)\n",
167
+ "Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in /usr/local/lib/python3.10/dist-packages (from langchain<=0.0.292->-r requirements.txt (line 5)) (8.2.3)\n",
168
+ "Collecting addict (from modelscope>=1.7.0->-r requirements.txt (line 6))\n",
169
+ " Downloading addict-2.4.0-py3-none-any.whl (3.8 kB)\n",
170
+ "Requirement already satisfied: attrs in /usr/local/lib/python3.10/dist-packages (from modelscope>=1.7.0->-r requirements.txt (line 6)) (23.1.0)\n",
171
+ "Collecting einops (from modelscope>=1.7.0->-r requirements.txt (line 6))\n",
172
+ " Downloading einops-0.7.0-py3-none-any.whl (44 kB)\n",
173
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m44.6/44.6 kB\u001b[0m \u001b[31m6.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
174
+ "\u001b[?25hRequirement already satisfied: filelock>=3.3.0 in /usr/local/lib/python3.10/dist-packages (from modelscope>=1.7.0->-r requirements.txt (line 6)) (3.13.1)\n",
175
+ "Requirement already satisfied: gast>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from modelscope>=1.7.0->-r requirements.txt (line 6)) (0.5.4)\n",
176
+ "Collecting oss2 (from modelscope>=1.7.0->-r requirements.txt (line 6))\n",
177
+ " Downloading oss2-2.18.3.tar.gz (276 kB)\n",
178
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m276.1/276.1 kB\u001b[0m \u001b[31m35.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
179
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
180
+ "Collecting pyarrow>=8.0.0 (from datasets>=2.8.0->-r requirements.txt (line 2))\n",
181
+ " Downloading pyarrow-14.0.1-cp310-cp310-manylinux_2_28_x86_64.whl (38.0 MB)\n",
182
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m38.0/38.0 MB\u001b[0m \u001b[31m44.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
183
+ "\u001b[?25hRequirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.10/dist-packages (from modelscope>=1.7.0->-r requirements.txt (line 6)) (2.8.2)\n",
184
+ "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from modelscope>=1.7.0->-r requirements.txt (line 6)) (1.11.4)\n",
185
+ "Collecting simplejson>=3.3.0 (from modelscope>=1.7.0->-r requirements.txt (line 6))\n",
186
+ " Downloading simplejson-3.19.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (137 kB)\n",
187
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.9/137.9 kB\u001b[0m \u001b[31m18.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
188
+ "\u001b[?25hRequirement already satisfied: sortedcontainers>=1.5.9 in /usr/local/lib/python3.10/dist-packages (from modelscope>=1.7.0->-r requirements.txt (line 6)) (2.4.0)\n",
189
+ "Requirement already satisfied: urllib3>=1.26 in /usr/local/lib/python3.10/dist-packages (from modelscope>=1.7.0->-r requirements.txt (line 6)) (2.0.7)\n",
190
+ "Collecting yapf (from modelscope>=1.7.0->-r requirements.txt (line 6))\n",
191
+ " Downloading yapf-0.40.2-py3-none-any.whl (254 kB)\n",
192
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m254.7/254.7 kB\u001b[0m \u001b[31m32.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
193
+ "\u001b[?25hRequirement already satisfied: proglog<=1.0.0 in /usr/local/lib/python3.10/dist-packages (from moviepy->-r requirements.txt (line 7)) (0.1.10)\n",
194
+ "Requirement already satisfied: imageio<3.0,>=2.5 in /usr/local/lib/python3.10/dist-packages (from moviepy->-r requirements.txt (line 7)) (2.31.6)\n",
195
+ "Requirement already satisfied: imageio-ffmpeg>=0.2.0 in /usr/local/lib/python3.10/dist-packages (from moviepy->-r requirements.txt (line 7)) (0.4.9)\n",
196
+ "Collecting accelerate (from ms-swift->-r requirements.txt (line 8))\n",
197
+ " Downloading accelerate-0.25.0-py3-none-any.whl (265 kB)\n",
198
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m265.7/265.7 kB\u001b[0m \u001b[31m31.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
199
+ "\u001b[?25hRequirement already satisfied: jieba in /usr/local/lib/python3.10/dist-packages (from ms-swift->-r requirements.txt (line 8)) (0.42.1)\n",
200
+ "Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from ms-swift->-r requirements.txt (line 8)) (3.7.1)\n",
201
+ "Requirement already satisfied: nltk in /usr/local/lib/python3.10/dist-packages (from ms-swift->-r requirements.txt (line 8)) (3.8.1)\n",
202
+ "Collecting optimum (from ms-swift->-r requirements.txt (line 8))\n",
203
+ " Downloading optimum-1.15.0-py3-none-any.whl (400 kB)\n",
204
+ "\u001b[2K \u001b[90m━━━━━━���━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m400.9/400.9 kB\u001b[0m \u001b[31m44.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
205
+ "\u001b[?25hCollecting peft<=0.6.2,>=0.6.0 (from ms-swift->-r requirements.txt (line 8))\n",
206
+ " Downloading peft-0.6.2-py3-none-any.whl (174 kB)\n",
207
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m174.7/174.7 kB\u001b[0m \u001b[31m23.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
208
+ "\u001b[?25hCollecting rouge (from ms-swift->-r requirements.txt (line 8))\n",
209
+ " Downloading rouge-1.0.1-py3-none-any.whl (13 kB)\n",
210
+ "Requirement already satisfied: safetensors in /usr/local/lib/python3.10/dist-packages (from ms-swift->-r requirements.txt (line 8)) (0.4.1)\n",
211
+ "Requirement already satisfied: tensorboard in /usr/local/lib/python3.10/dist-packages (from ms-swift->-r requirements.txt (line 8)) (2.14.1)\n",
212
+ "Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.10/dist-packages (from openai->-r requirements.txt (line 9)) (3.7.1)\n",
213
+ "Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from openai->-r requirements.txt (line 9)) (1.7.0)\n",
214
+ "Collecting httpx<1,>=0.23.0 (from openai->-r requirements.txt (line 9))\n",
215
+ " Downloading httpx-0.25.2-py3-none-any.whl (74 kB)\n",
216
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.0/75.0 kB\u001b[0m \u001b[31m11.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
217
+ "\u001b[?25hRequirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from openai->-r requirements.txt (line 9)) (1.3.0)\n",
218
+ "Requirement already satisfied: typing-extensions<5,>=4.5 in /usr/local/lib/python3.10/dist-packages (from openai->-r requirements.txt (line 9)) (4.5.0)\n",
219
+ "Requirement already satisfied: et-xmlfile in /usr/local/lib/python3.10/dist-packages (from openpyxl->-r requirements.txt (line 11)) (1.1.0)\n",
220
+ "Collecting annotated-types>=0.4.0 (from pydantic>=2.0.0->-r requirements.txt (line 13))\n",
221
+ " Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB)\n",
222
+ "Collecting pydantic-core==2.14.5 (from pydantic>=2.0.0->-r requirements.txt (line 13))\n",
223
+ " Downloading pydantic_core-2.14.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)\n",
224
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m93.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
225
+ "\u001b[?25hCollecting typing-extensions<5,>=4.5 (from openai->-r requirements.txt (line 9))\n",
226
+ " Downloading typing_extensions-4.9.0-py3-none-any.whl (32 kB)\n",
227
+ "Requirement already satisfied: iniconfig in /usr/local/lib/python3.10/dist-packages (from pytest->-r requirements.txt (line 15)) (2.0.0)\n",
228
+ "Requirement already satisfied: pluggy<2.0,>=0.12 in /usr/local/lib/python3.10/dist-packages (from pytest->-r requirements.txt (line 15)) (1.3.0)\n",
229
+ "Requirement already satisfied: exceptiongroup>=1.0.0rc8 in /usr/local/lib/python3.10/dist-packages (from pytest->-r requirements.txt (line 15)) (1.2.0)\n",
230
+ "Requirement already satisfied: tomli>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from pytest->-r requirements.txt (line 15)) (2.0.1)\n",
231
+ "Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile->-r requirements.txt (line 18)) (1.16.0)\n",
232
+ "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.29.0->-r requirements.txt (line 19)) (2023.6.3)\n",
233
+ "Requirement already satisfied: tokenizers<0.19,>=0.14 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.29.0->-r requirements.txt (line 19)) (0.15.0)\n",
234
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->dashscope->-r requirements.txt (line 1)) (6.0.4)\n",
235
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->dashscope->-r requirements.txt (line 1)) (1.9.3)\n",
236
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->dashscope->-r requirements.txt (line 1)) (1.4.0)\n",
237
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->dashscope->-r requirements.txt (line 1)) (1.3.1)\n",
238
+ "Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.5.0->openai->-r requirements.txt (line 9)) (3.6)\n",
239
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile->-r requirements.txt (line 18)) (2.21)\n",
240
+ "Collecting marshmallow<4.0.0,>=3.18.0 (from dataclasses-json<0.6.0,>=0.5.7->langchain<=0.0.292->-r requirements.txt (line 5))\n",
241
+ " Downloading marshmallow-3.20.1-py3-none-any.whl (49 kB)\n",
242
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.4/49.4 kB\u001b[0m \u001b[31m7.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
243
+ "\u001b[?25hCollecting typing-inspect<1,>=0.4.0 (from dataclasses-json<0.6.0,>=0.5.7->langchain<=0.0.292->-r requirements.txt (line 5))\n",
244
+ " Downloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)\n",
245
+ "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->openai->-r requirements.txt (line 9)) (2023.11.17)\n",
246
+ "Collecting httpcore==1.* (from httpx<1,>=0.23.0->openai->-r requirements.txt (line 9))\n",
247
+ " Downloading httpcore-1.0.2-py3-none-any.whl (76 kB)\n",
248
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.9/76.9 kB\u001b[0m \u001b[31m10.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
249
+ "\u001b[?25hCollecting h11<0.15,>=0.13 (from httpcore==1.*->httpx<1,>=0.23.0->openai->-r requirements.txt (line 9))\n",
250
+ " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
251
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m8.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
252
+ "\u001b[?25hRequirement already satisfied: parso<0.9.0,>=0.8.3 in /usr/local/lib/python3.10/dist-packages (from jedi>=0.16->ipython->-r requirements.txt (line 3)) (0.8.3)\n",
253
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->ms-swift->-r requirements.txt (line 8)) (1.2.0)\n",
254
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->ms-swift->-r requirements.txt (line 8)) (0.12.1)\n",
255
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->ms-swift->-r requirements.txt (line 8)) (4.45.1)\n",
256
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->ms-swift->-r requirements.txt (line 8)) (1.4.5)\n",
257
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->ms-swift->-r requirements.txt (line 8)) (3.1.1)\n",
258
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets>=2.8.0->-r requirements.txt (line 2)) (2023.3.post1)\n",
259
+ "Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from peft<=0.6.2,>=0.6.0->ms-swift->-r requirements.txt (line 8)) (5.9.5)\n",
260
+ "Requirement already satisfied: torch>=1.13.0 in /usr/local/lib/python3.10/dist-packages (from peft<=0.6.2,>=0.6.0->ms-swift->-r requirements.txt (line 8)) (2.1.0+cu118)\n",
261
+ "Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.10/dist-packages (from pexpect>4.3->ipython->-r requirements.txt (line 3)) (0.7.0)\n",
262
+ "Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython->-r requirements.txt (line 3)) (0.2.12)\n",
263
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.1->modelscope>=1.7.0->-r requirements.txt (line 6)) (1.16.0)\n",
264
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->dashscope->-r requirements.txt (line 1)) (3.3.2)\n",
265
+ "Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.10/dist-packages (from SQLAlchemy<3,>=1.4->langchain<=0.0.292->-r requirements.txt (line 5)) (3.0.1)\n",
266
+ "Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.10/dist-packages (from ipykernel->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.2.0)\n",
267
+ "Requirement already satisfied: jupyter-client in /usr/local/lib/python3.10/dist-packages (from ipykernel->jupyter>=1.0.0->-r requirements.txt (line 4)) (6.1.12)\n",
268
+ "Requirement already satisfied: tornado>=4.2 in /usr/local/lib/python3.10/dist-packages (from ipykernel->jupyter>=1.0.0->-r requirements.txt (line 4)) (6.3.2)\n",
269
+ "Requirement already satisfied: widgetsnbextension~=3.6.0 in /usr/local/lib/python3.10/dist-packages (from ipywidgets->jupyter>=1.0.0->-r requirements.txt (line 4)) (3.6.6)\n",
270
+ "Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from ipywidgets->jupyter>=1.0.0->-r requirements.txt (line 4)) (3.0.9)\n",
271
+ "Requirement already satisfied: lxml in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (4.9.3)\n",
272
+ "Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (4.11.2)\n",
273
+ "Requirement already satisfied: bleach in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (6.1.0)\n",
274
+ "Requirement already satisfied: defusedxml in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.7.1)\n",
275
+ "Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.4)\n",
276
+ "Requirement already satisfied: jinja2>=3.0 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (3.1.2)\n",
277
+ "Requirement already satisfied: jupyter-core>=4.7 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (5.5.0)\n",
278
+ "Requirement already satisfied: jupyterlab-pygments in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.3.0)\n",
279
+ "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (2.1.3)\n",
280
+ "Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.8.4)\n",
281
+ "Requirement already satisfied: nbclient>=0.5.0 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.9.0)\n",
282
+ "Requirement already satisfied: nbformat>=5.1 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (5.9.2)\n",
283
+ "Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (1.5.0)\n",
284
+ "Requirement already satisfied: tinycss2 in /usr/local/lib/python3.10/dist-packages (from nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (1.2.1)\n",
285
+ "Requirement already satisfied: click in /usr/local/lib/python3.10/dist-packages (from nltk->ms-swift->-r requirements.txt (line 8)) (8.1.7)\n",
286
+ "Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from nltk->ms-swift->-r requirements.txt (line 8)) (1.3.2)\n",
287
+ "Requirement already satisfied: pyzmq<25,>=17 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (23.2.1)\n",
288
+ "Requirement already satisfied: argon2-cffi in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (23.1.0)\n",
289
+ "Requirement already satisfied: nest-asyncio>=1.5 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (1.5.8)\n",
290
+ "Requirement already satisfied: Send2Trash>=1.8.0 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (1.8.2)\n",
291
+ "Requirement already satisfied: terminado>=0.8.3 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.18.0)\n",
292
+ "Requirement already satisfied: prometheus-client in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.19.0)\n",
293
+ "Requirement already satisfied: nbclassic>=0.4.7 in /usr/local/lib/python3.10/dist-packages (from notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (1.0.0)\n",
294
+ "Collecting coloredlogs (from optimum->ms-swift->-r requirements.txt (line 8))\n",
295
+ " Downloading coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)\n",
296
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.0/46.0 kB\u001b[0m \u001b[31m6.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
297
+ "\u001b[?25hRequirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from optimum->ms-swift->-r requirements.txt (line 8)) (1.12)\n",
298
+ "Collecting crcmod>=1.7 (from oss2->modelscope>=1.7.0->-r requirements.txt (line 6))\n",
299
+ " Downloading crcmod-1.7.tar.gz (89 kB)\n",
300
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m89.7/89.7 kB\u001b[0m \u001b[31m14.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
301
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
302
+ "Collecting pycryptodome>=3.4.7 (from oss2->modelscope>=1.7.0->-r requirements.txt (line 6))\n",
303
+ " Downloading pycryptodome-3.19.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)\n",
304
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m103.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
305
+ "\u001b[?25hCollecting aliyun-python-sdk-kms>=2.4.1 (from oss2->modelscope>=1.7.0->-r requirements.txt (line 6))\n",
306
+ " Downloading aliyun_python_sdk_kms-2.16.2-py2.py3-none-any.whl (94 kB)\n",
307
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.0/94.0 kB\u001b[0m \u001b[31m14.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
308
+ "\u001b[?25hCollecting aliyun-python-sdk-core>=2.13.12 (from oss2->modelscope>=1.7.0->-r requirements.txt (line 6))\n",
309
+ " Downloading aliyun-python-sdk-core-2.14.0.tar.gz (443 kB)\n",
310
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m443.0/443.0 kB\u001b[0m \u001b[31m48.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
311
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
312
+ "Collecting qtpy>=2.4.0 (from qtconsole->jupyter>=1.0.0->-r requirements.txt (line 4))\n",
313
+ " Downloading QtPy-2.4.1-py3-none-any.whl (93 kB)\n",
314
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m93.5/93.5 kB\u001b[0m \u001b[31m13.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
315
+ "\u001b[?25hRequirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.10/dist-packages (from tensorboard->ms-swift->-r requirements.txt (line 8)) (1.4.0)\n",
316
+ "Requirement already satisfied: grpcio>=1.48.2 in /usr/local/lib/python3.10/dist-packages (from tensorboard->ms-swift->-r requirements.txt (line 8)) (1.59.3)\n",
317
+ "Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.10/dist-packages (from tensorboard->ms-swift->-r requirements.txt (line 8)) (2.17.3)\n",
318
+ "Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in /usr/local/lib/python3.10/dist-packages (from tensorboard->ms-swift->-r requirements.txt (line 8)) (1.0.0)\n",
319
+ "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.10/dist-packages (from tensorboard->ms-swift->-r requirements.txt (line 8)) (3.5.1)\n",
320
+ "Requirement already satisfied: protobuf>=3.19.6 in /usr/local/lib/python3.10/dist-packages (from tensorboard->ms-swift->-r requirements.txt (line 8)) (3.20.3)\n",
321
+ "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard->ms-swift->-r requirements.txt (line 8)) (0.7.2)\n",
322
+ "Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from tensorboard->ms-swift->-r requirements.txt (line 8)) (3.0.1)\n",
323
+ "Requirement already satisfied: importlib-metadata>=6.6.0 in /usr/local/lib/python3.10/dist-packages (from yapf->modelscope>=1.7.0->-r requirements.txt (line 6)) (6.8.0)\n",
324
+ "Requirement already satisfied: platformdirs>=3.5.1 in /usr/local/lib/python3.10/dist-packages (from yapf->modelscope>=1.7.0->-r requirements.txt (line 6)) (4.0.0)\n",
325
+ "Collecting jmespath<1.0.0,>=0.9.3 (from aliyun-python-sdk-core>=2.13.12->oss2->modelscope>=1.7.0->-r requirements.txt (line 6))\n",
326
+ " Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)\n",
327
+ "Requirement already satisfied: cryptography>=2.6.0 in /usr/local/lib/python3.10/dist-packages (from aliyun-python-sdk-core>=2.13.12->oss2->modelscope>=1.7.0->-r requirements.txt (line 6)) (41.0.7)\n",
328
+ "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->ms-swift->-r requirements.txt (line 8)) (5.3.2)\n",
329
+ "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->ms-swift->-r requirements.txt (line 8)) (0.3.0)\n",
330
+ "Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->ms-swift->-r requirements.txt (line 8)) (4.9)\n",
331
+ "Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard->ms-swift->-r requirements.txt (line 8)) (1.3.1)\n",
332
+ "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata>=6.6.0->yapf->modelscope>=1.7.0->-r requirements.txt (line 6)) (3.17.0)\n",
333
+ "Requirement already satisfied: jupyter-server>=1.8 in /usr/local/lib/python3.10/dist-packages (from nbclassic>=0.4.7->notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (1.24.0)\n",
334
+ "Requirement already satisfied: notebook-shim>=0.2.3 in /usr/local/lib/python3.10/dist-packages (from nbclassic>=0.4.7->notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.2.3)\n",
335
+ "Requirement already satisfied: fastjsonschema in /usr/local/lib/python3.10/dist-packages (from nbformat>=5.1->nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (2.19.0)\n",
336
+ "Requirement already satisfied: jsonschema>=2.6 in /usr/local/lib/python3.10/dist-packages (from nbformat>=5.1->nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (4.19.2)\n",
337
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.0->peft<=0.6.2,>=0.6.0->ms-swift->-r requirements.txt (line 8)) (3.2.1)\n",
338
+ "Requirement already satisfied: triton==2.1.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.0->peft<=0.6.2,>=0.6.0->ms-swift->-r requirements.txt (line 8)) (2.1.0)\n",
339
+ "Collecting sentencepiece!=0.1.92,>=0.1.91 (from transformers>=4.29.0->-r requirements.txt (line 19))\n",
340
+ " Downloading sentencepiece-0.1.99-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
341
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m90.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
342
+ "\u001b[?25hCollecting mypy-extensions>=0.3.0 (from typing-inspect<1,>=0.4.0->dataclasses-json<0.6.0,>=0.5.7->langchain<=0.0.292->-r requirements.txt (line 5))\n",
343
+ " Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)\n",
344
+ "Requirement already satisfied: argon2-cffi-bindings in /usr/local/lib/python3.10/dist-packages (from argon2-cffi->notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (21.2.0)\n",
345
+ "Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.10/dist-packages (from beautifulsoup4->nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (2.5)\n",
346
+ "Requirement already satisfied: webencodings in /usr/local/lib/python3.10/dist-packages (from bleach->nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.5.1)\n",
347
+ "Collecting humanfriendly>=9.1 (from coloredlogs->optimum->ms-swift->-r requirements.txt (line 8))\n",
348
+ " Downloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)\n",
349
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.8/86.8 kB\u001b[0m \u001b[31m12.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
350
+ "\u001b[?25hRequirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->optimum->ms-swift->-r requirements.txt (line 8)) (1.3.0)\n",
351
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (2023.11.2)\n",
352
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.31.1)\n",
353
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter>=1.0.0->-r requirements.txt (line 4)) (0.13.2)\n",
354
+ "Requirement already satisfied: websocket-client in /usr/local/lib/python3.10/dist-packages (from jupyter-server>=1.8->nbclassic>=0.4.7->notebook->jupyter>=1.0.0->-r requirements.txt (line 4)) (1.6.4)\n",
355
+ "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard->ms-swift->-r requirements.txt (line 8)) (0.5.1)\n",
356
+ "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard->ms-swift->-r requirements.txt (line 8)) (3.2.2)\n",
357
+ "Building wheels for collected packages: transformers_stream_generator, oss2, aliyun-python-sdk-core, crcmod\n",
358
+ " Building wheel for transformers_stream_generator (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
359
+ " Created wheel for transformers_stream_generator: filename=transformers_stream_generator-0.0.4-py3-none-any.whl size=12316 sha256=1c066a290d30a4caf5c1f696342fefabc5e4e53974e78a16baf5ce695e60e625\n",
360
+ " Stored in directory: /root/.cache/pip/wheels/47/1d/3c/92d88493ed40c0d9be60a391eb76c9a56e9f9b7542cb789401\n",
361
+ " Building wheel for oss2 (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
362
+ " Created wheel for oss2: filename=oss2-2.18.3-py3-none-any.whl size=115529 sha256=da07051065b19bf1f44f933de48b6821e3e316335b49a3da695bd0f7a34b611e\n",
363
+ " Stored in directory: /root/.cache/pip/wheels/fb/35/c6/994588a250dfbac458cebe2184d4945a0c0a24e62cd82ebe0b\n",
364
+ " Building wheel for aliyun-python-sdk-core (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
365
+ " Created wheel for aliyun-python-sdk-core: filename=aliyun_python_sdk_core-2.14.0-py3-none-any.whl size=535289 sha256=947979cc5979ee0c3f2731dac41254b1ea69042333fc7f5ee9b7dde0dd81a08b\n",
366
+ " Stored in directory: /root/.cache/pip/wheels/16/3c/68/b7eab618d9f1d5e7d386296f1e07e2cf36aaa1eb5161885038\n",
367
+ " Building wheel for crcmod (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
368
+ " Created wheel for crcmod: filename=crcmod-1.7-cp310-cp310-linux_x86_64.whl size=31406 sha256=471e713cfd9790bb47bc1777db6a6786dd6c5e136fdf90f00aed487cf1b646a2\n",
369
+ " Stored in directory: /root/.cache/pip/wheels/85/4c/07/72215c529bd59d67e3dac29711d7aba1b692f543c808ba9e86\n",
370
+ "Successfully built transformers_stream_generator oss2 aliyun-python-sdk-core crcmod\n",
371
+ "Installing collected packages: sentencepiece, crcmod, addict, typing-extensions, simplejson, rouge, qtpy, python-dotenv, pypdf, pycryptodome, pyarrow-hotfix, pyarrow, mypy-extensions, marshmallow, jmespath, jedi, humanfriendly, h11, einops, dill, annotated-types, yapf, typing-inspect, pydantic-core, multiprocess, httpcore, coloredlogs, pydantic, httpx, dataclasses-json, dashscope, aliyun-python-sdk-core, accelerate, qtconsole, openai, langsmith, datasets, aliyun-python-sdk-kms, transformers_stream_generator, peft, oss2, langchain, optimum, modelscope, ms-swift, jupyter\n",
372
+ " Attempting uninstall: typing-extensions\n",
373
+ " Found existing installation: typing_extensions 4.5.0\n",
374
+ " Uninstalling typing_extensions-4.5.0:\n",
375
+ " Successfully uninstalled typing_extensions-4.5.0\n",
376
+ " Attempting uninstall: pyarrow\n",
377
+ " Found existing installation: pyarrow 9.0.0\n",
378
+ " Uninstalling pyarrow-9.0.0:\n",
379
+ " Successfully uninstalled pyarrow-9.0.0\n",
380
+ " Attempting uninstall: pydantic\n",
381
+ " Found existing installation: pydantic 1.10.13\n",
382
+ " Uninstalling pydantic-1.10.13:\n",
383
+ " Successfully uninstalled pydantic-1.10.13\n",
384
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
385
+ "lida 0.0.10 requires fastapi, which is not installed.\n",
386
+ "lida 0.0.10 requires kaleido, which is not installed.\n",
387
+ "lida 0.0.10 requires python-multipart, which is not installed.\n",
388
+ "lida 0.0.10 requires uvicorn, which is not installed.\n",
389
+ "llmx 0.0.15a0 requires cohere, which is not installed.\n",
390
+ "llmx 0.0.15a0 requires tiktoken, which is not installed.\n",
391
+ "ibis-framework 6.2.0 requires pyarrow<13,>=2, but you have pyarrow 14.0.1 which is incompatible.\n",
392
+ "pandas-gbq 0.17.9 requires pyarrow<10.0dev,>=3.0.0, but you have pyarrow 14.0.1 which is incompatible.\n",
393
+ "tensorflow-probability 0.22.0 requires typing-extensions<4.6.0, but you have typing-extensions 4.9.0 which is incompatible.\u001b[0m\u001b[31m\n",
394
+ "\u001b[0mSuccessfully installed accelerate-0.25.0 addict-2.4.0 aliyun-python-sdk-core-2.14.0 aliyun-python-sdk-kms-2.16.2 annotated-types-0.6.0 coloredlogs-15.0.1 crcmod-1.7 dashscope-1.13.4 dataclasses-json-0.5.14 datasets-2.15.0 dill-0.3.7 einops-0.7.0 h11-0.14.0 httpcore-1.0.2 httpx-0.25.2 humanfriendly-10.0 jedi-0.19.1 jmespath-0.10.0 jupyter-1.0.0 langchain-0.0.292 langsmith-0.0.69 marshmallow-3.20.1 modelscope-1.10.0 ms-swift-1.4.0 multiprocess-0.70.15 mypy-extensions-1.0.0 openai-1.3.8 optimum-1.15.0 oss2-2.18.3 peft-0.6.2 pyarrow-14.0.1 pyarrow-hotfix-0.6 pycryptodome-3.19.0 pydantic-2.5.2 pydantic-core-2.14.5 pypdf-3.17.1 python-dotenv-1.0.0 qtconsole-5.5.1 qtpy-2.4.1 rouge-1.0.1 sentencepiece-0.1.99 simplejson-3.19.2 transformers_stream_generator-0.0.4 typing-extensions-4.9.0 typing-inspect-0.9.0 yapf-0.40.2\n"
395
+ ]
396
+ }
397
+ ],
398
+ "source": [
399
+ "pip install -r requirements.txt"
400
+ ]
401
+ },
402
+ {
403
+ "cell_type": "code",
404
+ "execution_count": 4,
405
+ "metadata": {
406
+ "colab": {
407
+ "base_uri": "https://localhost:8080/"
408
+ },
409
+ "id": "5oTlx9Dvu8Ep",
410
+ "outputId": "4930eb60-ce32-44fd-9c4f-4f928792bb8b"
411
+ },
412
+ "outputs": [
413
+ {
414
+ "output_type": "stream",
415
+ "name": "stdout",
416
+ "text": [
417
+ "Requirement already satisfied: dashscope in /usr/local/lib/python3.10/dist-packages (from -r apps/agentfabric/requirements.txt (line 1)) (1.13.4)\n",
418
+ "Collecting faiss-cpu (from -r apps/agentfabric/requirements.txt (line 2))\n",
419
+ " Downloading faiss_cpu-1.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.6 MB)\n",
420
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m17.6/17.6 MB\u001b[0m \u001b[31m69.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
421
+ "\u001b[?25hCollecting gradio==3.47.1 (from -r apps/agentfabric/requirements.txt (line 3))\n",
422
+ " Downloading gradio-3.47.1-py3-none-any.whl (20.3 MB)\n",
423
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m20.3/20.3 MB\u001b[0m \u001b[31m56.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
424
+ "\u001b[?25hRequirement already satisfied: langchain in /usr/local/lib/python3.10/dist-packages (from -r apps/agentfabric/requirements.txt (line 4)) (0.0.292)\n",
425
+ "Collecting markdown-cjk-spacing (from -r apps/agentfabric/requirements.txt (line 5))\n",
426
+ " Downloading markdown_cjk_spacing-0.2.2-py3-none-any.whl (5.1 kB)\n",
427
+ "Collecting markdown_katex (from -r apps/agentfabric/requirements.txt (line 6))\n",
428
+ " Downloading markdown_katex-202112.1034-py2.py3-none-any.whl (39.8 MB)\n",
429
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m39.8/39.8 MB\u001b[0m \u001b[31m39.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
430
+ "\u001b[?25hCollecting mdx_truly_sane_lists (from -r apps/agentfabric/requirements.txt (line 7))\n",
431
+ " Downloading mdx_truly_sane_lists-1.3-py3-none-any.whl (6.1 kB)\n",
432
+ "Collecting pymdown-extensions (from -r apps/agentfabric/requirements.txt (line 8))\n",
433
+ " Downloading pymdown_extensions-10.5-py3-none-any.whl (241 kB)\n",
434
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m241.1/241.1 kB\u001b[0m \u001b[31m29.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
435
+ "\u001b[?25hRequirement already satisfied: python-slugify in /usr/local/lib/python3.10/dist-packages (from -r apps/agentfabric/requirements.txt (line 9)) (8.0.1)\n",
436
+ "Collecting aiofiles<24.0,>=22.0 (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
437
+ " Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
438
+ "Requirement already satisfied: altair<6.0,>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (4.2.2)\n",
439
+ "Collecting fastapi (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
440
+ " Downloading fastapi-0.104.1-py3-none-any.whl (92 kB)\n",
441
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.9/92.9 kB\u001b[0m \u001b[31m13.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
442
+ "\u001b[?25hCollecting ffmpy (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
443
+ " Downloading ffmpy-0.3.1.tar.gz (5.5 kB)\n",
444
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
445
+ "Collecting gradio-client==0.6.0 (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
446
+ " Downloading gradio_client-0.6.0-py3-none-any.whl (298 kB)\n",
447
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m298.8/298.8 kB\u001b[0m \u001b[31m37.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
448
+ "\u001b[?25hRequirement already satisfied: httpx in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (0.25.2)\n",
449
+ "Requirement already satisfied: huggingface-hub>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (0.19.4)\n",
450
+ "Requirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (6.1.1)\n",
451
+ "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (3.1.2)\n",
452
+ "Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (2.1.3)\n",
453
+ "Requirement already satisfied: matplotlib~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (3.7.1)\n",
454
+ "Requirement already satisfied: numpy~=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (1.23.5)\n",
455
+ "Collecting orjson~=3.0 (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
456
+ " Downloading orjson-3.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (138 kB)\n",
457
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m138.7/138.7 kB\u001b[0m \u001b[31m11.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
458
+ "\u001b[?25hRequirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (23.2)\n",
459
+ "Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (1.5.3)\n",
460
+ "Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (9.4.0)\n",
461
+ "Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (2.5.2)\n",
462
+ "Collecting pydub (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
463
+ " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
464
+ "Collecting python-multipart (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
465
+ " Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)\n",
466
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m6.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
467
+ "\u001b[?25hRequirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (6.0.1)\n",
468
+ "Requirement already satisfied: requests~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (2.31.0)\n",
469
+ "Collecting semantic-version~=2.0 (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
470
+ " Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
471
+ "Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (4.9.0)\n",
472
+ "Collecting uvicorn>=0.14.0 (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
473
+ " Downloading uvicorn-0.24.0.post1-py3-none-any.whl (59 kB)\n",
474
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.7/59.7 kB\u001b[0m \u001b[31m8.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
475
+ "\u001b[?25hCollecting websockets<12.0,>=10.0 (from gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
476
+ " Downloading websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)\n",
477
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m18.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
478
+ "\u001b[?25hRequirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==0.6.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (2023.6.0)\n",
479
+ "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from dashscope->-r apps/agentfabric/requirements.txt (line 1)) (3.9.1)\n",
480
+ "Requirement already satisfied: SQLAlchemy<3,>=1.4 in /usr/local/lib/python3.10/dist-packages (from langchain->-r apps/agentfabric/requirements.txt (line 4)) (2.0.23)\n",
481
+ "Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from langchain->-r apps/agentfabric/requirements.txt (line 4)) (4.0.3)\n",
482
+ "Requirement already satisfied: dataclasses-json<0.6.0,>=0.5.7 in /usr/local/lib/python3.10/dist-packages (from langchain->-r apps/agentfabric/requirements.txt (line 4)) (0.5.14)\n",
483
+ "Requirement already satisfied: langsmith<0.1.0,>=0.0.21 in /usr/local/lib/python3.10/dist-packages (from langchain->-r apps/agentfabric/requirements.txt (line 4)) (0.0.69)\n",
484
+ "Requirement already satisfied: numexpr<3.0.0,>=2.8.4 in /usr/local/lib/python3.10/dist-packages (from langchain->-r apps/agentfabric/requirements.txt (line 4)) (2.8.7)\n",
485
+ "Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in /usr/local/lib/python3.10/dist-packages (from langchain->-r apps/agentfabric/requirements.txt (line 4)) (8.2.3)\n",
486
+ "Requirement already satisfied: Markdown>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from markdown-cjk-spacing->-r apps/agentfabric/requirements.txt (line 5)) (3.5.1)\n",
487
+ "Collecting pathlib2 (from markdown_katex->-r apps/agentfabric/requirements.txt (line 6))\n",
488
+ " Downloading pathlib2-2.3.7.post1-py2.py3-none-any.whl (18 kB)\n",
489
+ "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from markdown_katex->-r apps/agentfabric/requirements.txt (line 6)) (67.7.2)\n",
490
+ "Requirement already satisfied: text-unidecode>=1.3 in /usr/local/lib/python3.10/dist-packages (from python-slugify->-r apps/agentfabric/requirements.txt (line 9)) (1.3)\n",
491
+ "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->dashscope->-r apps/agentfabric/requirements.txt (line 1)) (23.1.0)\n",
492
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->dashscope->-r apps/agentfabric/requirements.txt (line 1)) (6.0.4)\n",
493
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->dashscope->-r apps/agentfabric/requirements.txt (line 1)) (1.9.3)\n",
494
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->dashscope->-r apps/agentfabric/requirements.txt (line 1)) (1.4.0)\n",
495
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->dashscope->-r apps/agentfabric/requirements.txt (line 1)) (1.3.1)\n",
496
+ "Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (0.4)\n",
497
+ "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (4.19.2)\n",
498
+ "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (0.12.0)\n",
499
+ "Requirement already satisfied: marshmallow<4.0.0,>=3.18.0 in /usr/local/lib/python3.10/dist-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain->-r apps/agentfabric/requirements.txt (line 4)) (3.20.1)\n",
500
+ "Requirement already satisfied: typing-inspect<1,>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain->-r apps/agentfabric/requirements.txt (line 4)) (0.9.0)\n",
501
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.14.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (3.13.1)\n",
502
+ "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.14.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (4.66.1)\n",
503
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (1.2.0)\n",
504
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (0.12.1)\n",
505
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (4.45.1)\n",
506
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (1.4.5)\n",
507
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (3.1.1)\n",
508
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (2.8.2)\n",
509
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (2023.3.post1)\n",
510
+ "Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (0.6.0)\n",
511
+ "Requirement already satisfied: pydantic-core==2.14.5 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (2.14.5)\n",
512
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (3.3.2)\n",
513
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (3.6)\n",
514
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (2.0.7)\n",
515
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests~=2.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (2023.11.17)\n",
516
+ "Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.10/dist-packages (from SQLAlchemy<3,>=1.4->langchain->-r apps/agentfabric/requirements.txt (line 4)) (3.0.1)\n",
517
+ "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn>=0.14.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (8.1.7)\n",
518
+ "Requirement already satisfied: h11>=0.8 in /usr/local/lib/python3.10/dist-packages (from uvicorn>=0.14.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (0.14.0)\n",
519
+ "Requirement already satisfied: anyio<4.0.0,>=3.7.1 in /usr/local/lib/python3.10/dist-packages (from fastapi->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (3.7.1)\n",
520
+ "Collecting starlette<0.28.0,>=0.27.0 (from fastapi->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3))\n",
521
+ " Downloading starlette-0.27.0-py3-none-any.whl (66 kB)\n",
522
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m10.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
523
+ "\u001b[?25hRequirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (1.0.2)\n",
524
+ "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (1.3.0)\n",
525
+ "Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from pathlib2->markdown_katex->-r apps/agentfabric/requirements.txt (line 6)) (1.16.0)\n",
526
+ "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<4.0.0,>=3.7.1->fastapi->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (1.2.0)\n",
527
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (2023.11.2)\n",
528
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (0.31.1)\n",
529
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.47.1->-r apps/agentfabric/requirements.txt (line 3)) (0.13.2)\n",
530
+ "Requirement already satisfied: mypy-extensions>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from typing-inspect<1,>=0.4.0->dataclasses-json<0.6.0,>=0.5.7->langchain->-r apps/agentfabric/requirements.txt (line 4)) (1.0.0)\n",
531
+ "Building wheels for collected packages: ffmpy\n",
532
+ " Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
533
+ " Created wheel for ffmpy: filename=ffmpy-0.3.1-py3-none-any.whl size=5579 sha256=bf1dba46efe088938cacd98726dfe5d41b89fec124941bde6adfd25177f70131\n",
534
+ " Stored in directory: /root/.cache/pip/wheels/01/a6/d1/1c0828c304a4283b2c1639a09ad86f83d7c487ef34c6b4a1bf\n",
535
+ "Successfully built ffmpy\n",
536
+ "Installing collected packages: pydub, ffmpy, faiss-cpu, websockets, uvicorn, semantic-version, python-multipart, pymdown-extensions, pathlib2, orjson, mdx_truly_sane_lists, markdown-cjk-spacing, aiofiles, starlette, markdown_katex, gradio-client, fastapi, gradio\n",
537
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
538
+ "lida 0.0.10 requires kaleido, which is not installed.\u001b[0m\u001b[31m\n",
539
+ "\u001b[0mSuccessfully installed aiofiles-23.2.1 faiss-cpu-1.7.4 fastapi-0.104.1 ffmpy-0.3.1 gradio-3.47.1 gradio-client-0.6.0 markdown-cjk-spacing-0.2.2 markdown_katex-202112.1034 mdx_truly_sane_lists-1.3 orjson-3.9.10 pathlib2-2.3.7.post1 pydub-0.25.1 pymdown-extensions-10.5 python-multipart-0.0.6 semantic-version-2.10.0 starlette-0.27.0 uvicorn-0.24.0.post1 websockets-11.0.3\n"
540
+ ]
541
+ }
542
+ ],
543
+ "source": [
544
+ "pip install -r apps/agentfabric/requirements.txt"
545
+ ]
546
+ },
547
+ {
548
+ "cell_type": "code",
549
+ "execution_count": 5,
550
+ "metadata": {
551
+ "id": "ydDEtFYtu9AV"
552
+ },
553
+ "outputs": [],
554
+ "source": [
555
+ "import os\n",
556
+ "os.environ[\"DASHSCOPE_API_KEY\"] = \"您的DASHSCOPE_API_KEY\"\n",
557
+ "\n",
558
+ "# 需要输入您的DASHSCOPE_API_KEY;点击此处查看:https://help.aliyun.com/zh/dashscope/developer-reference/activate-dashscope-and-create-an-api-key"
559
+ ]
560
+ },
561
+ {
562
+ "cell_type": "code",
563
+ "execution_count": 6,
564
+ "metadata": {
565
+ "id": "EwZjKacV_RWF"
566
+ },
567
+ "outputs": [],
568
+ "source": [
569
+ "!mv /content/modelscope-agent/modelscope_agent /content/modelscope-agent/apps/agentfabric"
570
+ ]
571
+ },
572
+ {
573
+ "cell_type": "code",
574
+ "execution_count": 7,
575
+ "metadata": {
576
+ "colab": {
577
+ "base_uri": "https://localhost:8080/"
578
+ },
579
+ "id": "PcBMi8iK_Fso",
580
+ "outputId": "68a929ab-abb5-4d2c-c858-ae27a1671b8a"
581
+ },
582
+ "outputs": [
583
+ {
584
+ "output_type": "stream",
585
+ "name": "stdout",
586
+ "text": [
587
+ "/content/modelscope-agent/apps/agentfabric\n"
588
+ ]
589
+ }
590
+ ],
591
+ "source": [
592
+ "cd apps/agentfabric"
593
+ ]
594
+ },
595
+ {
596
+ "cell_type": "code",
597
+ "source": [
598
+ "pip install cohere"
599
+ ],
600
+ "metadata": {
601
+ "colab": {
602
+ "base_uri": "https://localhost:8080/"
603
+ },
604
+ "id": "-HHqkFZSVb06",
605
+ "outputId": "904f7770-c999-48e2-8452-1f50ea683bd8"
606
+ },
607
+ "execution_count": 8,
608
+ "outputs": [
609
+ {
610
+ "output_type": "stream",
611
+ "name": "stdout",
612
+ "text": [
613
+ "Collecting cohere\n",
614
+ " Downloading cohere-4.37-py3-none-any.whl (48 kB)\n",
615
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m48.9/48.9 kB\u001b[0m \u001b[31m782.5 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
616
+ "\u001b[?25hRequirement already satisfied: aiohttp<4.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from cohere) (3.9.1)\n",
617
+ "Collecting backoff<3.0,>=2.0 (from cohere)\n",
618
+ " Downloading backoff-2.2.1-py3-none-any.whl (15 kB)\n",
619
+ "Collecting fastavro<2.0,>=1.8 (from cohere)\n",
620
+ " Downloading fastavro-1.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)\n",
621
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/3.1 MB\u001b[0m \u001b[31m14.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
622
+ "\u001b[?25hRequirement already satisfied: importlib_metadata<7.0,>=6.0 in /usr/local/lib/python3.10/dist-packages (from cohere) (6.8.0)\n",
623
+ "Requirement already satisfied: requests<3.0.0,>=2.25.0 in /usr/local/lib/python3.10/dist-packages (from cohere) (2.31.0)\n",
624
+ "Requirement already satisfied: urllib3<3,>=1.26 in /usr/local/lib/python3.10/dist-packages (from cohere) (2.0.7)\n",
625
+ "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0,>=3.0->cohere) (23.1.0)\n",
626
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0,>=3.0->cohere) (6.0.4)\n",
627
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0,>=3.0->cohere) (1.9.3)\n",
628
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0,>=3.0->cohere) (1.4.0)\n",
629
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0,>=3.0->cohere) (1.3.1)\n",
630
+ "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0,>=3.0->cohere) (4.0.3)\n",
631
+ "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib_metadata<7.0,>=6.0->cohere) (3.17.0)\n",
632
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests<3.0.0,>=2.25.0->cohere) (3.3.2)\n",
633
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests<3.0.0,>=2.25.0->cohere) (3.6)\n",
634
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests<3.0.0,>=2.25.0->cohere) (2023.11.17)\n",
635
+ "Installing collected packages: fastavro, backoff, cohere\n",
636
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
637
+ "llmx 0.0.15a0 requires tiktoken, which is not installed.\u001b[0m\u001b[31m\n",
638
+ "\u001b[0mSuccessfully installed backoff-2.2.1 cohere-4.37 fastavro-1.9.1\n"
639
+ ]
640
+ }
641
+ ]
642
+ },
643
+ {
644
+ "cell_type": "code",
645
+ "source": [
646
+ "pip install tiktoken"
647
+ ],
648
+ "metadata": {
649
+ "colab": {
650
+ "base_uri": "https://localhost:8080/"
651
+ },
652
+ "id": "fJBCVoN4TWub",
653
+ "outputId": "81b35da5-d705-4801-f821-0f84a75cae37"
654
+ },
655
+ "execution_count": 9,
656
+ "outputs": [
657
+ {
658
+ "output_type": "stream",
659
+ "name": "stdout",
660
+ "text": [
661
+ "Collecting tiktoken\n",
662
+ " Downloading tiktoken-0.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB)\n",
663
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m9.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
664
+ "\u001b[?25hRequirement already satisfied: regex>=2022.1.18 in /usr/local/lib/python3.10/dist-packages (from tiktoken) (2023.6.3)\n",
665
+ "Requirement already satisfied: requests>=2.26.0 in /usr/local/lib/python3.10/dist-packages (from tiktoken) (2.31.0)\n",
666
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken) (3.3.2)\n",
667
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken) (3.6)\n",
668
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken) (2.0.7)\n",
669
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.26.0->tiktoken) (2023.11.17)\n",
670
+ "Installing collected packages: tiktoken\n",
671
+ "Successfully installed tiktoken-0.5.2\n"
672
+ ]
673
+ }
674
+ ]
675
+ },
676
+ {
677
+ "cell_type": "code",
678
+ "execution_count": 11,
679
+ "metadata": {
680
+ "colab": {
681
+ "base_uri": "https://localhost:8080/"
682
+ },
683
+ "id": "TEB4sJ48vzdA",
684
+ "outputId": "c3372871-347b-471d-fc64-08013297aabc"
685
+ },
686
+ "outputs": [
687
+ {
688
+ "output_type": "stream",
689
+ "name": "stdout",
690
+ "text": [
691
+ "Traceback (most recent call last):\n",
692
+ " File \"<frozen importlib._bootstrap>\", line 688, in _load_unlocked\n",
693
+ " File \"<frozen importlib._bootstrap_external>\", line 883, in exec_module\n",
694
+ " File \"<frozen importlib._bootstrap>\", line 241, in _call_with_frames_removed\n",
695
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py\", line 13, in <module>\n",
696
+ " from gradio.helpers import EventData\n",
697
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/helpers.py\", line 18, in <module>\n",
698
+ " import matplotlib.pyplot as plt\n",
699
+ " File \"/usr/local/lib/python3.10/dist-packages/matplotlib/pyplot.py\", line 61, in <module>\n",
700
+ " from matplotlib.figure import Figure, FigureBase, figaspect\n",
701
+ " File \"/usr/local/lib/python3.10/dist-packages/matplotlib/figure.py\", line 43, in <module>\n",
702
+ " from matplotlib import _blocking_input, backend_bases, _docstring, projections\n",
703
+ " File \"/usr/local/lib/python3.10/dist-packages/matplotlib/projections/__init__.py\", line 58, in <module>\n",
704
+ " from mpl_toolkits.mplot3d import Axes3D\n",
705
+ " File \"/usr/local/lib/python3.10/dist-packages/mpl_toolkits/mplot3d/__init__.py\", line 1, in <module>\n",
706
+ " from .axes3d import Axes3D\n",
707
+ " File \"/usr/local/lib/python3.10/dist-packages/mpl_toolkits/mplot3d/axes3d.py\", line 45, in <module>\n",
708
+ " class Axes3D(Axes):\n",
709
+ " File \"/usr/local/lib/python3.10/dist-packages/matplotlib/_docstring.py\", line 82, in __call__\n",
710
+ " self(obj.__init__)\n",
711
+ " File \"/usr/local/lib/python3.10/dist-packages/matplotlib/_docstring.py\", line 80, in __call__\n",
712
+ " super().__call__(obj)\n",
713
+ " File \"/usr/local/lib/python3.10/dist-packages/matplotlib/_docstring.py\", line 40, in __call__\n",
714
+ " func.__doc__ = inspect.cleandoc(func.__doc__) % self.params\n",
715
+ " File \"/usr/local/lib/python3.10/dist-packages/matplotlib/_docstring.py\", line 61, in __missing__\n",
716
+ " return self.setdefault(key, kwdoc(cls))\n",
717
+ " File \"/usr/local/lib/python3.10/dist-packages/matplotlib/artist.py\", line 1860, in kwdoc\n",
718
+ " 'Properties:\\n' + '\\n'.join(ai.pprint_setters(leadingspace=4)))\n",
719
+ " File \"/usr/local/lib/python3.10/dist-packages/matplotlib/artist.py\", line 1621, in pprint_setters\n",
720
+ " accepts = self.get_valid_values(prop)\n",
721
+ " File \"/usr/local/lib/python3.10/dist-packages/matplotlib/artist.py\", line 1488, in get_valid_values\n",
722
+ " docstring = inspect.getdoc(func)\n",
723
+ " File \"/usr/lib/python3.10/inspect.py\", line 742, in getdoc\n",
724
+ " return cleandoc(doc)\n",
725
+ " File \"/usr/lib/python3.10/inspect.py\", line 759, in cleandoc\n",
726
+ " indent = len(line) - content\n",
727
+ "KeyboardInterrupt\n",
728
+ "\n",
729
+ "During handling of the above exception, another exception occurred:\n",
730
+ "\n",
731
+ "Traceback (most recent call last):\n",
732
+ " File \"/content/modelscope-agent/apps/agentfabric/app.py\", line 7, in <module>\n",
733
+ " import gradio as gr\n",
734
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/__init__.py\", line 3, in <module>\n",
735
+ " import gradio.components as components\n",
736
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/components/__init__.py\", line 1, in <module>\n",
737
+ " from gradio.components.annotated_image import AnnotatedImage\n",
738
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/components/annotated_image.py\", line 14, in <module>\n",
739
+ " from gradio.components.base import IOComponent, _Keywords\n",
740
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/components/base.py\", line 29, in <module>\n",
741
+ " from gradio.blocks import Block, BlockContext, Updateable\n",
742
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/blocks.py\", line 29, in <module>\n",
743
+ " from gradio import (\n",
744
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/networking.py\", line 20, in <module>\n",
745
+ " from gradio.routes import App\n",
746
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/routes.py\", line 49, in <module>\n",
747
+ " from gradio import route_utils, utils, wasm_utils\n",
748
+ " File \"<frozen importlib._bootstrap>\", line 1027, in _find_and_load\n",
749
+ " File \"<frozen importlib._bootstrap>\", line 1006, in _find_and_load_unlocked\n",
750
+ " File \"<frozen importlib._bootstrap>\", line 688, in _load_unlocked\n",
751
+ "KeyboardInterrupt\n",
752
+ "^C\n"
753
+ ]
754
+ }
755
+ ],
756
+ "source": [
757
+ "!python app.py"
758
+ ]
759
+ },
760
+ {
761
+ "cell_type": "code",
762
+ "execution_count": null,
763
+ "metadata": {
764
+ "id": "9JFikPP1v2GO"
765
+ },
766
+ "outputs": [],
767
+ "source": []
768
+ }
769
+ ],
770
+ "metadata": {
771
+ "accelerator": "GPU",
772
+ "colab": {
773
+ "provenance": [],
774
+ "machine_shape": "hm",
775
+ "gpuType": "V100",
776
+ "authorship_tag": "ABX9TyOttz8PWX7MfuyqdXhljoq2",
777
+ "include_colab_link": true
778
+ },
779
+ "kernelspec": {
780
+ "display_name": "Python 3",
781
+ "name": "python3"
782
+ },
783
+ "language_info": {
784
+ "name": "python"
785
+ }
786
+ },
787
+ "nbformat": 4,
788
+ "nbformat_minor": 0
789
+ }
notebooks/ChatGLM2_linghua_VITS2.ipynb ADDED
@@ -0,0 +1,838 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "machine_shape": "hm",
8
+ "gpuType": "V100",
9
+ "authorship_tag": "ABX9TyN7TnYg3pwKN9X2FXYzEjog",
10
+ "include_colab_link": true
11
+ },
12
+ "kernelspec": {
13
+ "name": "python3",
14
+ "display_name": "Python 3"
15
+ },
16
+ "language_info": {
17
+ "name": "python"
18
+ },
19
+ "accelerator": "GPU"
20
+ },
21
+ "cells": [
22
+ {
23
+ "cell_type": "markdown",
24
+ "metadata": {
25
+ "id": "view-in-github",
26
+ "colab_type": "text"
27
+ },
28
+ "source": [
29
+ "<a href=\"https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/notebooks/ChatGLM2_linghua_VITS2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type": "code",
34
+ "execution_count": 1,
35
+ "metadata": {
36
+ "colab": {
37
+ "base_uri": "https://localhost:8080/"
38
+ },
39
+ "id": "eKmmZnI_H7Z2",
40
+ "outputId": "9401a8c5-ab3e-4072-cc8e-24a00cf1e942"
41
+ },
42
+ "outputs": [
43
+ {
44
+ "output_type": "stream",
45
+ "name": "stdout",
46
+ "text": [
47
+ "Cloning into 'ChatGLM2-VITS2-Colab'...\n",
48
+ "remote: Enumerating objects: 316, done.\u001b[K\n",
49
+ "remote: Counting objects: 100% (6/6), done.\u001b[K\n",
50
+ "remote: Compressing objects: 100% (6/6), done.\u001b[K\n",
51
+ "remote: Total 316 (delta 1), reused 0 (delta 0), pack-reused 310\u001b[K\n",
52
+ "Receiving objects: 100% (316/316), 1.41 MiB | 5.92 MiB/s, done.\n",
53
+ "Resolving deltas: 100% (98/98), done.\n",
54
+ "Filtering content: 100% (29/29), 16.49 GiB | 135.97 MiB/s, done.\n"
55
+ ]
56
+ }
57
+ ],
58
+ "source": [
59
+ "!git clone https://huggingface.co/spaces/kevinwang676/ChatGLM2-VITS2-Colab"
60
+ ]
61
+ },
62
+ {
63
+ "cell_type": "code",
64
+ "source": [
65
+ "cd ChatGLM2-VITS2-Colab"
66
+ ],
67
+ "metadata": {
68
+ "colab": {
69
+ "base_uri": "https://localhost:8080/"
70
+ },
71
+ "id": "UcvF2Wy8INvW",
72
+ "outputId": "6df84d9a-8a41-4dc7-a319-15fc4318dc4e"
73
+ },
74
+ "execution_count": 2,
75
+ "outputs": [
76
+ {
77
+ "output_type": "stream",
78
+ "name": "stdout",
79
+ "text": [
80
+ "/content/ChatGLM2-VITS2-Colab\n"
81
+ ]
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "cell_type": "code",
87
+ "source": [
88
+ "pip install -r requirements.txt"
89
+ ],
90
+ "metadata": {
91
+ "colab": {
92
+ "base_uri": "https://localhost:8080/"
93
+ },
94
+ "id": "F3Wzrh6wIRsy",
95
+ "outputId": "371e65da-3501-4c1b-f8fc-c3d8b3009d3b"
96
+ },
97
+ "execution_count": 3,
98
+ "outputs": [
99
+ {
100
+ "output_type": "stream",
101
+ "name": "stdout",
102
+ "text": [
103
+ "Collecting librosa==0.9.1 (from -r requirements.txt (line 1))\n",
104
+ " Downloading librosa-0.9.1-py3-none-any.whl (213 kB)\n",
105
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m213.1/213.1 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
106
+ "\u001b[?25hRequirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 2)) (3.7.1)\n",
107
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 3)) (1.23.5)\n",
108
+ "Requirement already satisfied: numba in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 4)) (0.58.1)\n",
109
+ "Collecting phonemizer (from -r requirements.txt (line 5))\n",
110
+ " Downloading phonemizer-3.2.1-py3-none-any.whl (90 kB)\n",
111
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m90.6/90.6 kB\u001b[0m \u001b[31m12.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
112
+ "\u001b[?25hRequirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 6)) (1.11.3)\n",
113
+ "Requirement already satisfied: tensorboard in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (2.14.1)\n",
114
+ "Requirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 8)) (2.1.0+cu118)\n",
115
+ "Requirement already satisfied: torchaudio in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 9)) (2.1.0+cu118)\n",
116
+ "Requirement already satisfied: torchvision in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 10)) (0.16.0+cu118)\n",
117
+ "Collecting Unidecode (from -r requirements.txt (line 11))\n",
118
+ " Downloading Unidecode-1.3.7-py3-none-any.whl (235 kB)\n",
119
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m235.5/235.5 kB\u001b[0m \u001b[31m28.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
120
+ "\u001b[?25hCollecting amfm_decompy (from -r requirements.txt (line 12))\n",
121
+ " Downloading AMFM_decompy-1.0.11.tar.gz (751 kB)\n",
122
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m751.5/751.5 kB\u001b[0m \u001b[31m51.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
123
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
124
+ "Requirement already satisfied: jieba in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 13)) (0.42.1)\n",
125
+ "Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 14)) (4.35.2)\n",
126
+ "Collecting pypinyin (from -r requirements.txt (line 15))\n",
127
+ " Downloading pypinyin-0.49.0-py2.py3-none-any.whl (1.4 MB)\n",
128
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.4/1.4 MB\u001b[0m \u001b[31m80.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
129
+ "\u001b[?25hCollecting cn2an (from -r requirements.txt (line 16))\n",
130
+ " Downloading cn2an-0.5.22-py3-none-any.whl (224 kB)\n",
131
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m225.0/225.0 kB\u001b[0m \u001b[31m27.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
132
+ "\u001b[?25hCollecting gradio (from -r requirements.txt (line 17))\n",
133
+ " Downloading gradio-4.7.1-py3-none-any.whl (16.5 MB)\n",
134
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m16.5/16.5 MB\u001b[0m \u001b[31m92.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
135
+ "\u001b[?25hCollecting av (from -r requirements.txt (line 18))\n",
136
+ " Downloading av-11.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (32.9 MB)\n",
137
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m32.9/32.9 MB\u001b[0m \u001b[31m55.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
138
+ "\u001b[?25hCollecting mecab-python3 (from -r requirements.txt (line 19))\n",
139
+ " Downloading mecab_python3-1.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (581 kB)\n",
140
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m581.7/581.7 kB\u001b[0m \u001b[31m52.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
141
+ "\u001b[?25hCollecting loguru (from -r requirements.txt (line 20))\n",
142
+ " Downloading loguru-0.7.2-py3-none-any.whl (62 kB)\n",
143
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.5/62.5 kB\u001b[0m \u001b[31m8.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
144
+ "\u001b[?25hCollecting unidic-lite (from -r requirements.txt (line 21))\n",
145
+ " Downloading unidic-lite-1.0.8.tar.gz (47.4 MB)\n",
146
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m47.4/47.4 MB\u001b[0m \u001b[31m38.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
147
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
148
+ "Collecting cmudict (from -r requirements.txt (line 22))\n",
149
+ " Downloading cmudict-1.0.15-py3-none-any.whl (939 kB)\n",
150
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m939.4/939.4 kB\u001b[0m \u001b[31m67.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
151
+ "\u001b[?25hCollecting fugashi (from -r requirements.txt (line 23))\n",
152
+ " Downloading fugashi-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (600 kB)\n",
153
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m600.9/600.9 kB\u001b[0m \u001b[31m58.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
154
+ "\u001b[?25hCollecting num2words (from -r requirements.txt (line 24))\n",
155
+ " Downloading num2words-0.5.13-py3-none-any.whl (143 kB)\n",
156
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m143.3/143.3 kB\u001b[0m \u001b[31m17.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
157
+ "\u001b[?25hCollecting Cython==0.29.21 (from -r requirements.txt (line 25))\n",
158
+ " Downloading Cython-0.29.21-py2.py3-none-any.whl (974 kB)\n",
159
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m974.2/974.2 kB\u001b[0m \u001b[31m62.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
160
+ "\u001b[?25hCollecting openai-whisper (from -r requirements.txt (line 26))\n",
161
+ " Downloading openai-whisper-20231117.tar.gz (798 kB)\n",
162
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m798.6/798.6 kB\u001b[0m \u001b[31m66.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
163
+ "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
164
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
165
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
166
+ "Requirement already satisfied: protobuf in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 28)) (3.20.3)\n",
167
+ "Collecting transformers (from -r requirements.txt (line 14))\n",
168
+ " Downloading transformers-4.30.2-py3-none-any.whl (7.2 MB)\n",
169
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.2/7.2 MB\u001b[0m \u001b[31m118.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
170
+ "\u001b[?25hCollecting cpm_kernels (from -r requirements.txt (line 30))\n",
171
+ " Downloading cpm_kernels-1.0.11-py3-none-any.whl (416 kB)\n",
172
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m416.6/416.6 kB\u001b[0m \u001b[31m42.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
173
+ "\u001b[?25hCollecting gradio (from -r requirements.txt (line 17))\n",
174
+ " Downloading gradio-3.30.0-py3-none-any.whl (17.3 MB)\n",
175
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m17.3/17.3 MB\u001b[0m \u001b[31m97.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
176
+ "\u001b[?25hCollecting mdtex2html (from -r requirements.txt (line 32))\n",
177
+ " Downloading mdtex2html-1.2.0-py3-none-any.whl (13 kB)\n",
178
+ "Collecting sentencepiece (from -r requirements.txt (line 33))\n",
179
+ " Downloading sentencepiece-0.1.99-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
180
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m85.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
181
+ "\u001b[?25hCollecting accelerate (from -r requirements.txt (line 34))\n",
182
+ " Downloading accelerate-0.24.1-py3-none-any.whl (261 kB)\n",
183
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m261.4/261.4 kB\u001b[0m \u001b[31m30.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
184
+ "\u001b[?25hCollecting sse-starlette (from -r requirements.txt (line 35))\n",
185
+ " Downloading sse_starlette-1.8.2-py3-none-any.whl (8.9 kB)\n",
186
+ "Requirement already satisfied: audioread>=2.1.5 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.1->-r requirements.txt (line 1)) (3.0.1)\n",
187
+ "Requirement already satisfied: scikit-learn>=0.19.1 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.1->-r requirements.txt (line 1)) (1.2.2)\n",
188
+ "Requirement already satisfied: joblib>=0.14 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.1->-r requirements.txt (line 1)) (1.3.2)\n",
189
+ "Requirement already satisfied: decorator>=4.0.10 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.1->-r requirements.txt (line 1)) (4.4.2)\n",
190
+ "Collecting resampy>=0.2.2 (from librosa==0.9.1->-r requirements.txt (line 1))\n",
191
+ " Downloading resampy-0.4.2-py3-none-any.whl (3.1 MB)\n",
192
+ "\u001b[2K \u001b[90m━━━���━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/3.1 MB\u001b[0m \u001b[31m104.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
193
+ "\u001b[?25hRequirement already satisfied: soundfile>=0.10.2 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.1->-r requirements.txt (line 1)) (0.12.1)\n",
194
+ "Requirement already satisfied: pooch>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.1->-r requirements.txt (line 1)) (1.8.0)\n",
195
+ "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.1->-r requirements.txt (line 1)) (23.2)\n",
196
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 14)) (3.13.1)\n",
197
+ "Requirement already satisfied: huggingface-hub<1.0,>=0.14.1 in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 14)) (0.19.4)\n",
198
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 14)) (6.0.1)\n",
199
+ "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 14)) (2023.6.3)\n",
200
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 14)) (2.31.0)\n",
201
+ "Collecting tokenizers!=0.11.3,<0.14,>=0.11.1 (from transformers->-r requirements.txt (line 14))\n",
202
+ " Downloading tokenizers-0.13.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)\n",
203
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m130.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
204
+ "\u001b[?25hRequirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 14)) (0.4.0)\n",
205
+ "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers->-r requirements.txt (line 14)) (4.66.1)\n",
206
+ "Collecting aiofiles (from gradio->-r requirements.txt (line 17))\n",
207
+ " Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
208
+ "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 17)) (3.8.6)\n",
209
+ "Requirement already satisfied: altair>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 17)) (4.2.2)\n",
210
+ "Collecting fastapi (from gradio->-r requirements.txt (line 17))\n",
211
+ " Downloading fastapi-0.104.1-py3-none-any.whl (92 kB)\n",
212
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.9/92.9 kB\u001b[0m \u001b[31m12.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
213
+ "\u001b[?25hCollecting ffmpy (from gradio->-r requirements.txt (line 17))\n",
214
+ " Downloading ffmpy-0.3.1.tar.gz (5.5 kB)\n",
215
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
216
+ "Collecting gradio-client>=0.2.4 (from gradio->-r requirements.txt (line 17))\n",
217
+ " Downloading gradio_client-0.7.0-py3-none-any.whl (302 kB)\n",
218
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m302.7/302.7 kB\u001b[0m \u001b[31m29.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
219
+ "\u001b[?25hCollecting httpx (from gradio->-r requirements.txt (line 17))\n",
220
+ " Downloading httpx-0.25.2-py3-none-any.whl (74 kB)\n",
221
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.0/75.0 kB\u001b[0m \u001b[31m9.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
222
+ "\u001b[?25hRequirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 17)) (3.1.2)\n",
223
+ "Requirement already satisfied: markdown-it-py[linkify]>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 17)) (3.0.0)\n",
224
+ "Requirement already satisfied: markupsafe in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 17)) (2.1.3)\n",
225
+ "Collecting mdit-py-plugins<=0.3.3 (from gradio->-r requirements.txt (line 17))\n",
226
+ " Downloading mdit_py_plugins-0.3.3-py3-none-any.whl (50 kB)\n",
227
+ "\u001b[2K \u001b[90m━━━━━━━━���━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.5/50.5 kB\u001b[0m \u001b[31m6.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
228
+ "\u001b[?25hCollecting orjson (from gradio->-r requirements.txt (line 17))\n",
229
+ " Downloading orjson-3.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (138 kB)\n",
230
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m138.7/138.7 kB\u001b[0m \u001b[31m15.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
231
+ "\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 17)) (1.5.3)\n",
232
+ "Requirement already satisfied: pillow in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 17)) (9.4.0)\n",
233
+ "Requirement already satisfied: pydantic in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 17)) (1.10.13)\n",
234
+ "Collecting pydub (from gradio->-r requirements.txt (line 17))\n",
235
+ " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
236
+ "Requirement already satisfied: pygments>=2.12.0 in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 17)) (2.16.1)\n",
237
+ "Collecting python-multipart (from gradio->-r requirements.txt (line 17))\n",
238
+ " Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)\n",
239
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m6.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
240
+ "\u001b[?25hCollecting semantic-version (from gradio->-r requirements.txt (line 17))\n",
241
+ " Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
242
+ "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from gradio->-r requirements.txt (line 17)) (4.5.0)\n",
243
+ "Collecting uvicorn>=0.14.0 (from gradio->-r requirements.txt (line 17))\n",
244
+ " Downloading uvicorn-0.24.0.post1-py3-none-any.whl (59 kB)\n",
245
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.7/59.7 kB\u001b[0m \u001b[31m8.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
246
+ "\u001b[?25hCollecting websockets>=10.0 (from gradio->-r requirements.txt (line 17))\n",
247
+ " Downloading websockets-12.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (130 kB)\n",
248
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.2/130.2 kB\u001b[0m \u001b[31m17.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
249
+ "\u001b[?25hRequirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 2)) (1.2.0)\n",
250
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 2)) (0.12.1)\n",
251
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 2)) (4.44.3)\n",
252
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 2)) (1.4.5)\n",
253
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 2)) (3.1.1)\n",
254
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib->-r requirements.txt (line 2)) (2.8.2)\n",
255
+ "Requirement already satisfied: llvmlite<0.42,>=0.41.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba->-r requirements.txt (line 4)) (0.41.1)\n",
256
+ "Collecting segments (from phonemizer->-r requirements.txt (line 5))\n",
257
+ " Downloading segments-2.2.1-py2.py3-none-any.whl (15 kB)\n",
258
+ "Requirement already satisfied: attrs>=18.1 in /usr/local/lib/python3.10/dist-packages (from phonemizer->-r requirements.txt (line 5)) (23.1.0)\n",
259
+ "Collecting dlinfo (from phonemizer->-r requirements.txt (line 5))\n",
260
+ " Downloading dlinfo-1.2.1-py3-none-any.whl (3.6 kB)\n",
261
+ "Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.10/dist-packages (from tensorboard->-r requirements.txt (line 7)) (1.4.0)\n",
262
+ "Requirement already satisfied: grpcio>=1.48.2 in /usr/local/lib/python3.10/dist-packages (from tensorboard->-r requirements.txt (line 7)) (1.59.2)\n",
263
+ "Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.10/dist-packages (from tensorboard->-r requirements.txt (line 7)) (2.17.3)\n",
264
+ "Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in /usr/local/lib/python3.10/dist-packages (from tensorboard->-r requirements.txt (line 7)) (1.0.0)\n",
265
+ "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.10/dist-packages (from tensorboard->-r requirements.txt (line 7)) (3.5.1)\n",
266
+ "Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard->-r requirements.txt (line 7)) (67.7.2)\n",
267
+ "Requirement already satisfied: six>1.9 in /usr/local/lib/python3.10/dist-packages (from tensorboard->-r requirements.txt (line 7)) (1.16.0)\n",
268
+ "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard->-r requirements.txt (line 7)) (0.7.2)\n",
269
+ "Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from tensorboard->-r requirements.txt (line 7)) (3.0.1)\n",
270
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch->-r requirements.txt (line 8)) (1.12)\n",
271
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->-r requirements.txt (line 8)) (3.2.1)\n",
272
+ "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from torch->-r requirements.txt (line 8)) (2023.6.0)\n",
273
+ "Requirement already satisfied: triton==2.1.0 in /usr/local/lib/python3.10/dist-packages (from torch->-r requirements.txt (line 8)) (2.1.0)\n",
274
+ "Collecting proces>=0.1.3 (from cn2an->-r requirements.txt (line 16))\n",
275
+ " Downloading proces-0.1.7-py3-none-any.whl (137 kB)\n",
276
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.7/137.7 kB\u001b[0m \u001b[31m18.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
277
+ "\u001b[?25hRequirement already satisfied: importlib-metadata<7.0,>=5.1 in /usr/local/lib/python3.10/dist-packages (from cmudict->-r requirements.txt (line 22)) (6.8.0)\n",
278
+ "Collecting importlib-resources<6.0.0,>=5.10.1 (from cmudict->-r requirements.txt (line 22))\n",
279
+ " Downloading importlib_resources-5.13.0-py3-none-any.whl (32 kB)\n",
280
+ "Collecting docopt>=0.6.2 (from num2words->-r requirements.txt (line 24))\n",
281
+ " Downloading docopt-0.6.2.tar.gz (25 kB)\n",
282
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
283
+ "Requirement already satisfied: more-itertools in /usr/local/lib/python3.10/dist-packages (from openai-whisper->-r requirements.txt (line 26)) (10.1.0)\n",
284
+ "Collecting tiktoken (from openai-whisper->-r requirements.txt (line 26))\n",
285
+ " Downloading tiktoken-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB)\n",
286
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m91.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
287
+ "\u001b[?25hCollecting latex2mathml (from mdtex2html->-r requirements.txt (line 32))\n",
288
+ " Downloading latex2mathml-3.76.0-py3-none-any.whl (73 kB)\n",
289
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m73.4/73.4 kB\u001b[0m \u001b[31m9.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
290
+ "\u001b[?25hRequirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate->-r requirements.txt (line 34)) (5.9.5)\n",
291
+ "Collecting starlette (from sse-starlette->-r requirements.txt (line 35))\n",
292
+ " Downloading starlette-0.32.0.post1-py3-none-any.whl (70 kB)\n",
293
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m70.0/70.0 kB\u001b[0m \u001b[31m8.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
294
+ "\u001b[?25hRequirement already satisfied: anyio in /usr/local/lib/python3.10/dist-packages (from sse-starlette->-r requirements.txt (line 35)) (3.7.1)\n",
295
+ "Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair>=4.2.0->gradio->-r requirements.txt (line 17)) (0.4)\n",
296
+ "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair>=4.2.0->gradio->-r requirements.txt (line 17)) (4.19.2)\n",
297
+ "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair>=4.2.0->gradio->-r requirements.txt (line 17)) (0.12.0)\n",
298
+ "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->-r requirements.txt (line 7)) (5.3.2)\n",
299
+ "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->-r requirements.txt (line 7)) (0.3.0)\n",
300
+ "Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->-r requirements.txt (line 7)) (4.9)\n",
301
+ "Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard->-r requirements.txt (line 7)) (1.3.1)\n",
302
+ "Collecting websockets>=10.0 (from gradio->-r requirements.txt (line 17))\n",
303
+ " Downloading websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)\n",
304
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m16.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
305
+ "\u001b[?25hRequirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata<7.0,>=5.1->cmudict->-r requirements.txt (line 22)) (3.17.0)\n",
306
+ "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify]>=2.0.0->gradio->-r requirements.txt (line 17)) (0.1.2)\n",
307
+ "Requirement already satisfied: linkify-it-py<3,>=1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify]>=2.0.0->gradio->-r requirements.txt (line 17)) (2.0.2)\n",
308
+ "INFO: pip is looking at multiple versions of mdit-py-plugins to determine which version is compatible with other requirements. This could take a while.\n",
309
+ "Collecting mdit-py-plugins<=0.3.3 (from gradio->-r requirements.txt (line 17))\n",
310
+ " Downloading mdit_py_plugins-0.3.2-py3-none-any.whl (50 kB)\n",
311
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.4/50.4 kB\u001b[0m \u001b[31m6.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
312
+ "\u001b[?25h Downloading mdit_py_plugins-0.3.1-py3-none-any.whl (46 kB)\n",
313
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.5/46.5 kB\u001b[0m \u001b[31m5.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
314
+ "\u001b[?25h Downloading mdit_py_plugins-0.3.0-py3-none-any.whl (43 kB)\n",
315
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m43.7/43.7 kB\u001b[0m \u001b[31m5.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
316
+ "\u001b[?25h Downloading mdit_py_plugins-0.2.8-py3-none-any.whl (41 kB)\n",
317
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.0/41.0 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
318
+ "\u001b[?25h Downloading mdit_py_plugins-0.2.7-py3-none-any.whl (41 kB)\n",
319
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.0/41.0 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
320
+ "\u001b[?25h Downloading mdit_py_plugins-0.2.6-py3-none-any.whl (39 kB)\n",
321
+ " Downloading mdit_py_plugins-0.2.5-py3-none-any.whl (39 kB)\n",
322
+ "INFO: pip is looking at multiple versions of mdit-py-plugins to determine which version is compatible with other requirements. This could take a while.\n",
323
+ " Downloading mdit_py_plugins-0.2.4-py3-none-any.whl (39 kB)\n",
324
+ " Downloading mdit_py_plugins-0.2.3-py3-none-any.whl (39 kB)\n",
325
+ " Downloading mdit_py_plugins-0.2.2-py3-none-any.whl (39 kB)\n",
326
+ " Downloading mdit_py_plugins-0.2.1-py3-none-any.whl (38 kB)\n",
327
+ " Downloading mdit_py_plugins-0.2.0-py3-none-any.whl (38 kB)\n",
328
+ "INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.\n",
329
+ " Downloading mdit_py_plugins-0.1.0-py3-none-any.whl (37 kB)\n",
330
+ "Collecting markdown-it-py[linkify]>=2.0.0 (from gradio->-r requirements.txt (line 17))\n",
331
+ " Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)\n",
332
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m87.5/87.5 kB\u001b[0m \u001b[31m11.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
333
+ "\u001b[?25h Downloading markdown_it_py-2.2.0-py3-none-any.whl (84 kB)\n",
334
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m84.5/84.5 kB\u001b[0m \u001b[31m11.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
335
+ "\u001b[?25hRequirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->gradio->-r requirements.txt (line 17)) (2023.3.post1)\n",
336
+ "Requirement already satisfied: platformdirs>=2.5.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.0->librosa==0.9.1->-r requirements.txt (line 1)) (4.0.0)\n",
337
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->transformers->-r requirements.txt (line 14)) (3.3.2)\n",
338
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers->-r requirements.txt (line 14)) (3.4)\n",
339
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers->-r requirements.txt (line 14)) (2.0.7)\n",
340
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers->-r requirements.txt (line 14)) (2023.7.22)\n",
341
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.19.1->librosa==0.9.1->-r requirements.txt (line 1)) (3.2.0)\n",
342
+ "Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile>=0.10.2->librosa==0.9.1->-r requirements.txt (line 1)) (1.16.0)\n",
343
+ "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn>=0.14.0->gradio->-r requirements.txt (line 17)) (8.1.7)\n",
344
+ "Collecting h11>=0.8 (from uvicorn>=0.14.0->gradio->-r requirements.txt (line 17))\n",
345
+ " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
346
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m7.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
347
+ "\u001b[?25hRequirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio->-r requirements.txt (line 17)) (6.0.4)\n",
348
+ "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio->-r requirements.txt (line 17)) (4.0.3)\n",
349
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio->-r requirements.txt (line 17)) (1.9.2)\n",
350
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio->-r requirements.txt (line 17)) (1.4.0)\n",
351
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio->-r requirements.txt (line 17)) (1.3.1)\n",
352
+ "Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.10/dist-packages (from anyio->sse-starlette->-r requirements.txt (line 35)) (1.3.0)\n",
353
+ "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio->sse-starlette->-r requirements.txt (line 35)) (1.1.3)\n",
354
+ "Collecting starlette (from sse-starlette->-r requirements.txt (line 35))\n",
355
+ " Downloading starlette-0.27.0-py3-none-any.whl (66 kB)\n",
356
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
357
+ "\u001b[?25hCollecting typing-extensions (from gradio->-r requirements.txt (line 17))\n",
358
+ " Downloading typing_extensions-4.8.0-py3-none-any.whl (31 kB)\n",
359
+ "Collecting httpcore==1.* (from httpx->gradio->-r requirements.txt (line 17))\n",
360
+ " Downloading httpcore-1.0.2-py3-none-any.whl (76 kB)\n",
361
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.9/76.9 kB\u001b[0m \u001b[31m10.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
362
+ "\u001b[?25hCollecting clldutils>=1.7.3 (from segments->phonemizer->-r requirements.txt (line 5))\n",
363
+ " Downloading clldutils-3.20.0-py2.py3-none-any.whl (1.7 MB)\n",
364
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m91.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
365
+ "\u001b[?25hCollecting csvw>=1.5.6 (from segments->phonemizer->-r requirements.txt (line 5))\n",
366
+ " Downloading csvw-3.2.1-py2.py3-none-any.whl (56 kB)\n",
367
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.7/56.7 kB\u001b[0m \u001b[31m7.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
368
+ "\u001b[?25hRequirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch->-r requirements.txt (line 8)) (1.3.0)\n",
369
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile>=0.10.2->librosa==0.9.1->-r requirements.txt (line 1)) (2.21)\n",
370
+ "Requirement already satisfied: tabulate>=0.7.7 in /usr/local/lib/python3.10/dist-packages (from clldutils>=1.7.3->segments->phonemizer->-r requirements.txt (line 5)) (0.9.0)\n",
371
+ "Collecting colorlog (from clldutils>=1.7.3->segments->phonemizer->-r requirements.txt (line 5))\n",
372
+ " Downloading colorlog-6.7.0-py2.py3-none-any.whl (11 kB)\n",
373
+ "Collecting pylatexenc (from clldutils>=1.7.3->segments->phonemizer->-r requirements.txt (line 5))\n",
374
+ " Downloading pylatexenc-2.10.tar.gz (162 kB)\n",
375
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m162.6/162.6 kB\u001b[0m \u001b[31m18.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
376
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
377
+ "Requirement already satisfied: lxml in /usr/local/lib/python3.10/dist-packages (from clldutils>=1.7.3->segments->phonemizer->-r requirements.txt (line 5)) (4.9.3)\n",
378
+ "Requirement already satisfied: babel in /usr/local/lib/python3.10/dist-packages (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 5)) (2.13.1)\n",
379
+ "Collecting colorama (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 5))\n",
380
+ " Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)\n",
381
+ "Collecting isodate (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 5))\n",
382
+ " Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)\n",
383
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.7/41.7 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
384
+ "\u001b[?25hCollecting language-tags (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 5))\n",
385
+ " Downloading language_tags-1.2.0-py3-none-any.whl (213 kB)\n",
386
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m213.4/213.4 kB\u001b[0m \u001b[31m24.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
387
+ "\u001b[?25hCollecting rdflib (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 5))\n",
388
+ " Downloading rdflib-7.0.0-py3-none-any.whl (531 kB)\n",
389
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m531.9/531.9 kB\u001b[0m \u001b[31m49.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
390
+ "\u001b[?25hCollecting rfc3986<2 (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 5))\n",
391
+ " Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\n",
392
+ "Requirement already satisfied: uritemplate>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from csvw>=1.5.6->segments->phonemizer->-r requirements.txt (line 5)) (4.1.1)\n",
393
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio->-r requirements.txt (line 17)) (2023.11.1)\n",
394
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio->-r requirements.txt (line 17)) (0.31.0)\n",
395
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio->-r requirements.txt (line 17)) (0.13.0)\n",
396
+ "Requirement already satisfied: uc-micro-py in /usr/local/lib/python3.10/dist-packages (from linkify-it-py<3,>=1->markdown-it-py[linkify]>=2.0.0->gradio->-r requirements.txt (line 17)) (1.0.2)\n",
397
+ "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard->-r requirements.txt (line 7)) (0.5.0)\n",
398
+ "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard->-r requirements.txt (line 7)) (3.2.2)\n",
399
+ "Building wheels for collected packages: amfm_decompy, unidic-lite, openai-whisper, docopt, ffmpy, pylatexenc\n",
400
+ " Building wheel for amfm_decompy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
401
+ " Created wheel for amfm_decompy: filename=AMFM_decompy-1.0.11-py3-none-any.whl size=42834 sha256=5ba59f35ea526c6d1db9b87ef0ba63a9462299ab166dd7e072fe74df86d42ecf\n",
402
+ " Stored in directory: /root/.cache/pip/wheels/07/81/e7/443ad333f2f4ed8c06fc027caeb0d0c84b896fe7e56c2e92b1\n",
403
+ " Building wheel for unidic-lite (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
404
+ " Created wheel for unidic-lite: filename=unidic_lite-1.0.8-py3-none-any.whl size=47658818 sha256=5c88f3f5cabcfc6042c727ada44d4c45f5196d6c019f2b16bb76ca36349b2b4e\n",
405
+ " Stored in directory: /root/.cache/pip/wheels/89/e8/68/f9ac36b8cc6c8b3c96888cd57434abed96595d444f42243853\n",
406
+ " Building wheel for openai-whisper (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
407
+ " Created wheel for openai-whisper: filename=openai_whisper-20231117-py3-none-any.whl size=801356 sha256=1221a3803ea40199cc77a53720a97ccbf9b345cc19fe9873d873bc58d310ee21\n",
408
+ " Stored in directory: /root/.cache/pip/wheels/d0/85/e1/9361b4cbea7dd4b7f6702fa4c3afc94877952eeb2b62f45f56\n",
409
+ " Building wheel for docopt (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
410
+ " Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13706 sha256=b13490bbd9c21a60e9f5adec2a4e760c6f9d87322137f410179d9b0ff9809b6c\n",
411
+ " Stored in directory: /root/.cache/pip/wheels/fc/ab/d4/5da2067ac95b36618c629a5f93f809425700506f72c9732fac\n",
412
+ " Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
413
+ " Created wheel for ffmpy: filename=ffmpy-0.3.1-py3-none-any.whl size=5579 sha256=5c1a620df2c7422574cff1c21ba93193c4c74453b17fd515eb289f96c4ad3584\n",
414
+ " Stored in directory: /root/.cache/pip/wheels/01/a6/d1/1c0828c304a4283b2c1639a09ad86f83d7c487ef34c6b4a1bf\n",
415
+ " Building wheel for pylatexenc (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
416
+ " Created wheel for pylatexenc: filename=pylatexenc-2.10-py3-none-any.whl size=136818 sha256=e454cb0c5800feef806903465ef07d8658fd60a4cf35d7087aa59ff929afce87\n",
417
+ " Stored in directory: /root/.cache/pip/wheels/d3/31/8b/e09b0386afd80cfc556c00408c9aeea5c35c4d484a9c762fd5\n",
418
+ "Successfully built amfm_decompy unidic-lite openai-whisper docopt ffmpy pylatexenc\n",
419
+ "Installing collected packages: unidic-lite, tokenizers, sentencepiece, rfc3986, pylatexenc, pydub, mecab-python3, language-tags, ffmpy, docopt, dlinfo, cpm_kernels, websockets, Unidecode, typing-extensions, semantic-version, python-multipart, pypinyin, proces, orjson, num2words, markdown-it-py, loguru, latex2mathml, isodate, importlib-resources, h11, fugashi, Cython, colorlog, colorama, av, aiofiles, uvicorn, tiktoken, starlette, resampy, rdflib, mdtex2html, mdit-py-plugins, httpcore, cn2an, cmudict, clldutils, amfm_decompy, transformers, openai-whisper, librosa, httpx, fastapi, accelerate, sse-starlette, gradio-client, csvw, segments, gradio, phonemizer\n",
420
+ " Attempting uninstall: tokenizers\n",
421
+ " Found existing installation: tokenizers 0.15.0\n",
422
+ " Uninstalling tokenizers-0.15.0:\n",
423
+ " Successfully uninstalled tokenizers-0.15.0\n",
424
+ " Attempting uninstall: typing-extensions\n",
425
+ " Found existing installation: typing_extensions 4.5.0\n",
426
+ " Uninstalling typing_extensions-4.5.0:\n",
427
+ " Successfully uninstalled typing_extensions-4.5.0\n",
428
+ " Attempting uninstall: markdown-it-py\n",
429
+ " Found existing installation: markdown-it-py 3.0.0\n",
430
+ " Uninstalling markdown-it-py-3.0.0:\n",
431
+ " Successfully uninstalled markdown-it-py-3.0.0\n",
432
+ " Attempting uninstall: importlib-resources\n",
433
+ " Found existing installation: importlib-resources 6.1.1\n",
434
+ " Uninstalling importlib-resources-6.1.1:\n",
435
+ " Successfully uninstalled importlib-resources-6.1.1\n",
436
+ " Attempting uninstall: Cython\n",
437
+ " Found existing installation: Cython 3.0.5\n",
438
+ " Uninstalling Cython-3.0.5:\n",
439
+ " Successfully uninstalled Cython-3.0.5\n",
440
+ " Attempting uninstall: mdit-py-plugins\n",
441
+ " Found existing installation: mdit-py-plugins 0.4.0\n",
442
+ " Uninstalling mdit-py-plugins-0.4.0:\n",
443
+ " Successfully uninstalled mdit-py-plugins-0.4.0\n",
444
+ " Attempting uninstall: transformers\n",
445
+ " Found existing installation: transformers 4.35.2\n",
446
+ " Uninstalling transformers-4.35.2:\n",
447
+ " Successfully uninstalled transformers-4.35.2\n",
448
+ " Attempting uninstall: librosa\n",
449
+ " Found existing installation: librosa 0.10.1\n",
450
+ " Uninstalling librosa-0.10.1:\n",
451
+ " Successfully uninstalled librosa-0.10.1\n",
452
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
453
+ "lida 0.0.10 requires kaleido, which is not installed.\n",
454
+ "llmx 0.0.15a0 requires cohere, which is not installed.\n",
455
+ "llmx 0.0.15a0 requires openai, which is not installed.\n",
456
+ "tensorflow-probability 0.22.0 requires typing-extensions<4.6.0, but you have typing-extensions 4.8.0 which is incompatible.\u001b[0m\u001b[31m\n",
457
+ "\u001b[0mSuccessfully installed Cython-0.29.21 Unidecode-1.3.7 accelerate-0.24.1 aiofiles-23.2.1 amfm_decompy-1.0.11 av-11.0.0 clldutils-3.20.0 cmudict-1.0.15 cn2an-0.5.22 colorama-0.4.6 colorlog-6.7.0 cpm_kernels-1.0.11 csvw-3.2.1 dlinfo-1.2.1 docopt-0.6.2 fastapi-0.104.1 ffmpy-0.3.1 fugashi-1.3.0 gradio-3.30.0 gradio-client-0.7.0 h11-0.14.0 httpcore-1.0.2 httpx-0.25.2 importlib-resources-5.13.0 isodate-0.6.1 language-tags-1.2.0 latex2mathml-3.76.0 librosa-0.9.1 loguru-0.7.2 markdown-it-py-2.2.0 mdit-py-plugins-0.3.3 mdtex2html-1.2.0 mecab-python3-1.0.8 num2words-0.5.13 openai-whisper-20231117 orjson-3.9.10 phonemizer-3.2.1 proces-0.1.7 pydub-0.25.1 pylatexenc-2.10 pypinyin-0.49.0 python-multipart-0.0.6 rdflib-7.0.0 resampy-0.4.2 rfc3986-1.5.0 segments-2.2.1 semantic-version-2.10.0 sentencepiece-0.1.99 sse-starlette-1.8.2 starlette-0.27.0 tiktoken-0.5.1 tokenizers-0.13.3 transformers-4.30.2 typing-extensions-4.8.0 unidic-lite-1.0.8 uvicorn-0.24.0.post1 websockets-11.0.3\n"
458
+ ]
459
+ }
460
+ ]
461
+ },
462
+ {
463
+ "cell_type": "code",
464
+ "source": [
465
+ "!python app.py"
466
+ ],
467
+ "metadata": {
468
+ "colab": {
469
+ "base_uri": "https://localhost:8080/"
470
+ },
471
+ "id": "jhd5xv-DImyq",
472
+ "outputId": "bdfc976e-c454-4a47-b60b-7eff2ee46512"
473
+ },
474
+ "execution_count": 4,
475
+ "outputs": [
476
+ {
477
+ "output_type": "stream",
478
+ "name": "stdout",
479
+ "text": [
480
+ "| numexpr.utils | INFO | NumExpr defaulting to 8 threads.\n",
481
+ "Loading checkpoint shards: 100% 7/7 [00:11<00:00, 1.66s/it]\n",
482
+ "Some weights of ChatGLMForConditionalGeneration were not initialized from the model checkpoint at chatglm2-6b and are newly initialized: ['transformer.prefix_encoder.embedding.weight']\n",
483
+ "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n",
484
+ "/usr/local/lib/python3.10/dist-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.\n",
485
+ " warnings.warn(\"torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.\")\n",
486
+ "256 2\n",
487
+ "256 2\n",
488
+ "256 2\n",
489
+ "256 2\n",
490
+ "256 2\n",
491
+ "load \n",
492
+ "| root | INFO | Loaded checkpoint './logs/OUTPUT_MODEL/G_13900.pth' (iteration 993)\n",
493
+ "Running on local URL: http://127.0.0.1:7860\n",
494
+ "Running on public URL: https://8c281e41f511237974.gradio.live\n",
495
+ "\n",
496
+ "This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces\n",
497
+ "2023-11-29 11:41:58.835716: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
498
+ "2023-11-29 11:41:58.835772: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
499
+ "2023-11-29 11:41:58.835820: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
500
+ "2023-11-29 11:42:00.087186: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n",
501
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
502
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
503
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
504
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
505
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
506
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
507
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
508
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
509
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
510
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
511
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
512
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
513
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
514
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
515
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
516
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
517
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
518
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
519
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
520
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
521
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
522
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
523
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
524
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
525
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
526
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
527
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
528
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
529
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
530
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
531
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
532
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
533
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
534
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
535
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
536
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
537
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
538
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
539
+ "Building prefix dict from the default dictionary ...\n",
540
+ "| jieba | DEBUG | Building prefix dict from the default dictionary ...\n",
541
+ "Dumping model to file cache /tmp/jieba.cache\n",
542
+ "| jieba | DEBUG | Dumping model to file cache /tmp/jieba.cache\n",
543
+ "Loading model cost 0.755 seconds.\n",
544
+ "| jieba | DEBUG | Loading model cost 0.755 seconds.\n",
545
+ "Prefix dict has been built successfully.\n",
546
+ "| jieba | DEBUG | Prefix dict has been built successfully.\n",
547
+ "Some weights of the model checkpoint at ./bert/chinese-roberta-wwm-ext-large were not used when initializing BertForMaskedLM: ['cls.seq_relationship.bias', 'cls.seq_relationship.weight']\n",
548
+ "- This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
549
+ "- This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
550
+ "/usr/local/lib/python3.10/dist-packages/gradio/processing_utils.py:178: UserWarning: Trying to convert audio automatically from float32 to 16-bit int format.\n",
551
+ " warnings.warn(warning.format(data.dtype))\n",
552
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
553
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
554
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
555
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
556
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
557
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
558
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
559
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
560
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
561
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
562
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
563
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
564
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
565
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
566
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
567
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
568
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
569
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
570
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
571
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
572
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
573
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
574
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
575
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
576
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
577
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
578
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
579
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
580
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
581
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
582
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
583
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
584
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
585
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
586
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
587
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
588
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
589
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
590
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
591
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
592
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
593
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
594
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
595
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
596
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
597
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
598
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
599
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
600
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
601
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
602
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
603
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
604
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
605
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
606
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
607
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
608
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
609
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
610
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
611
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
612
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
613
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
614
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
615
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
616
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
617
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
618
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
619
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
620
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
621
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
622
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
623
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
624
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
625
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
626
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
627
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
628
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
629
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
630
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
631
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
632
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
633
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
634
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
635
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
636
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
637
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
638
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
639
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
640
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
641
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
642
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
643
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
644
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
645
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
646
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
647
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
648
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
649
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
650
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
651
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
652
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
653
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
654
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
655
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
656
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
657
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
658
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
659
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
660
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
661
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
662
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
663
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
664
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
665
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
666
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
667
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
668
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
669
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
670
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
671
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
672
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
673
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
674
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
675
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
676
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
677
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
678
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
679
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
680
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
681
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
682
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
683
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
684
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
685
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
686
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
687
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
688
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
689
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
690
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
691
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
692
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
693
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
694
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
695
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
696
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
697
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
698
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
699
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
700
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
701
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
702
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
703
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
704
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
705
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
706
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
707
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
708
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
709
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
710
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
711
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
712
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
713
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
714
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
715
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
716
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
717
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
718
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
719
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
720
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
721
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
722
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
723
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
724
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
725
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
726
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
727
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
728
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
729
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
730
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
731
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
732
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
733
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
734
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
735
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
736
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
737
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
738
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
739
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
740
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
741
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
742
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
743
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
744
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
745
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
746
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
747
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
748
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
749
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
750
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
751
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
752
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
753
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
754
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
755
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
756
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
757
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
758
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
759
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
760
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
761
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
762
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
763
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
764
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
765
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
766
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
767
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
768
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
769
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
770
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
771
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
772
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
773
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
774
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
775
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
776
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
777
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
778
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
779
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
780
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
781
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
782
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
783
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
784
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
785
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
786
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
787
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
788
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
789
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
790
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
791
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
792
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
793
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
794
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
795
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
796
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
797
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
798
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
799
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
800
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
801
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
802
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
803
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
804
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/api/predict \"HTTP/1.1 200 OK\"\n",
805
+ "| httpx | INFO | HTTP Request: POST http://127.0.0.1:7860/reset \"HTTP/1.1 200 OK\"\n",
806
+ "Keyboard interruption in main thread... closing server.\n",
807
+ "Traceback (most recent call last):\n",
808
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/blocks.py\", line 2021, in block_thread\n",
809
+ " time.sleep(0.1)\n",
810
+ "KeyboardInterrupt\n",
811
+ "\n",
812
+ "During handling of the above exception, another exception occurred:\n",
813
+ "\n",
814
+ "Traceback (most recent call last):\n",
815
+ " File \"/content/ChatGLM2-VITS2-Colab/app.py\", line 259, in <module>\n",
816
+ " app.launch(share=True, show_error=True, enable_queue=True)\n",
817
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/blocks.py\", line 1938, in launch\n",
818
+ " self.block_thread()\n",
819
+ " File \"/usr/local/lib/python3.10/dist-packages/gradio/blocks.py\", line 2023, in block_thread\n",
820
+ " print(\"Keyboard interruption in main thread... closing server.\")\n",
821
+ "KeyboardInterrupt\n",
822
+ "Killing tunnel 127.0.0.1:7860 <> https://8c281e41f511237974.gradio.live\n",
823
+ "\u001b[0m"
824
+ ]
825
+ }
826
+ ]
827
+ },
828
+ {
829
+ "cell_type": "code",
830
+ "source": [],
831
+ "metadata": {
832
+ "id": "ghtLewgD6g2g"
833
+ },
834
+ "execution_count": null,
835
+ "outputs": []
836
+ }
837
+ ]
838
+ }
notebooks/GPT_SoVITS.ipynb ADDED
@@ -0,0 +1,1063 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "machine_shape": "hm",
8
+ "gpuType": "T4",
9
+ "authorship_tag": "ABX9TyNXMZaiDHal3bpxvLAQ/wgy",
10
+ "include_colab_link": true
11
+ },
12
+ "kernelspec": {
13
+ "name": "python3",
14
+ "display_name": "Python 3"
15
+ },
16
+ "language_info": {
17
+ "name": "python"
18
+ },
19
+ "accelerator": "GPU"
20
+ },
21
+ "cells": [
22
+ {
23
+ "cell_type": "markdown",
24
+ "metadata": {
25
+ "id": "view-in-github",
26
+ "colab_type": "text"
27
+ },
28
+ "source": [
29
+ "<a href=\"https://colab.research.google.com/github/KevinWang676/Bark-Voice-Cloning/blob/main/notebooks/GPT_SoVITS.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type": "code",
34
+ "execution_count": 1,
35
+ "metadata": {
36
+ "colab": {
37
+ "base_uri": "https://localhost:8080/"
38
+ },
39
+ "id": "jDRrxn4XxWQa",
40
+ "outputId": "f422cd80-9a1a-4b79-9160-483088acc50a"
41
+ },
42
+ "outputs": [
43
+ {
44
+ "output_type": "stream",
45
+ "name": "stdout",
46
+ "text": [
47
+ "Cloning into 'gpt-sovits'...\n",
48
+ "remote: Enumerating objects: 510, done.\u001b[K\n",
49
+ "remote: Counting objects: 100% (141/141), done.\u001b[K\n",
50
+ "remote: Compressing objects: 100% (66/66), done.\u001b[K\n",
51
+ "remote: Total 510 (delta 109), reused 75 (delta 75), pack-reused 369\u001b[K\n",
52
+ "Receiving objects: 100% (510/510), 2.37 MiB | 22.43 MiB/s, done.\n",
53
+ "Resolving deltas: 100% (245/245), done.\n"
54
+ ]
55
+ }
56
+ ],
57
+ "source": [
58
+ "!git clone https://github.com/KevinWang676/gpt-sovits.git"
59
+ ]
60
+ },
61
+ {
62
+ "cell_type": "code",
63
+ "source": [
64
+ "!git clone https://huggingface.co/spaces/kevinwang676/GPT-SoVITS.git"
65
+ ],
66
+ "metadata": {
67
+ "colab": {
68
+ "base_uri": "https://localhost:8080/"
69
+ },
70
+ "id": "z0Ed14eBxZdu",
71
+ "outputId": "0b96b15e-433f-4c52-bb2e-f43ecae3417d"
72
+ },
73
+ "execution_count": 2,
74
+ "outputs": [
75
+ {
76
+ "output_type": "stream",
77
+ "name": "stdout",
78
+ "text": [
79
+ "Cloning into 'GPT-SoVITS'...\n",
80
+ "remote: Enumerating objects: 430, done.\u001b[K\n",
81
+ "remote: Counting objects: 100% (426/426), done.\u001b[K\n",
82
+ "remote: Compressing objects: 100% (400/400), done.\u001b[K\n",
83
+ "remote: Total 430 (delta 31), reused 0 (delta 0), pack-reused 4\u001b[K\n",
84
+ "Receiving objects: 100% (430/430), 8.57 MiB | 6.55 MiB/s, done.\n",
85
+ "Resolving deltas: 100% (31/31), done.\n",
86
+ "Filtering content: 100% (19/19), 2.46 GiB | 48.55 MiB/s, done.\n"
87
+ ]
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "cell_type": "code",
93
+ "source": [
94
+ "pip install torch numpy scipy tensorboard librosa==0.9.2 numba==0.56.4 pytorch-lightning gradio==3.38.0 ffmpeg-python onnxruntime tqdm cn2an pypinyin pyopenjtalk g2p_en chardet"
95
+ ],
96
+ "metadata": {
97
+ "colab": {
98
+ "base_uri": "https://localhost:8080/"
99
+ },
100
+ "id": "5nyYAqXoxc6D",
101
+ "outputId": "54ab1ee3-d36d-4a82-abe9-8720497c22ab"
102
+ },
103
+ "execution_count": 3,
104
+ "outputs": [
105
+ {
106
+ "output_type": "stream",
107
+ "name": "stdout",
108
+ "text": [
109
+ "Requirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (2.1.0+cu121)\n",
110
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (1.23.5)\n",
111
+ "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (1.11.4)\n",
112
+ "Requirement already satisfied: tensorboard in /usr/local/lib/python3.10/dist-packages (2.15.1)\n",
113
+ "Collecting librosa==0.9.2\n",
114
+ " Downloading librosa-0.9.2-py3-none-any.whl (214 kB)\n",
115
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m214.3/214.3 kB\u001b[0m \u001b[31m3.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
116
+ "\u001b[?25hCollecting numba==0.56.4\n",
117
+ " Downloading numba-0.56.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.5 MB)\n",
118
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.5/3.5 MB\u001b[0m \u001b[31m97.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
119
+ "\u001b[?25hCollecting pytorch-lightning\n",
120
+ " Downloading pytorch_lightning-2.1.3-py3-none-any.whl (777 kB)\n",
121
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m777.7/777.7 kB\u001b[0m \u001b[31m61.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
122
+ "\u001b[?25hCollecting gradio==3.14.0\n",
123
+ " Downloading gradio-3.14.0-py3-none-any.whl (13.8 MB)\n",
124
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.8/13.8 MB\u001b[0m \u001b[31m67.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
125
+ "\u001b[?25hCollecting ffmpeg-python\n",
126
+ " Downloading ffmpeg_python-0.2.0-py3-none-any.whl (25 kB)\n",
127
+ "Collecting onnxruntime\n",
128
+ " Downloading onnxruntime-1.16.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB)\n",
129
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.4/6.4 MB\u001b[0m \u001b[31m94.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
130
+ "\u001b[?25hRequirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (4.66.1)\n",
131
+ "Collecting cn2an\n",
132
+ " Downloading cn2an-0.5.22-py3-none-any.whl (224 kB)\n",
133
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m225.0/225.0 kB\u001b[0m \u001b[31m29.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
134
+ "\u001b[?25hCollecting pypinyin\n",
135
+ " Downloading pypinyin-0.50.0-py2.py3-none-any.whl (1.4 MB)\n",
136
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.4/1.4 MB\u001b[0m \u001b[31m73.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
137
+ "\u001b[?25hCollecting pyopenjtalk\n",
138
+ " Downloading pyopenjtalk-0.3.3.tar.gz (1.6 MB)\n",
139
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m44.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
140
+ "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
141
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
142
+ " Installing backend dependencies ... \u001b[?25l\u001b[?25hdone\n",
143
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
144
+ "Collecting g2p_en\n",
145
+ " Downloading g2p_en-2.1.0-py3-none-any.whl (3.1 MB)\n",
146
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/3.1 MB\u001b[0m \u001b[31m84.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
147
+ "\u001b[?25hRequirement already satisfied: chardet in /usr/local/lib/python3.10/dist-packages (5.2.0)\n",
148
+ "Requirement already satisfied: audioread>=2.1.9 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.2) (3.0.1)\n",
149
+ "Requirement already satisfied: scikit-learn>=0.19.1 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.2) (1.2.2)\n",
150
+ "Requirement already satisfied: joblib>=0.14 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.2) (1.3.2)\n",
151
+ "Requirement already satisfied: decorator>=4.0.10 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.2) (4.4.2)\n",
152
+ "Collecting resampy>=0.2.2 (from librosa==0.9.2)\n",
153
+ " Downloading resampy-0.4.2-py3-none-any.whl (3.1 MB)\n",
154
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/3.1 MB\u001b[0m \u001b[31m66.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
155
+ "\u001b[?25hRequirement already satisfied: soundfile>=0.10.2 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.2) (0.12.1)\n",
156
+ "Requirement already satisfied: pooch>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.2) (1.8.0)\n",
157
+ "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from librosa==0.9.2) (23.2)\n",
158
+ "Collecting llvmlite<0.40,>=0.39.0dev0 (from numba==0.56.4)\n",
159
+ " Downloading llvmlite-0.39.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.6 MB)\n",
160
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m34.6/34.6 MB\u001b[0m \u001b[31m47.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
161
+ "\u001b[?25hRequirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from numba==0.56.4) (67.7.2)\n",
162
+ "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (3.9.1)\n",
163
+ "Requirement already satisfied: altair in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (4.2.2)\n",
164
+ "Collecting fastapi (from gradio==3.14.0)\n",
165
+ " Downloading fastapi-0.109.0-py3-none-any.whl (92 kB)\n",
166
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.0/92.0 kB\u001b[0m \u001b[31m12.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
167
+ "\u001b[?25hCollecting ffmpy (from gradio==3.14.0)\n",
168
+ " Downloading ffmpy-0.3.1.tar.gz (5.5 kB)\n",
169
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
170
+ "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (2023.6.0)\n",
171
+ "Collecting httpx (from gradio==3.14.0)\n",
172
+ " Downloading httpx-0.26.0-py3-none-any.whl (75 kB)\n",
173
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.9/75.9 kB\u001b[0m \u001b[31m11.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
174
+ "\u001b[?25hRequirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (3.1.3)\n",
175
+ "Requirement already satisfied: markdown-it-py[linkify,plugins] in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (3.0.0)\n",
176
+ "Requirement already satisfied: markupsafe in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (2.1.3)\n",
177
+ "Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (3.7.1)\n",
178
+ "Collecting orjson (from gradio==3.14.0)\n",
179
+ " Downloading orjson-3.9.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (139 kB)\n",
180
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m139.8/139.8 kB\u001b[0m \u001b[31m18.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
181
+ "\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (1.5.3)\n",
182
+ "Requirement already satisfied: pillow in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (9.4.0)\n",
183
+ "Collecting pycryptodome (from gradio==3.14.0)\n",
184
+ " Downloading pycryptodome-3.20.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)\n",
185
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m88.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
186
+ "\u001b[?25hRequirement already satisfied: pydantic in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (1.10.13)\n",
187
+ "Collecting pydub (from gradio==3.14.0)\n",
188
+ " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
189
+ "Collecting python-multipart (from gradio==3.14.0)\n",
190
+ " Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)\n",
191
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
192
+ "\u001b[?25hRequirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (6.0.1)\n",
193
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from gradio==3.14.0) (2.31.0)\n",
194
+ "Collecting uvicorn (from gradio==3.14.0)\n",
195
+ " Downloading uvicorn-0.26.0-py3-none-any.whl (60 kB)\n",
196
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.5/60.5 kB\u001b[0m \u001b[31m8.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
197
+ "\u001b[?25hCollecting websockets>=10.0 (from gradio==3.14.0)\n",
198
+ " Downloading websockets-12.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (130 kB)\n",
199
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.2/130.2 kB\u001b[0m \u001b[31m18.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
200
+ "\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch) (3.13.1)\n",
201
+ "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch) (4.5.0)\n",
202
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch) (1.12)\n",
203
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch) (3.2.1)\n",
204
+ "Requirement already satisfied: triton==2.1.0 in /usr/local/lib/python3.10/dist-packages (from torch) (2.1.0)\n",
205
+ "Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.10/dist-packages (from tensorboard) (1.4.0)\n",
206
+ "Requirement already satisfied: grpcio>=1.48.2 in /usr/local/lib/python3.10/dist-packages (from tensorboard) (1.60.0)\n",
207
+ "Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.10/dist-packages (from tensorboard) (2.17.3)\n",
208
+ "Requirement already satisfied: google-auth-oauthlib<2,>=0.5 in /usr/local/lib/python3.10/dist-packages (from tensorboard) (1.2.0)\n",
209
+ "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.10/dist-packages (from tensorboard) (3.5.2)\n",
210
+ "Requirement already satisfied: protobuf<4.24,>=3.19.6 in /usr/local/lib/python3.10/dist-packages (from tensorboard) (3.20.3)\n",
211
+ "Requirement already satisfied: six>1.9 in /usr/local/lib/python3.10/dist-packages (from tensorboard) (1.16.0)\n",
212
+ "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard) (0.7.2)\n",
213
+ "Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from tensorboard) (3.0.1)\n",
214
+ "Collecting torchmetrics>=0.7.0 (from pytorch-lightning)\n",
215
+ " Downloading torchmetrics-1.3.0.post0-py3-none-any.whl (840 kB)\n",
216
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m840.2/840.2 kB\u001b[0m \u001b[31m68.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
217
+ "\u001b[?25hCollecting lightning-utilities>=0.8.0 (from pytorch-lightning)\n",
218
+ " Downloading lightning_utilities-0.10.1-py3-none-any.whl (24 kB)\n",
219
+ "Requirement already satisfied: future in /usr/local/lib/python3.10/dist-packages (from ffmpeg-python) (0.18.3)\n",
220
+ "Collecting coloredlogs (from onnxruntime)\n",
221
+ " Downloading coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)\n",
222
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.0/46.0 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
223
+ "\u001b[?25hRequirement already satisfied: flatbuffers in /usr/local/lib/python3.10/dist-packages (from onnxruntime) (23.5.26)\n",
224
+ "Collecting proces>=0.1.3 (from cn2an)\n",
225
+ " Downloading proces-0.1.7-py3-none-any.whl (137 kB)\n",
226
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.7/137.7 kB\u001b[0m \u001b[31m19.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
227
+ "\u001b[?25hRequirement already satisfied: nltk>=3.2.4 in /usr/local/lib/python3.10/dist-packages (from g2p_en) (3.8.1)\n",
228
+ "Requirement already satisfied: inflect>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from g2p_en) (7.0.0)\n",
229
+ "Collecting distance>=0.1.3 (from g2p_en)\n",
230
+ " Downloading Distance-0.1.3.tar.gz (180 kB)\n",
231
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m180.3/180.3 kB\u001b[0m \u001b[31m23.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
232
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
233
+ "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.14.0) (23.2.0)\n",
234
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.14.0) (6.0.4)\n",
235
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.14.0) (1.9.4)\n",
236
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.14.0) (1.4.1)\n",
237
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.14.0) (1.3.1)\n",
238
+ "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.14.0) (4.0.3)\n",
239
+ "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard) (5.3.2)\n",
240
+ "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard) (0.3.0)\n",
241
+ "Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard) (4.9)\n",
242
+ "Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from google-auth-oauthlib<2,>=0.5->tensorboard) (1.3.1)\n",
243
+ "Requirement already satisfied: click in /usr/local/lib/python3.10/dist-packages (from nltk>=3.2.4->g2p_en) (8.1.7)\n",
244
+ "Requirement already satisfied: regex>=2021.8.3 in /usr/local/lib/python3.10/dist-packages (from nltk>=3.2.4->g2p_en) (2023.6.3)\n",
245
+ "Requirement already satisfied: platformdirs>=2.5.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.0->librosa==0.9.2) (4.1.0)\n",
246
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->gradio==3.14.0) (3.3.2)\n",
247
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->gradio==3.14.0) (3.6)\n",
248
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->gradio==3.14.0) (2.0.7)\n",
249
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->gradio==3.14.0) (2023.11.17)\n",
250
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.19.1->librosa==0.9.2) (3.2.0)\n",
251
+ "Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile>=0.10.2->librosa==0.9.2) (1.16.0)\n",
252
+ "Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair->gradio==3.14.0) (0.4)\n",
253
+ "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair->gradio==3.14.0) (4.19.2)\n",
254
+ "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair->gradio==3.14.0) (0.12.0)\n",
255
+ "Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->gradio==3.14.0) (2.8.2)\n",
256
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->gradio==3.14.0) (2023.3.post1)\n",
257
+ "Collecting humanfriendly>=9.1 (from coloredlogs->onnxruntime)\n",
258
+ " Downloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)\n",
259
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.8/86.8 kB\u001b[0m \u001b[31m12.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
260
+ "\u001b[?25hCollecting starlette<0.36.0,>=0.35.0 (from fastapi->gradio==3.14.0)\n",
261
+ " Downloading starlette-0.35.1-py3-none-any.whl (71 kB)\n",
262
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.1/71.1 kB\u001b[0m \u001b[31m10.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
263
+ "\u001b[?25hCollecting typing-extensions (from torch)\n",
264
+ " Downloading typing_extensions-4.9.0-py3-none-any.whl (32 kB)\n",
265
+ "Requirement already satisfied: anyio in /usr/local/lib/python3.10/dist-packages (from httpx->gradio==3.14.0) (3.7.1)\n",
266
+ "Collecting httpcore==1.* (from httpx->gradio==3.14.0)\n",
267
+ " Downloading httpcore-1.0.2-py3-none-any.whl (76 kB)\n",
268
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.9/76.9 kB\u001b[0m \u001b[31m10.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
269
+ "\u001b[?25hRequirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->gradio==3.14.0) (1.3.0)\n",
270
+ "Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx->gradio==3.14.0)\n",
271
+ " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
272
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m9.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
273
+ "\u001b[?25hRequirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify,plugins]->gradio==3.14.0) (0.1.2)\n",
274
+ "Requirement already satisfied: linkify-it-py<3,>=1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify,plugins]->gradio==3.14.0) (2.0.2)\n",
275
+ "Requirement already satisfied: mdit-py-plugins in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify,plugins]->gradio==3.14.0) (0.4.0)\n",
276
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.14.0) (1.2.0)\n",
277
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.14.0) (0.12.1)\n",
278
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.14.0) (4.47.2)\n",
279
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.14.0) (1.4.5)\n",
280
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.14.0) (3.1.1)\n",
281
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch) (1.3.0)\n",
282
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile>=0.10.2->librosa==0.9.2) (2.21)\n",
283
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair->gradio==3.14.0) (2023.12.1)\n",
284
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair->gradio==3.14.0) (0.32.1)\n",
285
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair->gradio==3.14.0) (0.16.2)\n",
286
+ "Requirement already satisfied: uc-micro-py in /usr/local/lib/python3.10/dist-packages (from linkify-it-py<3,>=1->markdown-it-py[linkify,plugins]->gradio==3.14.0) (1.0.2)\n",
287
+ "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard) (0.5.1)\n",
288
+ "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<2,>=0.5->tensorboard) (3.2.2)\n",
289
+ "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio->httpx->gradio==3.14.0) (1.2.0)\n",
290
+ "Building wheels for collected packages: pyopenjtalk, distance, ffmpy\n",
291
+ " Building wheel for pyopenjtalk (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
292
+ " Created wheel for pyopenjtalk: filename=pyopenjtalk-0.3.3-cp310-cp310-linux_x86_64.whl size=5354507 sha256=eed575a091a96073541d6c1a7a244f1723ed08e257ccb5d73d63123787e88ea7\n",
293
+ " Stored in directory: /root/.cache/pip/wheels/64/a9/5f/19eedcf7741bcd1494dc8782b6842e433314793492cc9167c9\n",
294
+ " Building wheel for distance (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
295
+ " Created wheel for distance: filename=Distance-0.1.3-py3-none-any.whl size=16258 sha256=0ec8b5b8d00b6725d8cc76331e68fe17979ebf9030da6d9bc53a99a35f2182ac\n",
296
+ " Stored in directory: /root/.cache/pip/wheels/e8/bb/de/f71bf63559ea9a921059a5405806f7ff6ed612a9231c4a9309\n",
297
+ " Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
298
+ " Created wheel for ffmpy: filename=ffmpy-0.3.1-py3-none-any.whl size=5579 sha256=84290f9e44ad2081ad1f05480870d6f70dcfd693b40c32e4acf0f00890dacde1\n",
299
+ " Stored in directory: /root/.cache/pip/wheels/01/a6/d1/1c0828c304a4283b2c1639a09ad86f83d7c487ef34c6b4a1bf\n",
300
+ "Successfully built pyopenjtalk distance ffmpy\n",
301
+ "Installing collected packages: pydub, ffmpy, distance, websockets, typing-extensions, python-multipart, pypinyin, pyopenjtalk, pycryptodome, proces, orjson, llvmlite, humanfriendly, h11, ffmpeg-python, uvicorn, starlette, numba, lightning-utilities, httpcore, coloredlogs, cn2an, torchmetrics, resampy, onnxruntime, httpx, fastapi, pytorch-lightning, librosa, g2p_en, gradio\n",
302
+ " Attempting uninstall: typing-extensions\n",
303
+ " Found existing installation: typing_extensions 4.5.0\n",
304
+ " Uninstalling typing_extensions-4.5.0:\n",
305
+ " Successfully uninstalled typing_extensions-4.5.0\n",
306
+ " Attempting uninstall: llvmlite\n",
307
+ " Found existing installation: llvmlite 0.41.1\n",
308
+ " Uninstalling llvmlite-0.41.1:\n",
309
+ " Successfully uninstalled llvmlite-0.41.1\n",
310
+ " Attempting uninstall: numba\n",
311
+ " Found existing installation: numba 0.58.1\n",
312
+ " Uninstalling numba-0.58.1:\n",
313
+ " Successfully uninstalled numba-0.58.1\n",
314
+ " Attempting uninstall: librosa\n",
315
+ " Found existing installation: librosa 0.10.1\n",
316
+ " Uninstalling librosa-0.10.1:\n",
317
+ " Successfully uninstalled librosa-0.10.1\n",
318
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
319
+ "lida 0.0.10 requires kaleido, which is not installed.\n",
320
+ "tensorflow-probability 0.22.0 requires typing-extensions<4.6.0, but you have typing-extensions 4.9.0 which is incompatible.\u001b[0m\u001b[31m\n",
321
+ "\u001b[0mSuccessfully installed cn2an-0.5.22 coloredlogs-15.0.1 distance-0.1.3 fastapi-0.109.0 ffmpeg-python-0.2.0 ffmpy-0.3.1 g2p_en-2.1.0 gradio-3.14.0 h11-0.14.0 httpcore-1.0.2 httpx-0.26.0 humanfriendly-10.0 librosa-0.9.2 lightning-utilities-0.10.1 llvmlite-0.39.1 numba-0.56.4 onnxruntime-1.16.3 orjson-3.9.12 proces-0.1.7 pycryptodome-3.20.0 pydub-0.25.1 pyopenjtalk-0.3.3 pypinyin-0.50.0 python-multipart-0.0.6 pytorch-lightning-2.1.3 resampy-0.4.2 starlette-0.35.1 torchmetrics-1.3.0.post0 typing-extensions-4.9.0 uvicorn-0.26.0 websockets-12.0\n"
322
+ ]
323
+ }
324
+ ]
325
+ },
326
+ {
327
+ "cell_type": "code",
328
+ "source": [
329
+ "pip install modelscope==1.11.0 torchaudio sentencepiece funasr==0.8.8"
330
+ ],
331
+ "metadata": {
332
+ "colab": {
333
+ "base_uri": "https://localhost:8080/"
334
+ },
335
+ "id": "aq-sep6Sxsf1",
336
+ "outputId": "2da94287-d144-4333-f405-72b6e92e6b4a"
337
+ },
338
+ "execution_count": 4,
339
+ "outputs": [
340
+ {
341
+ "output_type": "stream",
342
+ "name": "stdout",
343
+ "text": [
344
+ "Collecting modelscope\n",
345
+ " Downloading modelscope-1.11.0-py3-none-any.whl (5.5 MB)\n",
346
+ "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/5.5 MB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m╸\u001b[0m\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.1/5.5 MB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:02\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m \u001b[32m5.5/5.5 MB\u001b[0m \u001b[31m82.5 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.5/5.5 MB\u001b[0m \u001b[31m59.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
347
+ "\u001b[?25hRequirement already satisfied: torchaudio in /usr/local/lib/python3.10/dist-packages (2.1.0+cu121)\n",
348
+ "Collecting sentencepiece\n",
349
+ " Downloading sentencepiece-0.1.99-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
350
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m72.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
351
+ "\u001b[?25hCollecting funasr\n",
352
+ " Downloading funasr-0.8.8-py3-none-any.whl (750 kB)\n",
353
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m750.7/750.7 kB\u001b[0m \u001b[31m67.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
354
+ "\u001b[?25hCollecting addict (from modelscope)\n",
355
+ " Downloading addict-2.4.0-py3-none-any.whl (3.8 kB)\n",
356
+ "Requirement already satisfied: attrs in /usr/local/lib/python3.10/dist-packages (from modelscope) (23.2.0)\n",
357
+ "Collecting datasets>=2.14.5 (from modelscope)\n",
358
+ " Downloading datasets-2.16.1-py3-none-any.whl (507 kB)\n",
359
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m507.1/507.1 kB\u001b[0m \u001b[31m54.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
360
+ "\u001b[?25hCollecting einops (from modelscope)\n",
361
+ " Downloading einops-0.7.0-py3-none-any.whl (44 kB)\n",
362
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m44.6/44.6 kB\u001b[0m \u001b[31m7.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
363
+ "\u001b[?25hRequirement already satisfied: filelock>=3.3.0 in /usr/local/lib/python3.10/dist-packages (from modelscope) (3.13.1)\n",
364
+ "Requirement already satisfied: gast>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from modelscope) (0.5.4)\n",
365
+ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from modelscope) (1.23.5)\n",
366
+ "Collecting oss2 (from modelscope)\n",
367
+ " Downloading oss2-2.18.4.tar.gz (278 kB)\n",
368
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m278.1/278.1 kB\u001b[0m \u001b[31m36.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
369
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
370
+ "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from modelscope) (1.5.3)\n",
371
+ "Requirement already satisfied: Pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from modelscope) (9.4.0)\n",
372
+ "Requirement already satisfied: pyarrow!=9.0.0,>=6.0.0 in /usr/local/lib/python3.10/dist-packages (from modelscope) (10.0.1)\n",
373
+ "Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.10/dist-packages (from modelscope) (2.8.2)\n",
374
+ "Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from modelscope) (6.0.1)\n",
375
+ "Requirement already satisfied: requests>=2.25 in /usr/local/lib/python3.10/dist-packages (from modelscope) (2.31.0)\n",
376
+ "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from modelscope) (1.11.4)\n",
377
+ "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from modelscope) (67.7.2)\n",
378
+ "Collecting simplejson>=3.3.0 (from modelscope)\n",
379
+ " Downloading simplejson-3.19.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (137 kB)\n",
380
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.9/137.9 kB\u001b[0m \u001b[31m18.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
381
+ "\u001b[?25hRequirement already satisfied: sortedcontainers>=1.5.9 in /usr/local/lib/python3.10/dist-packages (from modelscope) (2.4.0)\n",
382
+ "Requirement already satisfied: tqdm>=4.64.0 in /usr/local/lib/python3.10/dist-packages (from modelscope) (4.66.1)\n",
383
+ "Requirement already satisfied: urllib3>=1.26 in /usr/local/lib/python3.10/dist-packages (from modelscope) (2.0.7)\n",
384
+ "Collecting yapf (from modelscope)\n",
385
+ " Downloading yapf-0.40.2-py3-none-any.whl (254 kB)\n",
386
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m254.7/254.7 kB\u001b[0m \u001b[31m29.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
387
+ "\u001b[?25hRequirement already satisfied: torch==2.1.0 in /usr/local/lib/python3.10/dist-packages (from torchaudio) (2.1.0+cu121)\n",
388
+ "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch==2.1.0->torchaudio) (4.9.0)\n",
389
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch==2.1.0->torchaudio) (1.12)\n",
390
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch==2.1.0->torchaudio) (3.2.1)\n",
391
+ "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch==2.1.0->torchaudio) (3.1.3)\n",
392
+ "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from torch==2.1.0->torchaudio) (2023.6.0)\n",
393
+ "Requirement already satisfied: triton==2.1.0 in /usr/local/lib/python3.10/dist-packages (from torch==2.1.0->torchaudio) (2.1.0)\n",
394
+ "Requirement already satisfied: humanfriendly in /usr/local/lib/python3.10/dist-packages (from funasr) (10.0)\n",
395
+ "Requirement already satisfied: librosa in /usr/local/lib/python3.10/dist-packages (from funasr) (0.9.2)\n",
396
+ "Collecting jamo (from funasr)\n",
397
+ " Downloading jamo-0.4.1-py3-none-any.whl (9.5 kB)\n",
398
+ "Collecting kaldiio>=2.17.0 (from funasr)\n",
399
+ " Downloading kaldiio-2.18.0-py3-none-any.whl (28 kB)\n",
400
+ "Collecting torch-complex (from funasr)\n",
401
+ " Downloading torch_complex-0.4.3-py3-none-any.whl (9.1 kB)\n",
402
+ "Requirement already satisfied: jieba in /usr/local/lib/python3.10/dist-packages (from funasr) (0.42.1)\n",
403
+ "Collecting pytorch-wpe (from funasr)\n",
404
+ " Downloading pytorch_wpe-0.0.1-py3-none-any.whl (8.1 kB)\n",
405
+ "Requirement already satisfied: editdistance>=0.5.2 in /usr/local/lib/python3.10/dist-packages (from funasr) (0.6.2)\n",
406
+ "Requirement already satisfied: tensorboard in /usr/local/lib/python3.10/dist-packages (from funasr) (2.15.1)\n",
407
+ "Collecting hdbscan (from funasr)\n",
408
+ " Downloading hdbscan-0.8.33.tar.gz (5.2 MB)\n",
409
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.2/5.2 MB\u001b[0m \u001b[31m107.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
410
+ "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
411
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
412
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
413
+ "Collecting umap (from funasr)\n",
414
+ " Downloading umap-0.1.1.tar.gz (3.2 kB)\n",
415
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
416
+ "Collecting jaconv (from funasr)\n",
417
+ " Downloading jaconv-0.3.4.tar.gz (16 kB)\n",
418
+ " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
419
+ "Requirement already satisfied: pyarrow-hotfix in /usr/local/lib/python3.10/dist-packages (from datasets>=2.14.5->modelscope) (0.6)\n",
420
+ "Collecting dill<0.3.8,>=0.3.0 (from datasets>=2.14.5->modelscope)\n",
421
+ " Downloading dill-0.3.7-py3-none-any.whl (115 kB)\n",
422
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m115.3/115.3 kB\u001b[0m \u001b[31m16.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
423
+ "\u001b[?25hRequirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets>=2.14.5->modelscope) (3.4.1)\n",
424
+ "Collecting multiprocess (from datasets>=2.14.5->modelscope)\n",
425
+ " Downloading multiprocess-0.70.15-py310-none-any.whl (134 kB)\n",
426
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m19.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
427
+ "\u001b[?25hRequirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets>=2.14.5->modelscope) (3.9.1)\n",
428
+ "Requirement already satisfied: huggingface-hub>=0.19.4 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.14.5->modelscope) (0.20.2)\n",
429
+ "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets>=2.14.5->modelscope) (23.2)\n",
430
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.1->modelscope) (1.16.0)\n",
431
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.25->modelscope) (3.3.2)\n",
432
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.25->modelscope) (3.6)\n",
433
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.25->modelscope) (2023.11.17)\n",
434
+ "Collecting cython<3,>=0.27 (from hdbscan->funasr)\n",
435
+ " Using cached Cython-0.29.37-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)\n",
436
+ "Requirement already satisfied: scikit-learn>=0.20 in /usr/local/lib/python3.10/dist-packages (from hdbscan->funasr) (1.2.2)\n",
437
+ "Requirement already satisfied: joblib>=1.0 in /usr/local/lib/python3.10/dist-packages (from hdbscan->funasr) (1.3.2)\n",
438
+ "Requirement already satisfied: audioread>=2.1.9 in /usr/local/lib/python3.10/dist-packages (from librosa->funasr) (3.0.1)\n",
439
+ "Requirement already satisfied: decorator>=4.0.10 in /usr/local/lib/python3.10/dist-packages (from librosa->funasr) (4.4.2)\n",
440
+ "Requirement already satisfied: resampy>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from librosa->funasr) (0.4.2)\n",
441
+ "Requirement already satisfied: numba>=0.45.1 in /usr/local/lib/python3.10/dist-packages (from librosa->funasr) (0.56.4)\n",
442
+ "Requirement already satisfied: soundfile>=0.10.2 in /usr/local/lib/python3.10/dist-packages (from librosa->funasr) (0.12.1)\n",
443
+ "Requirement already satisfied: pooch>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa->funasr) (1.8.0)\n",
444
+ "Collecting crcmod>=1.7 (from oss2->modelscope)\n",
445
+ " Downloading crcmod-1.7.tar.gz (89 kB)\n",
446
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m89.7/89.7 kB\u001b[0m \u001b[31m14.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
447
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
448
+ "Requirement already satisfied: pycryptodome>=3.4.7 in /usr/local/lib/python3.10/dist-packages (from oss2->modelscope) (3.20.0)\n",
449
+ "Collecting aliyun-python-sdk-kms>=2.4.1 (from oss2->modelscope)\n",
450
+ " Downloading aliyun_python_sdk_kms-2.16.2-py2.py3-none-any.whl (94 kB)\n",
451
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.0/94.0 kB\u001b[0m \u001b[31m14.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
452
+ "\u001b[?25hCollecting aliyun-python-sdk-core>=2.13.12 (from oss2->modelscope)\n",
453
+ " Downloading aliyun-python-sdk-core-2.14.0.tar.gz (443 kB)\n",
454
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m443.0/443.0 kB\u001b[0m \u001b[31m52.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
455
+ "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
456
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->modelscope) (2023.3.post1)\n",
457
+ "Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.10/dist-packages (from tensorboard->funasr) (1.4.0)\n",
458
+ "Requirement already satisfied: grpcio>=1.48.2 in /usr/local/lib/python3.10/dist-packages (from tensorboard->funasr) (1.60.0)\n",
459
+ "Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.10/dist-packages (from tensorboard->funasr) (2.17.3)\n",
460
+ "Requirement already satisfied: google-auth-oauthlib<2,>=0.5 in /usr/local/lib/python3.10/dist-packages (from tensorboard->funasr) (1.2.0)\n",
461
+ "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.10/dist-packages (from tensorboard->funasr) (3.5.2)\n",
462
+ "Requirement already satisfied: protobuf<4.24,>=3.19.6 in /usr/local/lib/python3.10/dist-packages (from tensorboard->funasr) (3.20.3)\n",
463
+ "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard->funasr) (0.7.2)\n",
464
+ "Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from tensorboard->funasr) (3.0.1)\n",
465
+ "Requirement already satisfied: importlib-metadata>=6.6.0 in /usr/local/lib/python3.10/dist-packages (from yapf->modelscope) (7.0.1)\n",
466
+ "Requirement already satisfied: platformdirs>=3.5.1 in /usr/local/lib/python3.10/dist-packages (from yapf->modelscope) (4.1.0)\n",
467
+ "Requirement already satisfied: tomli>=2.0.1 in /usr/local/lib/python3.10/dist-packages (from yapf->modelscope) (2.0.1)\n",
468
+ "Collecting jmespath<1.0.0,>=0.9.3 (from aliyun-python-sdk-core>=2.13.12->oss2->modelscope)\n",
469
+ " Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)\n",
470
+ "Requirement already satisfied: cryptography>=2.6.0 in /usr/local/lib/python3.10/dist-packages (from aliyun-python-sdk-core>=2.13.12->oss2->modelscope) (41.0.7)\n",
471
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.14.5->modelscope) (6.0.4)\n",
472
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.14.5->modelscope) (1.9.4)\n",
473
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.14.5->modelscope) (1.4.1)\n",
474
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.14.5->modelscope) (1.3.1)\n",
475
+ "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.14.5->modelscope) (4.0.3)\n",
476
+ "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->funasr) (5.3.2)\n",
477
+ "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->funasr) (0.3.0)\n",
478
+ "Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard->funasr) (4.9)\n",
479
+ "Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from google-auth-oauthlib<2,>=0.5->tensorboard->funasr) (1.3.1)\n",
480
+ "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata>=6.6.0->yapf->modelscope) (3.17.0)\n",
481
+ "Requirement already satisfied: llvmlite<0.40,>=0.39.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba>=0.45.1->librosa->funasr) (0.39.1)\n",
482
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.20->hdbscan->funasr) (3.2.0)\n",
483
+ "Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile>=0.10.2->librosa->funasr) (1.16.0)\n",
484
+ "Requirement already satisfied: MarkupSafe>=2.1.1 in /usr/local/lib/python3.10/dist-packages (from werkzeug>=1.0.1->tensorboard->funasr) (2.1.3)\n",
485
+ "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch==2.1.0->torchaudio) (1.3.0)\n",
486
+ "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile>=0.10.2->librosa->funasr) (2.21)\n",
487
+ "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard->funasr) (0.5.1)\n",
488
+ "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<2,>=0.5->tensorboard->funasr) (3.2.2)\n",
489
+ "Building wheels for collected packages: hdbscan, jaconv, oss2, umap, aliyun-python-sdk-core, crcmod\n",
490
+ " Building wheel for hdbscan (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
491
+ " Created wheel for hdbscan: filename=hdbscan-0.8.33-cp310-cp310-linux_x86_64.whl size=3039289 sha256=b46cda3080f6f84ba942bc4bc4d28ea227d923c3631a6baacc444dd51ac8ced2\n",
492
+ " Stored in directory: /root/.cache/pip/wheels/75/0b/3b/dc4f60b7cc455efaefb62883a7483e76f09d06ca81cf87d610\n",
493
+ " Building wheel for jaconv (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
494
+ " Created wheel for jaconv: filename=jaconv-0.3.4-py3-none-any.whl size=16415 sha256=d3d6a85b442885e694f2cff3d0754967f9828a32fc85b1d730aec0e2cba88247\n",
495
+ " Stored in directory: /root/.cache/pip/wheels/46/8f/2e/a730bf1fca05b33e532d5d91dabdf406c9b718ec85b01b1b54\n",
496
+ " Building wheel for oss2 (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
497
+ " Created wheel for oss2: filename=oss2-2.18.4-py3-none-any.whl size=115939 sha256=c5a7df8fe43b066606d7626813495a7073f9f39402120310a07c7c3e8af4ed5f\n",
498
+ " Stored in directory: /root/.cache/pip/wheels/9e/34/68/f21dc0320c699eb02ab90f2f7965d6f60ee793f03ef5e23212\n",
499
+ " Building wheel for umap (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
500
+ " Created wheel for umap: filename=umap-0.1.1-py3-none-any.whl size=3543 sha256=bea7193484d16a316e93f7059028d8dd852bc98c5dd3b8c719b914c8c95ad3c7\n",
501
+ " Stored in directory: /root/.cache/pip/wheels/15/f1/28/53dcf7a309118ed35d810a5f9cb995217800f3f269ab5771cb\n",
502
+ " Building wheel for aliyun-python-sdk-core (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
503
+ " Created wheel for aliyun-python-sdk-core: filename=aliyun_python_sdk_core-2.14.0-py3-none-any.whl size=535289 sha256=99ad776467e8ff79378685388d277e380f11accef8d8050cc778ba48b22a2b8d\n",
504
+ " Stored in directory: /root/.cache/pip/wheels/16/3c/68/b7eab618d9f1d5e7d386296f1e07e2cf36aaa1eb5161885038\n",
505
+ " Building wheel for crcmod (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
506
+ " Created wheel for crcmod: filename=crcmod-1.7-cp310-cp310-linux_x86_64.whl size=31408 sha256=04fc7afff53fa1e531e02019fcf84787c87c9839334ba7494274ae3c15f6d80e\n",
507
+ " Stored in directory: /root/.cache/pip/wheels/85/4c/07/72215c529bd59d67e3dac29711d7aba1b692f543c808ba9e86\n",
508
+ "Successfully built hdbscan jaconv oss2 umap aliyun-python-sdk-core crcmod\n",
509
+ "Installing collected packages: umap, sentencepiece, jamo, jaconv, crcmod, addict, torch-complex, simplejson, pytorch-wpe, kaldiio, jmespath, einops, dill, cython, yapf, multiprocess, hdbscan, aliyun-python-sdk-core, datasets, aliyun-python-sdk-kms, oss2, modelscope, funasr\n",
510
+ " Attempting uninstall: cython\n",
511
+ " Found existing installation: Cython 3.0.8\n",
512
+ " Uninstalling Cython-3.0.8:\n",
513
+ " Successfully uninstalled Cython-3.0.8\n",
514
+ "Successfully installed addict-2.4.0 aliyun-python-sdk-core-2.14.0 aliyun-python-sdk-kms-2.16.2 crcmod-1.7 cython-0.29.37 datasets-2.16.1 dill-0.3.7 einops-0.7.0 funasr-0.8.8 hdbscan-0.8.33 jaconv-0.3.4 jamo-0.4.1 jmespath-0.10.0 kaldiio-2.18.0 modelscope-1.11.0 multiprocess-0.70.15 oss2-2.18.4 pytorch-wpe-0.0.1 sentencepiece-0.1.99 simplejson-3.19.2 torch-complex-0.4.3 umap-0.1.1 yapf-0.40.2\n"
515
+ ]
516
+ }
517
+ ]
518
+ },
519
+ {
520
+ "cell_type": "code",
521
+ "source": [
522
+ "!sudo apt install ffmpeg\n",
523
+ "!sudo apt install libsox-dev"
524
+ ],
525
+ "metadata": {
526
+ "colab": {
527
+ "base_uri": "https://localhost:8080/"
528
+ },
529
+ "id": "jYiHCipqxuAa",
530
+ "outputId": "5d72ebb4-3106-4007-fb2c-6d76ade22838"
531
+ },
532
+ "execution_count": 5,
533
+ "outputs": [
534
+ {
535
+ "output_type": "stream",
536
+ "name": "stdout",
537
+ "text": [
538
+ "Reading package lists... Done\n",
539
+ "Building dependency tree... Done\n",
540
+ "Reading state information... Done\n",
541
+ "ffmpeg is already the newest version (7:4.4.2-0ubuntu0.22.04.1).\n",
542
+ "0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.\n",
543
+ "Reading package lists... Done\n",
544
+ "Building dependency tree... Done\n",
545
+ "Reading state information... Done\n",
546
+ "The following additional packages will be installed:\n",
547
+ " libao-common libao4 libid3tag0 libmad0 libopencore-amrnb0 libopencore-amrwb0\n",
548
+ " libsox-fmt-all libsox-fmt-alsa libsox-fmt-ao libsox-fmt-base libsox-fmt-mp3\n",
549
+ " libsox-fmt-oss libsox-fmt-pulse libsox3 libwavpack1\n",
550
+ "Suggested packages:\n",
551
+ " libaudio2 libsndio6.1\n",
552
+ "The following NEW packages will be installed:\n",
553
+ " libao-common libao4 libid3tag0 libmad0 libopencore-amrnb0 libopencore-amrwb0\n",
554
+ " libsox-dev libsox-fmt-all libsox-fmt-alsa libsox-fmt-ao libsox-fmt-base\n",
555
+ " libsox-fmt-mp3 libsox-fmt-oss libsox-fmt-pulse libsox3 libwavpack1\n",
556
+ "0 upgraded, 16 newly installed, 0 to remove and 29 not upgraded.\n",
557
+ "Need to get 1,053 kB of archives.\n",
558
+ "After this operation, 4,061 kB of additional disk space will be used.\n",
559
+ "Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 libao-common all 1.2.2+20180113-1.1ubuntu3 [6,568 B]\n",
560
+ "Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 libao4 amd64 1.2.2+20180113-1.1ubuntu3 [35.2 kB]\n",
561
+ "Get:3 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libid3tag0 amd64 0.15.1b-14 [31.3 kB]\n",
562
+ "Get:4 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libmad0 amd64 0.15.1b-10ubuntu1 [63.1 kB]\n",
563
+ "Get:5 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libopencore-amrnb0 amd64 0.1.5-1 [94.8 kB]\n",
564
+ "Get:6 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libopencore-amrwb0 amd64 0.1.5-1 [49.1 kB]\n",
565
+ "Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox3 amd64 14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1 [240 kB]\n",
566
+ "Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox-fmt-alsa amd64 14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1 [11.2 kB]\n",
567
+ "Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox-fmt-ao amd64 14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1 [7,740 B]\n",
568
+ "Get:10 http://archive.ubuntu.com/ubuntu jammy/main amd64 libwavpack1 amd64 5.4.0-1build2 [83.7 kB]\n",
569
+ "Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox-fmt-base amd64 14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1 [33.7 kB]\n",
570
+ "Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox-fmt-mp3 amd64 14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1 [17.3 kB]\n",
571
+ "Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox-fmt-oss amd64 14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1 [9,424 B]\n",
572
+ "Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox-fmt-pulse amd64 14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1 [7,732 B]\n",
573
+ "Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox-fmt-all amd64 14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1 [5,016 B]\n",
574
+ "Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libsox-dev amd64 14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1 [356 kB]\n",
575
+ "Fetched 1,053 kB in 2s (523 kB/s)\n",
576
+ "debconf: unable to initialize frontend: Dialog\n",
577
+ "debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78, <> line 16.)\n",
578
+ "debconf: falling back to frontend: Readline\n",
579
+ "debconf: unable to initialize frontend: Readline\n",
580
+ "debconf: (This frontend requires a controlling tty.)\n",
581
+ "debconf: falling back to frontend: Teletype\n",
582
+ "dpkg-preconfigure: unable to re-open stdin: \n",
583
+ "Selecting previously unselected package libao-common.\n",
584
+ "(Reading database ... 121658 files and directories currently installed.)\n",
585
+ "Preparing to unpack .../00-libao-common_1.2.2+20180113-1.1ubuntu3_all.deb ...\n",
586
+ "Unpacking libao-common (1.2.2+20180113-1.1ubuntu3) ...\n",
587
+ "Selecting previously unselected package libao4:amd64.\n",
588
+ "Preparing to unpack .../01-libao4_1.2.2+20180113-1.1ubuntu3_amd64.deb ...\n",
589
+ "Unpacking libao4:amd64 (1.2.2+20180113-1.1ubuntu3) ...\n",
590
+ "Selecting previously unselected package libid3tag0:amd64.\n",
591
+ "Preparing to unpack .../02-libid3tag0_0.15.1b-14_amd64.deb ...\n",
592
+ "Unpacking libid3tag0:amd64 (0.15.1b-14) ...\n",
593
+ "Selecting previously unselected package libmad0:amd64.\n",
594
+ "Preparing to unpack .../03-libmad0_0.15.1b-10ubuntu1_amd64.deb ...\n",
595
+ "Unpacking libmad0:amd64 (0.15.1b-10ubuntu1) ...\n",
596
+ "Selecting previously unselected package libopencore-amrnb0:amd64.\n",
597
+ "Preparing to unpack .../04-libopencore-amrnb0_0.1.5-1_amd64.deb ...\n",
598
+ "Unpacking libopencore-amrnb0:amd64 (0.1.5-1) ...\n",
599
+ "Selecting previously unselected package libopencore-amrwb0:amd64.\n",
600
+ "Preparing to unpack .../05-libopencore-amrwb0_0.1.5-1_amd64.deb ...\n",
601
+ "Unpacking libopencore-amrwb0:amd64 (0.1.5-1) ...\n",
602
+ "Selecting previously unselected package libsox3:amd64.\n",
603
+ "Preparing to unpack .../06-libsox3_14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1_amd64.deb ...\n",
604
+ "Unpacking libsox3:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
605
+ "Selecting previously unselected package libsox-fmt-alsa:amd64.\n",
606
+ "Preparing to unpack .../07-libsox-fmt-alsa_14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1_amd64.deb ...\n",
607
+ "Unpacking libsox-fmt-alsa:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
608
+ "Selecting previously unselected package libsox-fmt-ao:amd64.\n",
609
+ "Preparing to unpack .../08-libsox-fmt-ao_14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1_amd64.deb ...\n",
610
+ "Unpacking libsox-fmt-ao:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
611
+ "Selecting previously unselected package libwavpack1:amd64.\n",
612
+ "Preparing to unpack .../09-libwavpack1_5.4.0-1build2_amd64.deb ...\n",
613
+ "Unpacking libwavpack1:amd64 (5.4.0-1build2) ...\n",
614
+ "Selecting previously unselected package libsox-fmt-base:amd64.\n",
615
+ "Preparing to unpack .../10-libsox-fmt-base_14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1_amd64.deb ...\n",
616
+ "Unpacking libsox-fmt-base:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
617
+ "Selecting previously unselected package libsox-fmt-mp3:amd64.\n",
618
+ "Preparing to unpack .../11-libsox-fmt-mp3_14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1_amd64.deb ...\n",
619
+ "Unpacking libsox-fmt-mp3:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
620
+ "Selecting previously unselected package libsox-fmt-oss:amd64.\n",
621
+ "Preparing to unpack .../12-libsox-fmt-oss_14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1_amd64.deb ...\n",
622
+ "Unpacking libsox-fmt-oss:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
623
+ "Selecting previously unselected package libsox-fmt-pulse:amd64.\n",
624
+ "Preparing to unpack .../13-libsox-fmt-pulse_14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1_amd64.deb ...\n",
625
+ "Unpacking libsox-fmt-pulse:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
626
+ "Selecting previously unselected package libsox-fmt-all:amd64.\n",
627
+ "Preparing to unpack .../14-libsox-fmt-all_14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1_amd64.deb ...\n",
628
+ "Unpacking libsox-fmt-all:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
629
+ "Selecting previously unselected package libsox-dev:amd64.\n",
630
+ "Preparing to unpack .../15-libsox-dev_14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1_amd64.deb ...\n",
631
+ "Unpacking libsox-dev:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
632
+ "Setting up libsox3:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
633
+ "Setting up libsox-fmt-oss:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
634
+ "Setting up libao-common (1.2.2+20180113-1.1ubuntu3) ...\n",
635
+ "Setting up libid3tag0:amd64 (0.15.1b-14) ...\n",
636
+ "Setting up libopencore-amrwb0:amd64 (0.1.5-1) ...\n",
637
+ "Setting up libsox-fmt-alsa:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
638
+ "Setting up libao4:amd64 (1.2.2+20180113-1.1ubuntu3) ...\n",
639
+ "Setting up libmad0:amd64 (0.15.1b-10ubuntu1) ...\n",
640
+ "Setting up libwavpack1:amd64 (5.4.0-1build2) ...\n",
641
+ "Setting up libopencore-amrnb0:amd64 (0.1.5-1) ...\n",
642
+ "Setting up libsox-fmt-base:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
643
+ "Setting up libsox-fmt-ao:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
644
+ "Setting up libsox-fmt-mp3:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
645
+ "Setting up libsox-fmt-pulse:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
646
+ "Setting up libsox-fmt-all:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
647
+ "Setting up libsox-dev:amd64 (14.4.2+git20190427-2+deb11u2ubuntu0.22.04.1) ...\n",
648
+ "Processing triggers for man-db (2.10.2-1) ...\n",
649
+ "Processing triggers for libc-bin (2.35-0ubuntu3.4) ...\n",
650
+ "/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc_proxy.so.2 is not a symbolic link\n",
651
+ "\n",
652
+ "/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc.so.2 is not a symbolic link\n",
653
+ "\n",
654
+ "/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_5.so.3 is not a symbolic link\n",
655
+ "\n",
656
+ "/sbin/ldconfig.real: /usr/local/lib/libtbbbind.so.3 is not a symbolic link\n",
657
+ "\n",
658
+ "/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_0.so.3 is not a symbolic link\n",
659
+ "\n",
660
+ "/sbin/ldconfig.real: /usr/local/lib/libtbb.so.12 is not a symbolic link\n",
661
+ "\n"
662
+ ]
663
+ }
664
+ ]
665
+ },
666
+ {
667
+ "cell_type": "code",
668
+ "source": [
669
+ "!mv /content/GPT-SoVITS/GPT-SoVITS/tools/damo_asr/models /content/gpt-sovits/tools/damo_asr"
670
+ ],
671
+ "metadata": {
672
+ "id": "_MS7NNuWxz1V"
673
+ },
674
+ "execution_count": 6,
675
+ "outputs": []
676
+ },
677
+ {
678
+ "cell_type": "code",
679
+ "source": [
680
+ "!mv /content/GPT-SoVITS/GPT-SoVITS/GPT_SoVITS/pretrained_models /content/gpt-sovits/GPT_SoVITS"
681
+ ],
682
+ "metadata": {
683
+ "id": "rFgcePsxyuNF"
684
+ },
685
+ "execution_count": 7,
686
+ "outputs": []
687
+ },
688
+ {
689
+ "cell_type": "code",
690
+ "source": [
691
+ "cd gpt-sovits"
692
+ ],
693
+ "metadata": {
694
+ "colab": {
695
+ "base_uri": "https://localhost:8080/"
696
+ },
697
+ "id": "agXdPQ8wzEJl",
698
+ "outputId": "c45b7657-cd8a-4f4b-d3a1-16cdc5c38973"
699
+ },
700
+ "execution_count": 8,
701
+ "outputs": [
702
+ {
703
+ "output_type": "stream",
704
+ "name": "stdout",
705
+ "text": [
706
+ "/content/gpt-sovits\n"
707
+ ]
708
+ }
709
+ ]
710
+ },
711
+ {
712
+ "cell_type": "code",
713
+ "source": [
714
+ "import nltk\n",
715
+ "nltk.download(\"all\")"
716
+ ],
717
+ "metadata": {
718
+ "colab": {
719
+ "base_uri": "https://localhost:8080/"
720
+ },
721
+ "id": "06e0gShlzVDK",
722
+ "outputId": "8b8df5ef-9a1e-478e-f50e-f486cac1b0c5"
723
+ },
724
+ "execution_count": 11,
725
+ "outputs": [
726
+ {
727
+ "output_type": "stream",
728
+ "name": "stderr",
729
+ "text": [
730
+ "[nltk_data] Downloading collection 'all'\n",
731
+ "[nltk_data] | \n",
732
+ "[nltk_data] | Downloading package abc to /root/nltk_data...\n",
733
+ "[nltk_data] | Unzipping corpora/abc.zip.\n",
734
+ "[nltk_data] | Downloading package alpino to /root/nltk_data...\n",
735
+ "[nltk_data] | Unzipping corpora/alpino.zip.\n",
736
+ "[nltk_data] | Downloading package averaged_perceptron_tagger to\n",
737
+ "[nltk_data] | /root/nltk_data...\n",
738
+ "[nltk_data] | Package averaged_perceptron_tagger is already up-\n",
739
+ "[nltk_data] | to-date!\n",
740
+ "[nltk_data] | Downloading package averaged_perceptron_tagger_ru to\n",
741
+ "[nltk_data] | /root/nltk_data...\n",
742
+ "[nltk_data] | Unzipping\n",
743
+ "[nltk_data] | taggers/averaged_perceptron_tagger_ru.zip.\n",
744
+ "[nltk_data] | Downloading package basque_grammars to\n",
745
+ "[nltk_data] | /root/nltk_data...\n",
746
+ "[nltk_data] | Unzipping grammars/basque_grammars.zip.\n",
747
+ "[nltk_data] | Downloading package bcp47 to /root/nltk_data...\n",
748
+ "[nltk_data] | Downloading package biocreative_ppi to\n",
749
+ "[nltk_data] | /root/nltk_data...\n",
750
+ "[nltk_data] | Unzipping corpora/biocreative_ppi.zip.\n",
751
+ "[nltk_data] | Downloading package bllip_wsj_no_aux to\n",
752
+ "[nltk_data] | /root/nltk_data...\n",
753
+ "[nltk_data] | Unzipping models/bllip_wsj_no_aux.zip.\n",
754
+ "[nltk_data] | Downloading package book_grammars to\n",
755
+ "[nltk_data] | /root/nltk_data...\n",
756
+ "[nltk_data] | Unzipping grammars/book_grammars.zip.\n",
757
+ "[nltk_data] | Downloading package brown to /root/nltk_data...\n",
758
+ "[nltk_data] | Unzipping corpora/brown.zip.\n",
759
+ "[nltk_data] | Downloading package brown_tei to /root/nltk_data...\n",
760
+ "[nltk_data] | Unzipping corpora/brown_tei.zip.\n",
761
+ "[nltk_data] | Downloading package cess_cat to /root/nltk_data...\n",
762
+ "[nltk_data] | Unzipping corpora/cess_cat.zip.\n",
763
+ "[nltk_data] | Downloading package cess_esp to /root/nltk_data...\n",
764
+ "[nltk_data] | Unzipping corpora/cess_esp.zip.\n",
765
+ "[nltk_data] | Downloading package chat80 to /root/nltk_data...\n",
766
+ "[nltk_data] | Unzipping corpora/chat80.zip.\n",
767
+ "[nltk_data] | Downloading package city_database to\n",
768
+ "[nltk_data] | /root/nltk_data...\n",
769
+ "[nltk_data] | Unzipping corpora/city_database.zip.\n",
770
+ "[nltk_data] | Downloading package cmudict to /root/nltk_data...\n",
771
+ "[nltk_data] | Package cmudict is already up-to-date!\n",
772
+ "[nltk_data] | Downloading package comparative_sentences to\n",
773
+ "[nltk_data] | /root/nltk_data...\n",
774
+ "[nltk_data] | Unzipping corpora/comparative_sentences.zip.\n",
775
+ "[nltk_data] | Downloading package comtrans to /root/nltk_data...\n",
776
+ "[nltk_data] | Downloading package conll2000 to /root/nltk_data...\n",
777
+ "[nltk_data] | Unzipping corpora/conll2000.zip.\n",
778
+ "[nltk_data] | Downloading package conll2002 to /root/nltk_data...\n",
779
+ "[nltk_data] | Unzipping corpora/conll2002.zip.\n",
780
+ "[nltk_data] | Downloading package conll2007 to /root/nltk_data...\n",
781
+ "[nltk_data] | Downloading package crubadan to /root/nltk_data...\n",
782
+ "[nltk_data] | Unzipping corpora/crubadan.zip.\n",
783
+ "[nltk_data] | Downloading package dependency_treebank to\n",
784
+ "[nltk_data] | /root/nltk_data...\n",
785
+ "[nltk_data] | Unzipping corpora/dependency_treebank.zip.\n",
786
+ "[nltk_data] | Downloading package dolch to /root/nltk_data...\n",
787
+ "[nltk_data] | Unzipping corpora/dolch.zip.\n",
788
+ "[nltk_data] | Downloading package europarl_raw to\n",
789
+ "[nltk_data] | /root/nltk_data...\n",
790
+ "[nltk_data] | Unzipping corpora/europarl_raw.zip.\n",
791
+ "[nltk_data] | Downloading package extended_omw to\n",
792
+ "[nltk_data] | /root/nltk_data...\n",
793
+ "[nltk_data] | Downloading package floresta to /root/nltk_data...\n",
794
+ "[nltk_data] | Unzipping corpora/floresta.zip.\n",
795
+ "[nltk_data] | Downloading package framenet_v15 to\n",
796
+ "[nltk_data] | /root/nltk_data...\n",
797
+ "[nltk_data] | Unzipping corpora/framenet_v15.zip.\n",
798
+ "[nltk_data] | Downloading package framenet_v17 to\n",
799
+ "[nltk_data] | /root/nltk_data...\n",
800
+ "[nltk_data] | Unzipping corpora/framenet_v17.zip.\n",
801
+ "[nltk_data] | Downloading package gazetteers to /root/nltk_data...\n",
802
+ "[nltk_data] | Unzipping corpora/gazetteers.zip.\n",
803
+ "[nltk_data] | Downloading package genesis to /root/nltk_data...\n",
804
+ "[nltk_data] | Unzipping corpora/genesis.zip.\n",
805
+ "[nltk_data] | Downloading package gutenberg to /root/nltk_data...\n",
806
+ "[nltk_data] | Unzipping corpora/gutenberg.zip.\n",
807
+ "[nltk_data] | Downloading package ieer to /root/nltk_data...\n",
808
+ "[nltk_data] | Unzipping corpora/ieer.zip.\n",
809
+ "[nltk_data] | Downloading package inaugural to /root/nltk_data...\n",
810
+ "[nltk_data] | Unzipping corpora/inaugural.zip.\n",
811
+ "[nltk_data] | Downloading package indian to /root/nltk_data...\n",
812
+ "[nltk_data] | Unzipping corpora/indian.zip.\n",
813
+ "[nltk_data] | Downloading package jeita to /root/nltk_data...\n",
814
+ "[nltk_data] | Downloading package kimmo to /root/nltk_data...\n",
815
+ "[nltk_data] | Unzipping corpora/kimmo.zip.\n",
816
+ "[nltk_data] | Downloading package knbc to /root/nltk_data...\n",
817
+ "[nltk_data] | Downloading package large_grammars to\n",
818
+ "[nltk_data] | /root/nltk_data...\n",
819
+ "[nltk_data] | Unzipping grammars/large_grammars.zip.\n",
820
+ "[nltk_data] | Downloading package lin_thesaurus to\n",
821
+ "[nltk_data] | /root/nltk_data...\n",
822
+ "[nltk_data] | Unzipping corpora/lin_thesaurus.zip.\n",
823
+ "[nltk_data] | Downloading package mac_morpho to /root/nltk_data...\n",
824
+ "[nltk_data] | Unzipping corpora/mac_morpho.zip.\n",
825
+ "[nltk_data] | Downloading package machado to /root/nltk_data...\n",
826
+ "[nltk_data] | Downloading package masc_tagged to /root/nltk_data...\n",
827
+ "[nltk_data] | Downloading package maxent_ne_chunker to\n",
828
+ "[nltk_data] | /root/nltk_data...\n",
829
+ "[nltk_data] | Unzipping chunkers/maxent_ne_chunker.zip.\n",
830
+ "[nltk_data] | Downloading package maxent_treebank_pos_tagger to\n",
831
+ "[nltk_data] | /root/nltk_data...\n",
832
+ "[nltk_data] | Unzipping taggers/maxent_treebank_pos_tagger.zip.\n",
833
+ "[nltk_data] | Downloading package moses_sample to\n",
834
+ "[nltk_data] | /root/nltk_data...\n",
835
+ "[nltk_data] | Unzipping models/moses_sample.zip.\n",
836
+ "[nltk_data] | Downloading package movie_reviews to\n",
837
+ "[nltk_data] | /root/nltk_data...\n",
838
+ "[nltk_data] | Unzipping corpora/movie_reviews.zip.\n",
839
+ "[nltk_data] | Downloading package mte_teip5 to /root/nltk_data...\n",
840
+ "[nltk_data] | Unzipping corpora/mte_teip5.zip.\n",
841
+ "[nltk_data] | Downloading package mwa_ppdb to /root/nltk_data...\n",
842
+ "[nltk_data] | Unzipping misc/mwa_ppdb.zip.\n",
843
+ "[nltk_data] | Downloading package names to /root/nltk_data...\n",
844
+ "[nltk_data] | Unzipping corpora/names.zip.\n",
845
+ "[nltk_data] | Downloading package nombank.1.0 to /root/nltk_data...\n",
846
+ "[nltk_data] | Downloading package nonbreaking_prefixes to\n",
847
+ "[nltk_data] | /root/nltk_data...\n",
848
+ "[nltk_data] | Unzipping corpora/nonbreaking_prefixes.zip.\n",
849
+ "[nltk_data] | Downloading package nps_chat to /root/nltk_data...\n",
850
+ "[nltk_data] | Unzipping corpora/nps_chat.zip.\n",
851
+ "[nltk_data] | Downloading package omw to /root/nltk_data...\n",
852
+ "[nltk_data] | Downloading package omw-1.4 to /root/nltk_data...\n",
853
+ "[nltk_data] | Downloading package opinion_lexicon to\n",
854
+ "[nltk_data] | /root/nltk_data...\n",
855
+ "[nltk_data] | Unzipping corpora/opinion_lexicon.zip.\n",
856
+ "[nltk_data] | Downloading package panlex_swadesh to\n",
857
+ "[nltk_data] | /root/nltk_data...\n",
858
+ "[nltk_data] | Downloading package paradigms to /root/nltk_data...\n",
859
+ "[nltk_data] | Unzipping corpora/paradigms.zip.\n",
860
+ "[nltk_data] | Downloading package pe08 to /root/nltk_data...\n",
861
+ "[nltk_data] | Unzipping corpora/pe08.zip.\n",
862
+ "[nltk_data] | Downloading package perluniprops to\n",
863
+ "[nltk_data] | /root/nltk_data...\n",
864
+ "[nltk_data] | Unzipping misc/perluniprops.zip.\n",
865
+ "[nltk_data] | Downloading package pil to /root/nltk_data...\n",
866
+ "[nltk_data] | Unzipping corpora/pil.zip.\n",
867
+ "[nltk_data] | Downloading package pl196x to /root/nltk_data...\n",
868
+ "[nltk_data] | Unzipping corpora/pl196x.zip.\n",
869
+ "[nltk_data] | Downloading package porter_test to /root/nltk_data...\n",
870
+ "[nltk_data] | Unzipping stemmers/porter_test.zip.\n",
871
+ "[nltk_data] | Downloading package ppattach to /root/nltk_data...\n",
872
+ "[nltk_data] | Unzipping corpora/ppattach.zip.\n",
873
+ "[nltk_data] | Downloading package problem_reports to\n",
874
+ "[nltk_data] | /root/nltk_data...\n",
875
+ "[nltk_data] | Unzipping corpora/problem_reports.zip.\n",
876
+ "[nltk_data] | Downloading package product_reviews_1 to\n",
877
+ "[nltk_data] | /root/nltk_data...\n",
878
+ "[nltk_data] | Unzipping corpora/product_reviews_1.zip.\n",
879
+ "[nltk_data] | Downloading package product_reviews_2 to\n",
880
+ "[nltk_data] | /root/nltk_data...\n",
881
+ "[nltk_data] | Unzipping corpora/product_reviews_2.zip.\n",
882
+ "[nltk_data] | Downloading package propbank to /root/nltk_data...\n",
883
+ "[nltk_data] | Downloading package pros_cons to /root/nltk_data...\n",
884
+ "[nltk_data] | Unzipping corpora/pros_cons.zip.\n",
885
+ "[nltk_data] | Downloading package ptb to /root/nltk_data...\n",
886
+ "[nltk_data] | Unzipping corpora/ptb.zip.\n",
887
+ "[nltk_data] | Downloading package punkt to /root/nltk_data...\n",
888
+ "[nltk_data] | Unzipping tokenizers/punkt.zip.\n",
889
+ "[nltk_data] | Downloading package qc to /root/nltk_data...\n",
890
+ "[nltk_data] | Unzipping corpora/qc.zip.\n",
891
+ "[nltk_data] | Downloading package reuters to /root/nltk_data...\n",
892
+ "[nltk_data] | Downloading package rslp to /root/nltk_data...\n",
893
+ "[nltk_data] | Unzipping stemmers/rslp.zip.\n",
894
+ "[nltk_data] | Downloading package rte to /root/nltk_data...\n",
895
+ "[nltk_data] | Unzipping corpora/rte.zip.\n",
896
+ "[nltk_data] | Downloading package sample_grammars to\n",
897
+ "[nltk_data] | /root/nltk_data...\n",
898
+ "[nltk_data] | Unzipping grammars/sample_grammars.zip.\n",
899
+ "[nltk_data] | Downloading package semcor to /root/nltk_data...\n",
900
+ "[nltk_data] | Downloading package senseval to /root/nltk_data...\n",
901
+ "[nltk_data] | Unzipping corpora/senseval.zip.\n",
902
+ "[nltk_data] | Downloading package sentence_polarity to\n",
903
+ "[nltk_data] | /root/nltk_data...\n",
904
+ "[nltk_data] | Unzipping corpora/sentence_polarity.zip.\n",
905
+ "[nltk_data] | Downloading package sentiwordnet to\n",
906
+ "[nltk_data] | /root/nltk_data...\n",
907
+ "[nltk_data] | Unzipping corpora/sentiwordnet.zip.\n",
908
+ "[nltk_data] | Downloading package shakespeare to /root/nltk_data...\n",
909
+ "[nltk_data] | Unzipping corpora/shakespeare.zip.\n",
910
+ "[nltk_data] | Downloading package sinica_treebank to\n",
911
+ "[nltk_data] | /root/nltk_data...\n",
912
+ "[nltk_data] | Unzipping corpora/sinica_treebank.zip.\n",
913
+ "[nltk_data] | Downloading package smultron to /root/nltk_data...\n",
914
+ "[nltk_data] | Unzipping corpora/smultron.zip.\n",
915
+ "[nltk_data] | Downloading package snowball_data to\n",
916
+ "[nltk_data] | /root/nltk_data...\n",
917
+ "[nltk_data] | Downloading package spanish_grammars to\n",
918
+ "[nltk_data] | /root/nltk_data...\n",
919
+ "[nltk_data] | Unzipping grammars/spanish_grammars.zip.\n",
920
+ "[nltk_data] | Downloading package state_union to /root/nltk_data...\n",
921
+ "[nltk_data] | Unzipping corpora/state_union.zip.\n",
922
+ "[nltk_data] | Downloading package stopwords to /root/nltk_data...\n",
923
+ "[nltk_data] | Unzipping corpora/stopwords.zip.\n",
924
+ "[nltk_data] | Downloading package subjectivity to\n",
925
+ "[nltk_data] | /root/nltk_data...\n",
926
+ "[nltk_data] | Unzipping corpora/subjectivity.zip.\n",
927
+ "[nltk_data] | Downloading package swadesh to /root/nltk_data...\n",
928
+ "[nltk_data] | Unzipping corpora/swadesh.zip.\n",
929
+ "[nltk_data] | Downloading package switchboard to /root/nltk_data...\n",
930
+ "[nltk_data] | Unzipping corpora/switchboard.zip.\n",
931
+ "[nltk_data] | Downloading package tagsets to /root/nltk_data...\n",
932
+ "[nltk_data] | Unzipping help/tagsets.zip.\n",
933
+ "[nltk_data] | Downloading package timit to /root/nltk_data...\n",
934
+ "[nltk_data] | Unzipping corpora/timit.zip.\n",
935
+ "[nltk_data] | Downloading package toolbox to /root/nltk_data...\n",
936
+ "[nltk_data] | Unzipping corpora/toolbox.zip.\n",
937
+ "[nltk_data] | Downloading package treebank to /root/nltk_data...\n",
938
+ "[nltk_data] | Unzipping corpora/treebank.zip.\n",
939
+ "[nltk_data] | Downloading package twitter_samples to\n",
940
+ "[nltk_data] | /root/nltk_data...\n",
941
+ "[nltk_data] | Unzipping corpora/twitter_samples.zip.\n",
942
+ "[nltk_data] | Downloading package udhr to /root/nltk_data...\n",
943
+ "[nltk_data] | Unzipping corpora/udhr.zip.\n",
944
+ "[nltk_data] | Downloading package udhr2 to /root/nltk_data...\n",
945
+ "[nltk_data] | Unzipping corpora/udhr2.zip.\n",
946
+ "[nltk_data] | Downloading package unicode_samples to\n",
947
+ "[nltk_data] | /root/nltk_data...\n",
948
+ "[nltk_data] | Unzipping corpora/unicode_samples.zip.\n",
949
+ "[nltk_data] | Downloading package universal_tagset to\n",
950
+ "[nltk_data] | /root/nltk_data...\n",
951
+ "[nltk_data] | Unzipping taggers/universal_tagset.zip.\n",
952
+ "[nltk_data] | Downloading package universal_treebanks_v20 to\n",
953
+ "[nltk_data] | /root/nltk_data...\n",
954
+ "[nltk_data] | Downloading package vader_lexicon to\n",
955
+ "[nltk_data] | /root/nltk_data...\n",
956
+ "[nltk_data] | Downloading package verbnet to /root/nltk_data...\n",
957
+ "[nltk_data] | Unzipping corpora/verbnet.zip.\n",
958
+ "[nltk_data] | Downloading package verbnet3 to /root/nltk_data...\n",
959
+ "[nltk_data] | Unzipping corpora/verbnet3.zip.\n",
960
+ "[nltk_data] | Downloading package webtext to /root/nltk_data...\n",
961
+ "[nltk_data] | Unzipping corpora/webtext.zip.\n",
962
+ "[nltk_data] | Downloading package wmt15_eval to /root/nltk_data...\n",
963
+ "[nltk_data] | Unzipping models/wmt15_eval.zip.\n",
964
+ "[nltk_data] | Downloading package word2vec_sample to\n",
965
+ "[nltk_data] | /root/nltk_data...\n",
966
+ "[nltk_data] | Unzipping models/word2vec_sample.zip.\n",
967
+ "[nltk_data] | Downloading package wordnet to /root/nltk_data...\n",
968
+ "[nltk_data] | Downloading package wordnet2021 to /root/nltk_data...\n",
969
+ "[nltk_data] | Downloading package wordnet2022 to /root/nltk_data...\n",
970
+ "[nltk_data] | Unzipping corpora/wordnet2022.zip.\n",
971
+ "[nltk_data] | Downloading package wordnet31 to /root/nltk_data...\n",
972
+ "[nltk_data] | Downloading package wordnet_ic to /root/nltk_data...\n",
973
+ "[nltk_data] | Unzipping corpora/wordnet_ic.zip.\n",
974
+ "[nltk_data] | Downloading package words to /root/nltk_data...\n",
975
+ "[nltk_data] | Unzipping corpora/words.zip.\n",
976
+ "[nltk_data] | Downloading package ycoe to /root/nltk_data...\n",
977
+ "[nltk_data] | Unzipping corpora/ycoe.zip.\n",
978
+ "[nltk_data] | \n",
979
+ "[nltk_data] Done downloading collection all\n"
980
+ ]
981
+ },
982
+ {
983
+ "output_type": "execute_result",
984
+ "data": {
985
+ "text/plain": [
986
+ "True"
987
+ ]
988
+ },
989
+ "metadata": {},
990
+ "execution_count": 11
991
+ }
992
+ ]
993
+ },
994
+ {
995
+ "cell_type": "code",
996
+ "source": [
997
+ "!python webui.py"
998
+ ],
999
+ "metadata": {
1000
+ "colab": {
1001
+ "base_uri": "https://localhost:8080/"
1002
+ },
1003
+ "id": "PO5lEjiZzSGT",
1004
+ "outputId": "6ad6e9a1-a940-4b0e-8cee-5ab588674183"
1005
+ },
1006
+ "execution_count": null,
1007
+ "outputs": [
1008
+ {
1009
+ "output_type": "stream",
1010
+ "name": "stdout",
1011
+ "text": [
1012
+ "Running on local URL: http://0.0.0.0:9874\n",
1013
+ "\n",
1014
+ "Setting up a public link... we have recently upgraded the way public links are generated. If you encounter any problems, please report the issue and downgrade to gradio version 3.13.0\n",
1015
+ ".\n",
1016
+ "Running on public URL: https://c52c000e-11e7-4e0c.gradio.live\n",
1017
+ "\"/usr/bin/python3\" GPT_SoVITS/inference_webui.py\n",
1018
+ "Some weights of the model checkpoint at GPT_SoVITS/pretrained_models/chinese-hubert-base were not used when initializing HubertModel: ['encoder.pos_conv_embed.conv.weight_g', 'encoder.pos_conv_embed.conv.weight_v']\n",
1019
+ "- This IS expected if you are initializing HubertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
1020
+ "- This IS NOT expected if you are initializing HubertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
1021
+ "Some weights of HubertModel were not initialized from the model checkpoint at GPT_SoVITS/pretrained_models/chinese-hubert-base and are newly initialized: ['encoder.pos_conv_embed.conv.parametrizations.weight.original0', 'encoder.pos_conv_embed.conv.parametrizations.weight.original1']\n",
1022
+ "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n",
1023
+ "/usr/local/lib/python3.10/dist-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.\n",
1024
+ " warnings.warn(\"torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.\")\n",
1025
+ "_IncompatibleKeys(missing_keys=['enc_q.pre.weight', 'enc_q.pre.bias', 'enc_q.enc.in_layers.0.bias', 'enc_q.enc.in_layers.0.weight_g', 'enc_q.enc.in_layers.0.weight_v', 'enc_q.enc.in_layers.1.bias', 'enc_q.enc.in_layers.1.weight_g', 'enc_q.enc.in_layers.1.weight_v', 'enc_q.enc.in_layers.2.bias', 'enc_q.enc.in_layers.2.weight_g', 'enc_q.enc.in_layers.2.weight_v', 'enc_q.enc.in_layers.3.bias', 'enc_q.enc.in_layers.3.weight_g', 'enc_q.enc.in_layers.3.weight_v', 'enc_q.enc.in_layers.4.bias', 'enc_q.enc.in_layers.4.weight_g', 'enc_q.enc.in_layers.4.weight_v', 'enc_q.enc.in_layers.5.bias', 'enc_q.enc.in_layers.5.weight_g', 'enc_q.enc.in_layers.5.weight_v', 'enc_q.enc.in_layers.6.bias', 'enc_q.enc.in_layers.6.weight_g', 'enc_q.enc.in_layers.6.weight_v', 'enc_q.enc.in_layers.7.bias', 'enc_q.enc.in_layers.7.weight_g', 'enc_q.enc.in_layers.7.weight_v', 'enc_q.enc.in_layers.8.bias', 'enc_q.enc.in_layers.8.weight_g', 'enc_q.enc.in_layers.8.weight_v', 'enc_q.enc.in_layers.9.bias', 'enc_q.enc.in_layers.9.weight_g', 'enc_q.enc.in_layers.9.weight_v', 'enc_q.enc.in_layers.10.bias', 'enc_q.enc.in_layers.10.weight_g', 'enc_q.enc.in_layers.10.weight_v', 'enc_q.enc.in_layers.11.bias', 'enc_q.enc.in_layers.11.weight_g', 'enc_q.enc.in_layers.11.weight_v', 'enc_q.enc.in_layers.12.bias', 'enc_q.enc.in_layers.12.weight_g', 'enc_q.enc.in_layers.12.weight_v', 'enc_q.enc.in_layers.13.bias', 'enc_q.enc.in_layers.13.weight_g', 'enc_q.enc.in_layers.13.weight_v', 'enc_q.enc.in_layers.14.bias', 'enc_q.enc.in_layers.14.weight_g', 'enc_q.enc.in_layers.14.weight_v', 'enc_q.enc.in_layers.15.bias', 'enc_q.enc.in_layers.15.weight_g', 'enc_q.enc.in_layers.15.weight_v', 'enc_q.enc.res_skip_layers.0.bias', 'enc_q.enc.res_skip_layers.0.weight_g', 'enc_q.enc.res_skip_layers.0.weight_v', 'enc_q.enc.res_skip_layers.1.bias', 'enc_q.enc.res_skip_layers.1.weight_g', 'enc_q.enc.res_skip_layers.1.weight_v', 'enc_q.enc.res_skip_layers.2.bias', 'enc_q.enc.res_skip_layers.2.weight_g', 'enc_q.enc.res_skip_layers.2.weight_v', 'enc_q.enc.res_skip_layers.3.bias', 'enc_q.enc.res_skip_layers.3.weight_g', 'enc_q.enc.res_skip_layers.3.weight_v', 'enc_q.enc.res_skip_layers.4.bias', 'enc_q.enc.res_skip_layers.4.weight_g', 'enc_q.enc.res_skip_layers.4.weight_v', 'enc_q.enc.res_skip_layers.5.bias', 'enc_q.enc.res_skip_layers.5.weight_g', 'enc_q.enc.res_skip_layers.5.weight_v', 'enc_q.enc.res_skip_layers.6.bias', 'enc_q.enc.res_skip_layers.6.weight_g', 'enc_q.enc.res_skip_layers.6.weight_v', 'enc_q.enc.res_skip_layers.7.bias', 'enc_q.enc.res_skip_layers.7.weight_g', 'enc_q.enc.res_skip_layers.7.weight_v', 'enc_q.enc.res_skip_layers.8.bias', 'enc_q.enc.res_skip_layers.8.weight_g', 'enc_q.enc.res_skip_layers.8.weight_v', 'enc_q.enc.res_skip_layers.9.bias', 'enc_q.enc.res_skip_layers.9.weight_g', 'enc_q.enc.res_skip_layers.9.weight_v', 'enc_q.enc.res_skip_layers.10.bias', 'enc_q.enc.res_skip_layers.10.weight_g', 'enc_q.enc.res_skip_layers.10.weight_v', 'enc_q.enc.res_skip_layers.11.bias', 'enc_q.enc.res_skip_layers.11.weight_g', 'enc_q.enc.res_skip_layers.11.weight_v', 'enc_q.enc.res_skip_layers.12.bias', 'enc_q.enc.res_skip_layers.12.weight_g', 'enc_q.enc.res_skip_layers.12.weight_v', 'enc_q.enc.res_skip_layers.13.bias', 'enc_q.enc.res_skip_layers.13.weight_g', 'enc_q.enc.res_skip_layers.13.weight_v', 'enc_q.enc.res_skip_layers.14.bias', 'enc_q.enc.res_skip_layers.14.weight_g', 'enc_q.enc.res_skip_layers.14.weight_v', 'enc_q.enc.res_skip_layers.15.bias', 'enc_q.enc.res_skip_layers.15.weight_g', 'enc_q.enc.res_skip_layers.15.weight_v', 'enc_q.enc.cond_layer.bias', 'enc_q.enc.cond_layer.weight_g', 'enc_q.enc.cond_layer.weight_v', 'enc_q.proj.weight', 'enc_q.proj.bias'], unexpected_keys=[])\n",
1026
+ "Number of parameter: 77.49M\n",
1027
+ "Running on local URL: http://0.0.0.0:9872\n",
1028
+ "\n",
1029
+ "Setting up a public link... we have recently upgraded the way public links are generated. If you encounter any problems, please report the issue and downgrade to gradio version 3.13.0\n",
1030
+ ".\n",
1031
+ "Running on public URL: https://591bccbf-14c3-4566.gradio.live\n",
1032
+ "Building prefix dict from the default dictionary ...\n",
1033
+ "DEBUG:jieba:Building prefix dict from the default dictionary ...\n",
1034
+ "Loading model from cache /content/gpt-sovits/TEMP/jieba.cache\n",
1035
+ "DEBUG:jieba:Loading model from cache /content/gpt-sovits/TEMP/jieba.cache\n",
1036
+ "Loading model cost 0.629 seconds.\n",
1037
+ "DEBUG:jieba:Loading model cost 0.629 seconds.\n",
1038
+ "Prefix dict has been built successfully.\n",
1039
+ "DEBUG:jieba:Prefix dict has been built successfully.\n",
1040
+ " 6% 96/1500 [00:01<00:21, 65.93it/s]T2S Decoding EOS [105 -> 205]\n",
1041
+ " 7% 100/1500 [00:01<00:23, 60.53it/s]\n",
1042
+ "/usr/local/lib/python3.10/dist-packages/torch/functional.py:650: UserWarning: stft with return_complex=False is deprecated. In a future pytorch release, stft will return complex tensors for all inputs, and return_complex=False will raise an error.\n",
1043
+ "Note: you can still call torch.view_as_real on the complex output to recover the old return format. (Triggered internally at ../aten/src/ATen/native/SpectralOps.cpp:863.)\n",
1044
+ " return _VF.stft(input, n_fft, hop_length, win_length, window, # type: ignore[attr-defined]\n",
1045
+ "1.543\t0.693\t1.660\t0.702\n",
1046
+ " 22% 337/1500 [00:04<00:16, 70.02it/s]T2S Decoding EOS [105 -> 443]\n",
1047
+ " 23% 338/1500 [00:04<00:16, 69.98it/s]\n",
1048
+ "0.085\t0.051\t4.831\t0.540\n"
1049
+ ]
1050
+ }
1051
+ ]
1052
+ },
1053
+ {
1054
+ "cell_type": "code",
1055
+ "source": [],
1056
+ "metadata": {
1057
+ "id": "CFdaEELj7aFK"
1058
+ },
1059
+ "execution_count": null,
1060
+ "outputs": []
1061
+ }
1062
+ ]
1063
+ }