diff --git a/Hina_Modified_Realtime_Voice_Changer_on_Colab.ipynb b/Hina_Modified_Realtime_Voice_Changer_on_Colab.ipynb index 63aa882d..8b068ed6 100644 --- a/Hina_Modified_Realtime_Voice_Changer_on_Colab.ipynb +++ b/Hina_Modified_Realtime_Voice_Changer_on_Colab.ipynb @@ -308,7 +308,8 @@ "Image(url=icon_link)" ], "metadata": { - "id": "_ZtbKUVUgN3G" + "id": "_ZtbKUVUgN3G", + "cellView": "form" }, "execution_count": null, "outputs": [] @@ -420,65 +421,6 @@ " --samples samples.json\n", "\n" ] - }, - { - "cell_type": "code", - "source": [ - "# @title **[Optional]** Start Server **using localtunnel** (ngrok alternative | no account needed)\n", - "# @markdown This cell will start the server, the first time that you run it will download the models, so it can take a while (~1-2 minutes)\n", - "\n", - "# @markdown ---\n", - "!npm config set update-notifier false\n", - "!npm install -g localtunnel\n", - "print(\"\\033[92mLocalTunnel installed!\")\n", - "# @markdown If you want to automatically clear the output when the server loads, check this option.\n", - "Clear_Output = True # @param {type:\"boolean\"}\n", - "\n", - "import portpicker, subprocess, threading, time, socket, urllib.request\n", - "PORT = portpicker.pick_unused_port()\n", - "\n", - "from IPython.display import clear_output, Javascript\n", - "\n", - "def iframe_thread(port):\n", - " while True:\n", - " time.sleep(0.5)\n", - " sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n", - " result = sock.connect_ex(('127.0.0.1', port))\n", - " if result == 0:\n", - " break\n", - " sock.close()\n", - " clear_output()\n", - " print(\"Use the following endpoint to connect to localtunnel:\", urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"))\n", - " p = subprocess.Popen([\"lt\", \"--port\", \"{}\".format(port)], stdout=subprocess.PIPE)\n", - " for line in p.stdout:\n", - " print(line.decode(), end='')\n", - "\n", - "threading.Thread(target=iframe_thread, daemon=True, args=(PORT,)).start()\n", - "\n", - "\n", - "!python3 MMVCServerSIO.py \\\n", - " -p {PORT} \\\n", - " --https False \\\n", - " --content_vec_500 pretrain/checkpoint_best_legacy_500.pt \\\n", - " --content_vec_500_onnx pretrain/content_vec_500.onnx \\\n", - " --content_vec_500_onnx_on true \\\n", - " --hubert_base pretrain/hubert_base.pt \\\n", - " --hubert_base_jp pretrain/rinna_hubert_base_jp.pt \\\n", - " --hubert_soft pretrain/hubert/hubert-soft-0d54a1f4.pt \\\n", - " --nsf_hifigan pretrain/nsf_hifigan/model \\\n", - " --crepe_onnx_full pretrain/crepe_onnx_full.onnx \\\n", - " --crepe_onnx_tiny pretrain/crepe_onnx_tiny.onnx \\\n", - " --rmvpe pretrain/rmvpe.pt \\\n", - " --model_dir model_dir \\\n", - " --samples samples.json \\\n", - " --colab True" - ], - "metadata": { - "cellView": "form", - "id": "ZwZaCf4BeZi2" - }, - "execution_count": null, - "outputs": [] } ], "metadata": {