Spaces:
Running
on
Zero
Running
on
Zero
Delete SoniTranslate_Colab.ipynb
Browse files- SoniTranslate_Colab.ipynb +0 -124
SoniTranslate_Colab.ipynb
DELETED
@@ -1,124 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"nbformat": 4,
|
3 |
-
"nbformat_minor": 0,
|
4 |
-
"metadata": {
|
5 |
-
"colab": {
|
6 |
-
"provenance": [],
|
7 |
-
"gpuType": "T4",
|
8 |
-
"include_colab_link": true
|
9 |
-
},
|
10 |
-
"kernelspec": {
|
11 |
-
"name": "python3",
|
12 |
-
"display_name": "Python 3"
|
13 |
-
},
|
14 |
-
"language_info": {
|
15 |
-
"name": "python"
|
16 |
-
},
|
17 |
-
"accelerator": "GPU"
|
18 |
-
},
|
19 |
-
"cells": [
|
20 |
-
{
|
21 |
-
"cell_type": "markdown",
|
22 |
-
"metadata": {
|
23 |
-
"id": "view-in-github",
|
24 |
-
"colab_type": "text"
|
25 |
-
},
|
26 |
-
"source": [
|
27 |
-
"<a href=\"https://colab.research.google.com/github/R3gm/SoniTranslate/blob/main/SoniTranslate_Colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
28 |
-
]
|
29 |
-
},
|
30 |
-
{
|
31 |
-
"cell_type": "markdown",
|
32 |
-
"source": [
|
33 |
-
"# SoniTranslate\n",
|
34 |
-
"\n",
|
35 |
-
"| Description | Link |\n",
|
36 |
-
"| ----------- | ---- |\n",
|
37 |
-
"| 🎉 Repository | [](https://github.com/R3gm/SoniTranslate/) |\n",
|
38 |
-
"| 🚀 Online Demo in HF | [](https://huggingface.co/spaces/r3gm/SoniTranslate_translate_audio_of_a_video_content) |\n",
|
39 |
-
"\n",
|
40 |
-
"\n"
|
41 |
-
],
|
42 |
-
"metadata": {
|
43 |
-
"id": "8lw0EgLex-YZ"
|
44 |
-
}
|
45 |
-
},
|
46 |
-
{
|
47 |
-
"cell_type": "code",
|
48 |
-
"execution_count": null,
|
49 |
-
"metadata": {
|
50 |
-
"id": "LUgwm0rfx0_J",
|
51 |
-
"cellView": "form"
|
52 |
-
},
|
53 |
-
"outputs": [],
|
54 |
-
"source": [
|
55 |
-
"# @title Install requirements for SoniTranslate\n",
|
56 |
-
"!git clone https://github.com/r3gm/SoniTranslate.git\n",
|
57 |
-
"%cd SoniTranslate\n",
|
58 |
-
"\n",
|
59 |
-
"!apt install git-lfs\n",
|
60 |
-
"!git lfs install\n",
|
61 |
-
"\n",
|
62 |
-
"!sed -i 's|git+https://github.com/R3gm/whisperX.git@cuda_11_8|git+https://github.com/R3gm/whisperX.git@cuda_12_x|' requirements_base.txt\n",
|
63 |
-
"!pip install -q -r requirements_base.txt\n",
|
64 |
-
"!pip install -q -r requirements_extra.txt\n",
|
65 |
-
"!pip install -q ort-nightly-gpu --index-url=https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ort-cuda-12-nightly/pypi/simple/\n",
|
66 |
-
"\n",
|
67 |
-
"Install_PIPER_TTS = True # @param {type:\"boolean\"}\n",
|
68 |
-
"\n",
|
69 |
-
"if Install_PIPER_TTS:\n",
|
70 |
-
" !pip install -q piper-tts==1.2.0\n",
|
71 |
-
"\n",
|
72 |
-
"Install_Coqui_XTTS = True # @param {type:\"boolean\"}\n",
|
73 |
-
"\n",
|
74 |
-
"if Install_Coqui_XTTS:\n",
|
75 |
-
" !pip install -q -r requirements_xtts.txt\n",
|
76 |
-
" !pip install -q TTS==0.21.1 --no-deps"
|
77 |
-
]
|
78 |
-
},
|
79 |
-
{
|
80 |
-
"cell_type": "markdown",
|
81 |
-
"source": [
|
82 |
-
"One important step is to accept the license agreement for using Pyannote. You need to have an account on Hugging Face and `accept the license to use the models`: https://huggingface.co/pyannote/speaker-diarization and https://huggingface.co/pyannote/segmentation\n",
|
83 |
-
"\n",
|
84 |
-
"\n",
|
85 |
-
"\n",
|
86 |
-
"\n",
|
87 |
-
"Get your KEY TOKEN here: https://hf.co/settings/tokens"
|
88 |
-
],
|
89 |
-
"metadata": {
|
90 |
-
"id": "LTaTstXPXNg2"
|
91 |
-
}
|
92 |
-
},
|
93 |
-
{
|
94 |
-
"cell_type": "code",
|
95 |
-
"source": [
|
96 |
-
"#@markdown # `RUN THE WEB APP`\n",
|
97 |
-
"YOUR_HF_TOKEN = \"\" #@param {type:'string'}\n",
|
98 |
-
"%env YOUR_HF_TOKEN={YOUR_HF_TOKEN}\n",
|
99 |
-
"theme = \"Taithrah/Minimal\" # @param [\"Taithrah/Minimal\", \"aliabid94/new-theme\", \"gstaff/xkcd\", \"ParityError/LimeFace\", \"abidlabs/pakistan\", \"rottenlittlecreature/Moon_Goblin\", \"ysharma/llamas\", \"gradio/dracula_revamped\"]\n",
|
100 |
-
"interface_language = \"english\" # @param ['arabic', 'azerbaijani', 'chinese_zh_cn', 'english', 'french', 'german', 'hindi', 'indonesian', 'italian', 'japanese', 'korean', 'marathi', 'polish', 'portuguese', 'russian', 'spanish', 'swedish', 'turkish', 'ukrainian', 'vietnamese']\n",
|
101 |
-
"verbosity_level = \"info\" # @param [\"debug\", \"info\", \"warning\", \"error\", \"critical\"]\n",
|
102 |
-
"\n",
|
103 |
-
"\n",
|
104 |
-
"%cd /content/SoniTranslate\n",
|
105 |
-
"!python app_rvc.py --theme {theme} --verbosity_level {verbosity_level} --language {interface_language} --public_url"
|
106 |
-
],
|
107 |
-
"metadata": {
|
108 |
-
"id": "XkhXfaFw4R4J",
|
109 |
-
"cellView": "form"
|
110 |
-
},
|
111 |
-
"execution_count": null,
|
112 |
-
"outputs": []
|
113 |
-
},
|
114 |
-
{
|
115 |
-
"cell_type": "markdown",
|
116 |
-
"source": [
|
117 |
-
"Open the `public URL` when it appears"
|
118 |
-
],
|
119 |
-
"metadata": {
|
120 |
-
"id": "KJW3KrhZJh0u"
|
121 |
-
}
|
122 |
-
}
|
123 |
-
]
|
124 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|