Merge pull request #74 from w-okada/dev

Colaboratory を使用して作成しました
This commit is contained in:
w-okada 2022-10-28 20:59:27 +09:00 committed by GitHub
commit 57800f1b56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@
"name": "VoiceChangerDemo", "name": "VoiceChangerDemo",
"provenance": [], "provenance": [],
"collapsed_sections": [], "collapsed_sections": [],
"authorship_tag": "ABX9TyNIza7v0FnaVjOr14T3S+ej", "authorship_tag": "ABX9TyMDOY1O8+ZO4syUoyROebyQ",
"include_colab_link": true "include_colab_link": true
}, },
"kernelspec": { "kernelspec": {
@ -75,7 +75,7 @@
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
}, },
"id": "vV1t7PBRm-o6", "id": "vV1t7PBRm-o6",
"outputId": "5a33cb79-d771-43c4-8854-ac0fbc95a07c" "outputId": "89060978-5248-4e0d-fe05-a28d3f3edea7"
}, },
"execution_count": 1, "execution_count": 1,
"outputs": [ "outputs": [
@ -83,7 +83,7 @@
"output_type": "stream", "output_type": "stream",
"name": "stdout", "name": "stdout",
"text": [ "text": [
"Sun Sep 18 21:24:31 2022 \n", "Fri Oct 28 10:40:27 2022 \n",
"+-----------------------------------------------------------------------------+\n", "+-----------------------------------------------------------------------------+\n",
"| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |\n", "| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |\n",
"|-------------------------------+----------------------+----------------------+\n", "|-------------------------------+----------------------+----------------------+\n",
@ -92,7 +92,7 @@
"| | | MIG M. |\n", "| | | MIG M. |\n",
"|===============================+======================+======================|\n", "|===============================+======================+======================|\n",
"| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n", "| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n",
"| N/A 48C P8 10W / 70W | 0MiB / 15109MiB | 0% Default |\n", "| N/A 58C P8 11W / 70W | 0MiB / 15109MiB | 0% Default |\n",
"| | | N/A |\n", "| | | N/A |\n",
"+-------------------------------+----------------------+----------------------+\n", "+-------------------------------+----------------------+----------------------+\n",
" \n", " \n",
@ -141,7 +141,7 @@
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
}, },
"id": "2wxD-gRSMU5R", "id": "2wxD-gRSMU5R",
"outputId": "768bf916-9503-4e9a-acf9-2b744b5d8f9c" "outputId": "ca964df7-a165-4ee9-b076-d393383af4b0"
}, },
"outputs": [ "outputs": [
{ {
@ -172,6 +172,7 @@
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
"# (3) リポジトリのクローン\n", "# (3) リポジトリのクローン\n",
"!git clone --depth 1 https://github.com/isletennos/MMVC_Trainer.git -b v1.3.1.3 /MMVC_Trainer\n",
"!git clone --depth 1 https://github.com/w-okada/voice-changer.git\n", "!git clone --depth 1 https://github.com/w-okada/voice-changer.git\n",
"%cd voice-changer/demo/\n" "%cd voice-changer/demo/\n"
], ],
@ -180,7 +181,7 @@
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
}, },
"id": "86wTFmqsNMnD", "id": "86wTFmqsNMnD",
"outputId": "c6a23eb6-5f87-49d9-b9c7-da1bc937ae65" "outputId": "afa1e52b-2abf-418f-a5af-c60ba8b80390"
}, },
"execution_count": 4, "execution_count": 4,
"outputs": [ "outputs": [
@ -188,12 +189,30 @@
"output_type": "stream", "output_type": "stream",
"name": "stdout", "name": "stdout",
"text": [ "text": [
"Cloning into '/MMVC_Trainer'...\n",
"remote: Enumerating objects: 917, done.\u001b[K\n",
"remote: Counting objects: 100% (917/917), done.\u001b[K\n",
"remote: Compressing objects: 100% (828/828), done.\u001b[K\n",
"remote: Total 917 (delta 3), reused 888 (delta 0), pack-reused 0\u001b[K\n",
"Receiving objects: 100% (917/917), 53.02 MiB | 24.60 MiB/s, done.\n",
"Resolving deltas: 100% (3/3), done.\n",
"Note: checking out '39723b3243e0265b8802e020e4d4d90a4b8b65ee'.\n",
"\n",
"You are in 'detached HEAD' state. You can look around, make experimental\n",
"changes and commit them, and you can discard any commits you make in this\n",
"state without impacting any branches by performing another checkout.\n",
"\n",
"If you want to create a new branch to retain commits you create, you may\n",
"do so (now or later) by using -b with the checkout command again. Example:\n",
"\n",
" git checkout -b <new-branch-name>\n",
"\n",
"Cloning into 'voice-changer'...\n", "Cloning into 'voice-changer'...\n",
"remote: Enumerating objects: 101, done.\u001b[K\n", "remote: Enumerating objects: 104, done.\u001b[K\n",
"remote: Counting objects: 100% (101/101), done.\u001b[K\n", "remote: Counting objects: 100% (104/104), done.\u001b[K\n",
"remote: Compressing objects: 100% (87/87), done.\u001b[K\n", "remote: Compressing objects: 100% (90/90), done.\u001b[K\n",
"remote: Total 101 (delta 13), reused 70 (delta 6), pack-reused 0\u001b[K\n", "remote: Total 104 (delta 13), reused 72 (delta 6), pack-reused 0\u001b[K\n",
"Receiving objects: 100% (101/101), 18.97 MiB | 24.58 MiB/s, done.\n", "Receiving objects: 100% (104/104), 19.88 MiB | 26.37 MiB/s, done.\n",
"Resolving deltas: 100% (13/13), done.\n", "Resolving deltas: 100% (13/13), done.\n",
"/content/voice-changer/demo\n" "/content/voice-changer/demo\n"
] ]
@ -233,7 +252,7 @@
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
}, },
"id": "pjxPsOOaXXTj", "id": "pjxPsOOaXXTj",
"outputId": "609dfadb-6a26-46f4-8f6a-1066c5b3e458" "outputId": "045e93b0-611c-4e24-88d1-7539d6c5fa69"
}, },
"execution_count": 6, "execution_count": 6,
"outputs": [ "outputs": [
@ -247,8 +266,8 @@
" \"voice_changer_server_url\": \"/test\",\n", " \"voice_changer_server_url\": \"/test\",\n",
" \"sample_rate\": 48000,\n", " \"sample_rate\": 48000,\n",
" \"buffer_size\": 1024,\n", " \"buffer_size\": 1024,\n",
" \"prefix_chunk_size\": 24,\n", " \"prefix_chunk_size\": 36,\n",
" \"chunk_size\": 24,\n", " \"chunk_size\": 36,\n",
" \"speaker_ids\": [100, 107, 101, 102, 103],\n", " \"speaker_ids\": [100, 107, 101, 102, 103],\n",
" \"speaker_names\": [\"ずんだもん\", \"user\", \"そら\", \"めたん\", \"つむぎ\"],\n", " \"speaker_names\": [\"ずんだもん\", \"user\", \"そら\", \"めたん\", \"つむぎ\"],\n",
" \"src_id\": 107,\n", " \"src_id\": 107,\n",
@ -310,7 +329,7 @@
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
}, },
"id": "LwZAAuqxX7yY", "id": "LwZAAuqxX7yY",
"outputId": "86d84d90-21f2-4b6f-b939-a4a53d12a4e4" "outputId": "8d949e0f-1298-4c15-db5c-2dd68e942d52"
}, },
"execution_count": 7, "execution_count": 7,
"outputs": [ "outputs": [
@ -329,7 +348,7 @@
" espeak-data libespeak1 libportaudio2 libsonic0\n", " espeak-data libespeak1 libportaudio2 libsonic0\n",
"The following NEW packages will be installed:\n", "The following NEW packages will be installed:\n",
" espeak espeak-data libespeak1 libportaudio2 libsonic0\n", " espeak espeak-data libespeak1 libportaudio2 libsonic0\n",
"0 upgraded, 5 newly installed, 0 to remove and 20 not upgraded.\n", "0 upgraded, 5 newly installed, 0 to remove and 27 not upgraded.\n",
"Need to get 1,219 kB of archives.\n", "Need to get 1,219 kB of archives.\n",
"After this operation, 3,031 kB of additional disk space will be used.\n", "After this operation, 3,031 kB of additional disk space will be used.\n",
"Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libportaudio2 amd64 19.6.0-1 [64.6 kB]\n", "Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libportaudio2 amd64 19.6.0-1 [64.6 kB]\n",
@ -337,9 +356,9 @@
"Get:3 http://archive.ubuntu.com/ubuntu bionic/universe amd64 espeak-data amd64 1.48.04+dfsg-5 [934 kB]\n", "Get:3 http://archive.ubuntu.com/ubuntu bionic/universe amd64 espeak-data amd64 1.48.04+dfsg-5 [934 kB]\n",
"Get:4 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libespeak1 amd64 1.48.04+dfsg-5 [145 kB]\n", "Get:4 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libespeak1 amd64 1.48.04+dfsg-5 [145 kB]\n",
"Get:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 espeak amd64 1.48.04+dfsg-5 [61.6 kB]\n", "Get:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 espeak amd64 1.48.04+dfsg-5 [61.6 kB]\n",
"Fetched 1,219 kB in 1s (1,020 kB/s)\n", "Fetched 1,219 kB in 1s (827 kB/s)\n",
"Selecting previously unselected package libportaudio2:amd64.\n", "Selecting previously unselected package libportaudio2:amd64.\n",
"(Reading database ... 155569 files and directories currently installed.)\n", "(Reading database ... 123942 files and directories currently installed.)\n",
"Preparing to unpack .../libportaudio2_19.6.0-1_amd64.deb ...\n", "Preparing to unpack .../libportaudio2_19.6.0-1_amd64.deb ...\n",
"Unpacking libportaudio2:amd64 (19.6.0-1) ...\n", "Unpacking libportaudio2:amd64 (19.6.0-1) ...\n",
"Selecting previously unselected package libsonic0:amd64.\n", "Selecting previously unselected package libsonic0:amd64.\n",
@ -360,101 +379,101 @@
"Setting up libespeak1:amd64 (1.48.04+dfsg-5) ...\n", "Setting up libespeak1:amd64 (1.48.04+dfsg-5) ...\n",
"Setting up espeak (1.48.04+dfsg-5) ...\n", "Setting up espeak (1.48.04+dfsg-5) ...\n",
"Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n", "Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n",
"Processing triggers for libc-bin (2.27-3ubuntu1.5) ...\n", "Processing triggers for libc-bin (2.27-3ubuntu1.6) ...\n",
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting unidecode\n", "Collecting unidecode\n",
" Downloading Unidecode-1.3.4-py3-none-any.whl (235 kB)\n", " Downloading Unidecode-1.3.6-py3-none-any.whl (235 kB)\n",
"\u001b[K |████████████████████████████████| 235 kB 4.9 MB/s \n", "\u001b[K |████████████████████████████████| 235 kB 7.3 MB/s \n",
"\u001b[?25hInstalling collected packages: unidecode\n", "\u001b[?25hInstalling collected packages: unidecode\n",
"Successfully installed unidecode-1.3.4\n", "Successfully installed unidecode-1.3.6\n",
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting phonemizer\n", "Collecting phonemizer\n",
" Downloading phonemizer-3.2.1-py3-none-any.whl (90 kB)\n", " Downloading phonemizer-3.2.1-py3-none-any.whl (90 kB)\n",
"\u001b[K |████████████████████████████████| 90 kB 4.4 MB/s \n", "\u001b[K |████████████████████████████████| 90 kB 5.1 MB/s \n",
"\u001b[?25hCollecting dlinfo\n", "\u001b[?25hRequirement already satisfied: attrs>=18.1 in /usr/local/lib/python3.7/dist-packages (from phonemizer) (22.1.0)\n",
"Collecting dlinfo\n",
" Downloading dlinfo-1.2.1-py3-none-any.whl (3.6 kB)\n", " Downloading dlinfo-1.2.1-py3-none-any.whl (3.6 kB)\n",
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from phonemizer) (4.1.1)\n",
"Requirement already satisfied: joblib in /usr/local/lib/python3.7/dist-packages (from phonemizer) (1.1.0)\n",
"Requirement already satisfied: attrs>=18.1 in /usr/local/lib/python3.7/dist-packages (from phonemizer) (22.1.0)\n",
"Collecting segments\n", "Collecting segments\n",
" Downloading segments-2.2.1-py2.py3-none-any.whl (15 kB)\n", " Downloading segments-2.2.1-py2.py3-none-any.whl (15 kB)\n",
"Requirement already satisfied: joblib in /usr/local/lib/python3.7/dist-packages (from phonemizer) (1.2.0)\n",
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from phonemizer) (4.1.1)\n",
"Collecting clldutils>=1.7.3\n", "Collecting clldutils>=1.7.3\n",
" Downloading clldutils-3.12.0-py2.py3-none-any.whl (197 kB)\n", " Downloading clldutils-3.12.0-py2.py3-none-any.whl (197 kB)\n",
"\u001b[K |████████████████████████████████| 197 kB 24.2 MB/s \n", "\u001b[K |████████████████████████████████| 197 kB 43.7 MB/s \n",
"\u001b[?25hCollecting csvw>=1.5.6\n", "\u001b[?25hCollecting csvw>=1.5.6\n",
" Downloading csvw-3.1.1-py2.py3-none-any.whl (56 kB)\n", " Downloading csvw-3.1.2-py2.py3-none-any.whl (56 kB)\n",
"\u001b[K |████████████████████████████████| 56 kB 6.1 MB/s \n", "\u001b[K |████████████████████████████████| 56 kB 4.5 MB/s \n",
"\u001b[?25hRequirement already satisfied: regex in /usr/local/lib/python3.7/dist-packages (from segments->phonemizer) (2022.6.2)\n", "\u001b[?25hRequirement already satisfied: regex in /usr/local/lib/python3.7/dist-packages (from segments->phonemizer) (2022.6.2)\n",
"Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from clldutils>=1.7.3->segments->phonemizer) (2.8.2)\n",
"Collecting colorlog\n", "Collecting colorlog\n",
" Downloading colorlog-6.7.0-py2.py3-none-any.whl (11 kB)\n", " Downloading colorlog-6.7.0-py2.py3-none-any.whl (11 kB)\n",
"Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from clldutils>=1.7.3->segments->phonemizer) (2.8.2)\n",
"Requirement already satisfied: tabulate>=0.7.7 in /usr/local/lib/python3.7/dist-packages (from clldutils>=1.7.3->segments->phonemizer) (0.8.10)\n", "Requirement already satisfied: tabulate>=0.7.7 in /usr/local/lib/python3.7/dist-packages (from clldutils>=1.7.3->segments->phonemizer) (0.8.10)\n",
"Collecting language-tags\n", "Collecting rfc3986<2\n",
" Downloading language_tags-1.1.0-py2.py3-none-any.whl (210 kB)\n", " Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\n",
"\u001b[K |████████████████████████████████| 210 kB 66.4 MB/s \n",
"\u001b[?25hCollecting colorama\n",
" Downloading colorama-0.4.5-py2.py3-none-any.whl (16 kB)\n",
"Collecting rdflib\n",
" Downloading rdflib-6.2.0-py3-none-any.whl (500 kB)\n",
"\u001b[K |████████████████████████████████| 500 kB 67.8 MB/s \n",
"\u001b[?25hRequirement already satisfied: babel in /usr/local/lib/python3.7/dist-packages (from csvw>=1.5.6->segments->phonemizer) (2.10.3)\n",
"Requirement already satisfied: uritemplate>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from csvw>=1.5.6->segments->phonemizer) (3.0.1)\n", "Requirement already satisfied: uritemplate>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from csvw>=1.5.6->segments->phonemizer) (3.0.1)\n",
"Requirement already satisfied: jsonschema in /usr/local/lib/python3.7/dist-packages (from csvw>=1.5.6->segments->phonemizer) (4.3.3)\n",
"Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from csvw>=1.5.6->segments->phonemizer) (2.23.0)\n",
"Collecting isodate\n", "Collecting isodate\n",
" Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)\n", " Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)\n",
"\u001b[K |████████████████████████████████| 41 kB 702 kB/s \n", "\u001b[K |████████████████████████████████| 41 kB 635 kB/s \n",
"\u001b[?25hCollecting rfc3986<2\n", "\u001b[?25hRequirement already satisfied: babel in /usr/local/lib/python3.7/dist-packages (from csvw>=1.5.6->segments->phonemizer) (2.10.3)\n",
" Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\n", "Collecting colorama\n",
"Requirement already satisfied: pytz>=2015.7 in /usr/local/lib/python3.7/dist-packages (from babel->csvw>=1.5.6->segments->phonemizer) (2022.2.1)\n", " Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)\n",
"Requirement already satisfied: jsonschema in /usr/local/lib/python3.7/dist-packages (from csvw>=1.5.6->segments->phonemizer) (4.3.3)\n",
"Collecting language-tags\n",
" Downloading language_tags-1.1.0-py2.py3-none-any.whl (210 kB)\n",
"\u001b[K |████████████████████████████████| 210 kB 63.4 MB/s \n",
"\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from csvw>=1.5.6->segments->phonemizer) (2.23.0)\n",
"Collecting rdflib\n",
" Downloading rdflib-6.2.0-py3-none-any.whl (500 kB)\n",
"\u001b[K |████████████████████████████████| 500 kB 64.2 MB/s \n",
"\u001b[?25hRequirement already satisfied: pytz>=2015.7 in /usr/local/lib/python3.7/dist-packages (from babel->csvw>=1.5.6->segments->phonemizer) (2022.5)\n",
"Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from isodate->csvw>=1.5.6->segments->phonemizer) (1.15.0)\n", "Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from isodate->csvw>=1.5.6->segments->phonemizer) (1.15.0)\n",
"Requirement already satisfied: importlib-resources>=1.4.0 in /usr/local/lib/python3.7/dist-packages (from jsonschema->csvw>=1.5.6->segments->phonemizer) (5.9.0)\n", "Requirement already satisfied: importlib-resources>=1.4.0 in /usr/local/lib/python3.7/dist-packages (from jsonschema->csvw>=1.5.6->segments->phonemizer) (5.10.0)\n",
"Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from jsonschema->csvw>=1.5.6->segments->phonemizer) (4.13.0)\n",
"Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/local/lib/python3.7/dist-packages (from jsonschema->csvw>=1.5.6->segments->phonemizer) (0.18.1)\n", "Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/local/lib/python3.7/dist-packages (from jsonschema->csvw>=1.5.6->segments->phonemizer) (0.18.1)\n",
"Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from jsonschema->csvw>=1.5.6->segments->phonemizer) (4.12.0)\n", "Requirement already satisfied: zipp>=3.1.0 in /usr/local/lib/python3.7/dist-packages (from importlib-resources>=1.4.0->jsonschema->csvw>=1.5.6->segments->phonemizer) (3.9.0)\n",
"Requirement already satisfied: zipp>=3.1.0 in /usr/local/lib/python3.7/dist-packages (from importlib-resources>=1.4.0->jsonschema->csvw>=1.5.6->segments->phonemizer) (3.8.1)\n",
"Requirement already satisfied: pyparsing in /usr/local/lib/python3.7/dist-packages (from rdflib->csvw>=1.5.6->segments->phonemizer) (3.0.9)\n", "Requirement already satisfied: pyparsing in /usr/local/lib/python3.7/dist-packages (from rdflib->csvw>=1.5.6->segments->phonemizer) (3.0.9)\n",
"Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from rdflib->csvw>=1.5.6->segments->phonemizer) (57.4.0)\n", "Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from rdflib->csvw>=1.5.6->segments->phonemizer) (57.4.0)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->csvw>=1.5.6->segments->phonemizer) (2022.9.24)\n",
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->csvw>=1.5.6->segments->phonemizer) (1.24.3)\n", "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->csvw>=1.5.6->segments->phonemizer) (1.24.3)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->csvw>=1.5.6->segments->phonemizer) (3.0.4)\n", "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->csvw>=1.5.6->segments->phonemizer) (3.0.4)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->csvw>=1.5.6->segments->phonemizer) (2.10)\n", "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->csvw>=1.5.6->segments->phonemizer) (2.10)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->csvw>=1.5.6->segments->phonemizer) (2022.6.15)\n",
"Installing collected packages: isodate, rfc3986, rdflib, language-tags, colorama, csvw, colorlog, clldutils, segments, dlinfo, phonemizer\n", "Installing collected packages: isodate, rfc3986, rdflib, language-tags, colorama, csvw, colorlog, clldutils, segments, dlinfo, phonemizer\n",
"Successfully installed clldutils-3.12.0 colorama-0.4.5 colorlog-6.7.0 csvw-3.1.1 dlinfo-1.2.1 isodate-0.6.1 language-tags-1.1.0 phonemizer-3.2.1 rdflib-6.2.0 rfc3986-1.5.0 segments-2.2.1\n", "Successfully installed clldutils-3.12.0 colorama-0.4.6 colorlog-6.7.0 csvw-3.1.2 dlinfo-1.2.1 isodate-0.6.1 language-tags-1.1.0 phonemizer-3.2.1 rdflib-6.2.0 rfc3986-1.5.0 segments-2.2.1\n",
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting retry\n", "Collecting retry\n",
" Downloading retry-0.9.2-py2.py3-none-any.whl (8.0 kB)\n", " Downloading retry-0.9.2-py2.py3-none-any.whl (8.0 kB)\n",
"Requirement already satisfied: decorator>=3.4.2 in /usr/local/lib/python3.7/dist-packages (from retry) (4.4.2)\n",
"Requirement already satisfied: py<2.0.0,>=1.4.26 in /usr/local/lib/python3.7/dist-packages (from retry) (1.11.0)\n", "Requirement already satisfied: py<2.0.0,>=1.4.26 in /usr/local/lib/python3.7/dist-packages (from retry) (1.11.0)\n",
"Requirement already satisfied: decorator>=3.4.2 in /usr/local/lib/python3.7/dist-packages (from retry) (4.4.2)\n",
"Installing collected packages: retry\n", "Installing collected packages: retry\n",
"Successfully installed retry-0.9.2\n", "Successfully installed retry-0.9.2\n",
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting fastapi\n", "Collecting fastapi\n",
" Downloading fastapi-0.85.0-py3-none-any.whl (55 kB)\n", " Downloading fastapi-0.85.1-py3-none-any.whl (55 kB)\n",
"\u001b[K |████████████████████████████████| 55 kB 2.6 MB/s \n", "\u001b[K |████████████████████████████████| 55 kB 2.6 MB/s \n",
"\u001b[?25hRequirement already satisfied: pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2 in /usr/local/lib/python3.7/dist-packages (from fastapi) (1.9.2)\n", "\u001b[?25hRequirement already satisfied: pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2 in /usr/local/lib/python3.7/dist-packages (from fastapi) (1.10.2)\n",
"Collecting starlette==0.20.4\n", "Collecting starlette==0.20.4\n",
" Downloading starlette-0.20.4-py3-none-any.whl (63 kB)\n", " Downloading starlette-0.20.4-py3-none-any.whl (63 kB)\n",
"\u001b[K |████████████████████████████████| 63 kB 2.3 MB/s \n", "\u001b[K |████████████████████████████████| 63 kB 2.2 MB/s \n",
"\u001b[?25hCollecting anyio<5,>=3.4.0\n", "\u001b[?25hCollecting anyio<5,>=3.4.0\n",
" Downloading anyio-3.6.1-py3-none-any.whl (80 kB)\n", " Downloading anyio-3.6.2-py3-none-any.whl (80 kB)\n",
"\u001b[K |████████████████████████████████| 80 kB 11.3 MB/s \n", "\u001b[K |████████████████████████████████| 80 kB 9.9 MB/s \n",
"\u001b[?25hRequirement already satisfied: typing-extensions>=3.10.0 in /usr/local/lib/python3.7/dist-packages (from starlette==0.20.4->fastapi) (4.1.1)\n", "\u001b[?25hRequirement already satisfied: typing-extensions>=3.10.0 in /usr/local/lib/python3.7/dist-packages (from starlette==0.20.4->fastapi) (4.1.1)\n",
"Collecting sniffio>=1.1\n", "Collecting sniffio>=1.1\n",
" Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)\n", " Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)\n",
"Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.7/dist-packages (from anyio<5,>=3.4.0->starlette==0.20.4->fastapi) (2.10)\n", "Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.7/dist-packages (from anyio<5,>=3.4.0->starlette==0.20.4->fastapi) (2.10)\n",
"Installing collected packages: sniffio, anyio, starlette, fastapi\n", "Installing collected packages: sniffio, anyio, starlette, fastapi\n",
"Successfully installed anyio-3.6.1 fastapi-0.85.0 sniffio-1.3.0 starlette-0.20.4\n", "Successfully installed anyio-3.6.2 fastapi-0.85.1 sniffio-1.3.0 starlette-0.20.4\n",
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting uvicorn\n", "Collecting uvicorn\n",
" Downloading uvicorn-0.18.3-py3-none-any.whl (57 kB)\n", " Downloading uvicorn-0.19.0-py3-none-any.whl (56 kB)\n",
"\u001b[K |████████████████████████████████| 57 kB 2.8 MB/s \n", "\u001b[K |████████████████████████████████| 56 kB 3.3 MB/s \n",
"\u001b[?25hRequirement already satisfied: click>=7.0 in /usr/local/lib/python3.7/dist-packages (from uvicorn) (7.1.2)\n", "\u001b[?25hRequirement already satisfied: click>=7.0 in /usr/local/lib/python3.7/dist-packages (from uvicorn) (7.1.2)\n",
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from uvicorn) (4.1.1)\n",
"Collecting h11>=0.8\n", "Collecting h11>=0.8\n",
" Downloading h11-0.13.0-py3-none-any.whl (58 kB)\n", " Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
"\u001b[K |████████████████████████████████| 58 kB 6.0 MB/s \n", "\u001b[K |████████████████████████████████| 58 kB 6.7 MB/s \n",
"\u001b[?25hInstalling collected packages: h11, uvicorn\n", "\u001b[?25hRequirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from uvicorn) (4.1.1)\n",
"Successfully installed h11-0.13.0 uvicorn-0.18.3\n" "Installing collected packages: h11, uvicorn\n",
"Successfully installed h11-0.14.0 uvicorn-0.19.0\n"
] ]
} }
] ]
@ -511,13 +530,13 @@
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
"# (6-1) サーバの起動\n", "# (6-1) サーバの起動\n",
"PORT=8088\n", "PORT=8089\n",
"get_ipython().system_raw(f'python3 serverFastAPI.py {PORT} {CONFIG} {MODEL} >foo 2>&1 &')" "get_ipython().system_raw(f'python3 serverFastAPI.py {PORT} {CONFIG} {MODEL} >foo 2>&1 &')"
], ],
"metadata": { "metadata": {
"id": "iNOAB7zISI6J" "id": "iNOAB7zISI6J"
}, },
"execution_count": 8, "execution_count": 12,
"outputs": [] "outputs": []
}, },
{ {
@ -531,7 +550,7 @@
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
}, },
"id": "chu06KpAjEK6", "id": "chu06KpAjEK6",
"outputId": "babff101-af28-4b1f-8173-c067c6b21981" "outputId": "cbdb9e0b-8922-4612-daa9-dc5a0fe418af"
}, },
"execution_count": 17, "execution_count": 17,
"outputs": [ "outputs": [
@ -539,26 +558,26 @@
"output_type": "stream", "output_type": "stream",
"name": "stdout", "name": "stdout",
"text": [ "text": [
"INFO: Will watch for changes in these directories: ['/content/voice-changer/demo']\n", "POST REQUEST PROCESSING....\n",
"INFO:uvicorn.error:Will watch for changes in these directories: ['/content/voice-changer/demo']\n", "INFO: 127.0.0.1:38042 - \"POST /test HTTP/1.1\" 200 OK\n",
"INFO: Uvicorn running on http://0.0.0.0:8088 (Press CTRL+C to quit)\n", "POST REQUEST PROCESSING....\n",
"INFO:uvicorn.error:Uvicorn running on http://0.0.0.0:8088 (Press CTRL+C to quit)\n", "INFO: 127.0.0.1:38044 - \"POST /test HTTP/1.1\" 200 OK\n",
"INFO: Started reloader process [617] using StatReload\n", "POST REQUEST PROCESSING....\n",
"INFO:uvicorn.error:Started reloader process [617] using StatReload\n", "INFO: 127.0.0.1:38058 - \"POST /test HTTP/1.1\" 200 OK\n",
"INFO:uvicorn:INITIALIZE MODEL\n", "POST REQUEST PROCESSING....\n",
"GPU_NUM: 1\n", "INFO: 127.0.0.1:38064 - \"POST /test HTTP/1.1\" 200 OK\n",
"INFO:root:Loaded checkpoint '/content/drive/MyDrive/VoiceChanger/G_326000.pth' (iteration 1136)\n", "POST REQUEST PROCESSING....\n",
"DEBUG:asyncio:Using selector: EpollSelector\n", "INFO: 127.0.0.1:38078 - \"POST /test HTTP/1.1\" 200 OK\n",
"INFO: INITIALIZE MODEL\n", "POST REQUEST PROCESSING....\n",
"INFO:uvicorn:INITIALIZE MODEL\n", "INFO: 127.0.0.1:38084 - \"POST /test HTTP/1.1\" 200 OK\n",
"GPU_NUM: 1\n", "POST REQUEST PROCESSING....\n",
"INFO:root:Loaded checkpoint '/content/drive/MyDrive/VoiceChanger/G_326000.pth' (iteration 1136)\n", "INFO: 127.0.0.1:38086 - \"POST /test HTTP/1.1\" 200 OK\n",
"INFO: Started server process [637]\n", "POST REQUEST PROCESSING....\n",
"INFO:uvicorn.error:Started server process [637]\n", "INFO: 127.0.0.1:38098 - \"POST /test HTTP/1.1\" 200 OK\n",
"INFO: Waiting for application startup.\n", "POST REQUEST PROCESSING....\n",
"INFO:uvicorn.error:Waiting for application startup.\n", "INFO: 127.0.0.1:38114 - \"POST /test HTTP/1.1\" 200 OK\n",
"INFO: Application startup complete.\n", "POST REQUEST PROCESSING....\n",
"INFO:uvicorn.error:Application startup complete.\n" "INFO: 127.0.0.1:38118 - \"POST /test HTTP/1.1\" 200 OK\n"
] ]
} }
] ]
@ -591,7 +610,34 @@
"base_uri": "https://localhost:8080/", "base_uri": "https://localhost:8080/",
"height": 34 "height": 34
}, },
"outputId": "6a9869a8-7571-4eec-ce82-2da1859dd3b5" "outputId": "0d754079-4adb-41ba-e837-ee3ad11a59be"
},
"execution_count": 11,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"https://rjed3x0l87-496ff2e9c6d22116-8088-colab.googleusercontent.com/front/\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"# (7) プロキシを起動\n",
"from google.colab.output import eval_js\n",
"proxy = eval_js( \"google.colab.kernel.proxyPort(\" + str(PORT) + \")\" )\n",
"print(f\"{proxy}front/\")"
],
"metadata": {
"id": "3hwJmseXZhJY",
"outputId": "9cae2c74-26a9-4d53-f59e-d63f7f572a00",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
}
}, },
"execution_count": 18, "execution_count": 18,
"outputs": [ "outputs": [
@ -599,19 +645,10 @@
"output_type": "stream", "output_type": "stream",
"name": "stdout", "name": "stdout",
"text": [ "text": [
"https://b5ds0951k67-496ff2e9c6d22116-8088-colab.googleusercontent.com/front/\n" "https://5ywumdexzxm-496ff2e9c6d22116-8089-colab.googleusercontent.com/front/\n"
] ]
} }
] ]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "3hwJmseXZhJY"
},
"execution_count": null,
"outputs": []
} }
] ]
} }