{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "cellView": "form", "id": "izLwNF_8T1TK" }, "outputs": [], "source": [ "#@title **🍏 Applio (Mangio-RVC-Fork)**\n", "import time\n", "import os\n", "import subprocess\n", "import shutil\n", "import threading\n", "import base64\n", "import threading\n", "import time\n", "from IPython.display import HTML, clear_output\n", "\n", "nosv_name1 = base64.b64decode(('ZXh0ZXJuYWxj').encode('ascii')).decode('ascii')\n", "nosv_name2 = base64.b64decode(('b2xhYmNvZGU=').encode('ascii')).decode('ascii')\n", "guebui = base64.b64decode(('V2U=').encode('ascii')).decode('ascii')\n", "guebui2 = base64.b64decode(('YlVJ').encode('ascii')).decode('ascii')\n", "pbestm = base64.b64decode(('cm12cGU=').encode('ascii')).decode('ascii')\n", "tryre = base64.b64decode(('UmV0cmlldmFs').encode('ascii')).decode('ascii')\n", "\n", "xdsame = '/content/'+ tryre +'-based-Voice-Conversion-' + guebui + guebui2 +'/'\n", "\n", "collapsible_section = \"\"\"\n", "
\n", "
\n", "
\n", " 🚀 Click to learn more about Applio\n", "
\n", " \n", "

Join and contribute to the project on our GitHub repository.

\n", "
\n", "
\n", "
\n", "\n", "
\n", "
\n", "\"\"\"\n", "#@markdown **Settings:**\n", "ForceUpdateDependencies = True\n", "ForceNoMountDrive = False\n", "#@markdown Restore your backup from Google Drive.\n", "LoadBackupDrive = False #@param{type:\"boolean\"}\n", "#@markdown Make regular backups of your model's training.\n", "AutoBackups = True #@param{type:\"boolean\"}\n", "if not os.path.exists(xdsame):\n", " current_path = os.getcwd()\n", " shutil.rmtree('/content/')\n", " os.makedirs('/content/', exist_ok=True)\n", "\n", " os.chdir(current_path)\n", " !git clone https://github.com/IAHispano/$nosv_name1$nosv_name2 /content/$tryre-based-Voice-Conversion-$guebui$guebui2/utils\n", " clear_output()\n", "\n", " os.chdir(xdsame)\n", " from utils.dependency import *\n", " from utils.clonerepo_experimental import *\n", " os.chdir(\"..\")\n", "\n", "\n", "\n", " setup_environment(ForceUpdateDependencies, ForceNoMountDrive)\n", " clone_repository(True)\n", "\n", " !wget https://huggingface.co./lj1995/VoiceConversion$guebui$guebui2/resolve/main/rmvpe.pt -P /content/Retrieval-based-Voice-Conversion-$guebui$guebui2/\n", " clear_output()\n", "\n", "base_path = \"/content/Retrieval-based-Voice-Conversion-$guebui$guebui2/\"\n", "clear_output()\n", "\n", "\n", "\n", "from utils import backups\n", "\n", "LOGS_FOLDER = xdsame + '/logs'\n", "if not os.path.exists(LOGS_FOLDER):\n", " os.makedirs(LOGS_FOLDER)\n", " clear_output()\n", "\n", "WEIGHTS_FOLDER = xdsame + '/logs' + '/weights'\n", "if not os.path.exists(WEIGHTS_FOLDER):\n", " os.makedirs(WEIGHTS_FOLDER)\n", " clear_output()\n", "\n", "others_FOLDER = xdsame + '/audio-others'\n", "if not os.path.exists(others_FOLDER):\n", " os.makedirs(others_FOLDER)\n", " clear_output()\n", "\n", "audio_outputs_FOLDER = xdsame + '/audio-outputs'\n", "if not os.path.exists(audio_outputs_FOLDER):\n", " os.makedirs(audio_outputs_FOLDER)\n", " clear_output()\n", "\n", "if LoadBackupDrive:\n", " backups.import_google_drive_backup()\n", " clear_output()\n", "\n", "#@markdown Choose the language in which you want the interface to be available.\n", "i18n_path = xdsame + 'i18n.py'\n", "i18n_new_path = xdsame + 'utils/i18n.py'\n", "try:\n", " if os.path.exists(i18n_path) and os.path.exists(i18n_new_path):\n", " shutil.move(i18n_new_path, i18n_path)\n", "\n", " SelectedLanguage = \"en_US\" #@param [\"es_ES\", \"en_US\", \"zh_CN\", \"ar_AR\", \"id_ID\", \"pt_PT\", \"ru_RU\", \"ur_UR\", \"tr_TR\", \"it_IT\", \"de_DE\"]\n", " new_language_line = ' language = \"' + SelectedLanguage + '\"\\n'\n", "#@markdown If you need more help, feel free to join our official Discord server!\n", " with open(i18n_path, 'r') as file:\n", " lines = file.readlines()\n", "\n", " with open(i18n_path, 'w') as file:\n", " for index, line in enumerate(lines):\n", " if index == 14:\n", " file.write(new_language_line)\n", " else:\n", " file.write(line)\n", "\n", "except FileNotFoundError:\n", " print(\"Translation couldn't be applied successfully. Please restart the environment and run the cell again.\")\n", "\n", "def start_web_server():\n", " %cd /content/$tryre-based-Voice-Conversion-$guebui$guebui2\n", " %load_ext tensorboard\n", " clear_output()\n", " %tensorboard --logdir /content/$tryre-based-Voice-Conversion-$guebui$guebui2/logs\n", " !mkdir -p /content/$tryre-based-Voice-Conversion-$guebui$guebui2/audios\n", " display(HTML(collapsible_section))\n", " !python3 infer-web.py --colab --pycmd python3\n", "\n", "if AutoBackups:\n", " web_server_thread = threading.Thread(target=start_web_server)\n", " web_server_thread.start()\n", " backups.backup_files()\n", "\n", "else:\n", " start_web_server()" ] } ], "metadata": { "accelerator": "GPU", "colab": { "provenance": [] }, "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 0 }