Compare commits

...

4 Commits

6 changed files with 84 additions and 26 deletions

16
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Debug Main.py",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/main.py",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${workspaceFolder}"
},
"preLaunchTask": "Setup Environment",
}
]
}

12
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,12 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Setup Environment",
"type": "shell",
"command": "python",
"args": ["activate_env.py"],
"problemMatcher": []
}
]
}

9
activate_env.py Normal file
View File

@ -0,0 +1,9 @@
import subprocess
import os
# Ativa o ambiente virtual
subprocess.run([r'.\venv\Scripts\activate.bat'], shell=True)
# Configura as variáveis de ambiente
os.environ['PATH'] = r'.\bin;' + os.environ['PATH']
os.environ['PYTHONUTF8'] = '1'

View File

@ -38,10 +38,24 @@
],
"source":[
"!apt install python3.8-venv\n",
"!apt install python3.10-venv\n",
"!git clone https://git.ecker.tech/mrq/ai-voice-cloning/\n",
"%cd /content/ai-voice-cloning\n",
"!./setup-cuda.sh"
"# get local dependencies\n",
"!git submodule init\n",
"!git submodule update --remote\n",
"# setup venv\n",
"!python3 -m venv venv\n",
"!source ./venv/bin/activate\n",
"!python3 -m pip install --upgrade pip # just to be safe\n",
"# CUDA\n",
"!pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\n",
"# install requirements\n",
"!python3 -m pip install -r ./modules/tortoise-tts/requirements.txt # install TorToiSe requirements\n",
"!python3 -m pip install -e ./modules/tortoise-tts/ # install TorToiSe\n",
"!python3 -m pip install -r ./modules/dlas/requirements.txt # instal DLAS requirements, last, because whisperx will break a dependency here\n",
"!python3 -m pip install -e ./modules/dlas/ # install DLAS\n",
"!python3 -m pip install -r ./requirements.txt # install local requirements"
]
},
{
@ -115,7 +129,8 @@
"cell_type":"code",
"source":[
"%cd /content/ai-voice-cloning/\n",
"!./start.sh --share"
"!source ./venv/bin/activate\n",
"!python3 ./src/main.py --share"
],
"metadata":{
"id":"QRA8jF3cF-YJ"

View File

@ -1,5 +1,9 @@
git+https://github.com/openai/whisper.git
--extra-index-url https://download.pytorch.org/whl/cu118
torch>=2.1.0
torchvision
torchaudio
openai-whisper
more-itertools
ffmpeg-python
gradio<=3.23.0

View File

@ -371,7 +371,9 @@ def setup_gradio():
arg = GENERATE_SETTINGS_ARGS[i]
GENERATE_SETTINGS[arg] = None
with gr.Blocks() as ui:
with gr.Blocks(theme="freddyaboulton/dracula_revamped", css="footer { display: none!important}", title="Voice Clonning WebUI") as ui:
gr.Markdown("## 🤗🎙️ Voice clonning ")
gr.Markdown("Ai Voice clonning <a href='https://git.ecker.tech/terminator/ai-voice-cloning-terminator'>based on Tortoise</a>")
with gr.Tab("Generate"):
with gr.Row():
with gr.Column():