From 0b52d5604c9e448ad8c5254581b15da8b2aced97 Mon Sep 17 00:00:00 2001 From: w-okada <48346627+w-okada@users.noreply.github.com> Date: Mon, 19 Sep 2022 06:30:05 +0900 Subject: [PATCH] =?UTF-8?q?Colaboratory=20=E3=82=92=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E3=81=97=E3=81=A6=E4=BD=9C=E6=88=90=E3=81=97=E3=81=BE=E3=81=97?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VoiceChangerDemo.ipynb | 141 ++++++++++++++++++++++------------------- 1 file changed, 75 insertions(+), 66 deletions(-) diff --git a/VoiceChangerDemo.ipynb b/VoiceChangerDemo.ipynb index 21082e4ac..14ac6e9df 100644 --- a/VoiceChangerDemo.ipynb +++ b/VoiceChangerDemo.ipynb @@ -6,7 +6,7 @@ "name": "VoiceChangerDemo", "provenance": [], "collapsed_sections": [], - "authorship_tag": "ABX9TyPQVvmTXG6Vvab5wZAa6lKO", + "authorship_tag": "ABX9TyNIza7v0FnaVjOr14T3S+ej", "include_colab_link": true }, "kernelspec": { @@ -75,7 +75,7 @@ "base_uri": "https://localhost:8080/" }, "id": "vV1t7PBRm-o6", - "outputId": "ab215746-b0f6-4efc-e7bd-d05a2d88d28e" + "outputId": "5a33cb79-d771-43c4-8854-ac0fbc95a07c" }, "execution_count": 1, "outputs": [ @@ -83,7 +83,7 @@ "output_type": "stream", "name": "stdout", "text": [ - "Sun Sep 18 21:17:24 2022 \n", + "Sun Sep 18 21:24:31 2022 \n", "+-----------------------------------------------------------------------------+\n", "| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |\n", "|-------------------------------+----------------------+----------------------+\n", @@ -92,7 +92,7 @@ "| | | MIG M. |\n", "|===============================+======================+======================|\n", "| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n", - "| N/A 45C P8 10W / 70W | 0MiB / 15109MiB | 0% Default |\n", + "| N/A 48C P8 10W / 70W | 0MiB / 15109MiB | 0% Default |\n", "| | | N/A |\n", "+-------------------------------+----------------------+----------------------+\n", " \n", @@ -141,7 +141,7 @@ "base_uri": "https://localhost:8080/" }, "id": "2wxD-gRSMU5R", - "outputId": "88042619-b3bd-4a2f-da14-618a84f0180b" + "outputId": "768bf916-9503-4e9a-acf9-2b744b5d8f9c" }, "outputs": [ { @@ -180,7 +180,7 @@ "base_uri": "https://localhost:8080/" }, "id": "86wTFmqsNMnD", - "outputId": "8176d9e8-8b4a-4802-ff64-81e3fddf50bb" + "outputId": "c6a23eb6-5f87-49d9-b9c7-da1bc937ae65" }, "execution_count": 4, "outputs": [ @@ -193,7 +193,7 @@ "remote: Counting objects: 100% (101/101), done.\u001b[K\n", "remote: Compressing objects: 100% (87/87), done.\u001b[K\n", "remote: Total 101 (delta 13), reused 70 (delta 6), pack-reused 0\u001b[K\n", - "Receiving objects: 100% (101/101), 18.97 MiB | 22.69 MiB/s, done.\n", + "Receiving objects: 100% (101/101), 18.97 MiB | 24.58 MiB/s, done.\n", "Resolving deltas: 100% (13/13), done.\n", "/content/voice-changer/demo\n" ] @@ -233,7 +233,7 @@ "base_uri": "https://localhost:8080/" }, "id": "pjxPsOOaXXTj", - "outputId": "9b387b49-034a-43ad-9fb2-1437504b5821" + "outputId": "609dfadb-6a26-46f4-8f6a-1066c5b3e458" }, "execution_count": 6, "outputs": [ @@ -310,7 +310,7 @@ "base_uri": "https://localhost:8080/" }, "id": "LwZAAuqxX7yY", - "outputId": "3c4e46d7-e889-4713-c4bd-04734141bcb6" + "outputId": "86d84d90-21f2-4b6f-b939-a4a53d12a4e4" }, "execution_count": 7, "outputs": [ @@ -337,7 +337,7 @@ "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: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 0s (3,033 kB/s)\n", + "Fetched 1,219 kB in 1s (1,020 kB/s)\n", "Selecting previously unselected package libportaudio2:amd64.\n", "(Reading database ... 155569 files and directories currently installed.)\n", "Preparing to unpack .../libportaudio2_19.6.0-1_amd64.deb ...\n", @@ -364,60 +364,60 @@ "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", "Collecting unidecode\n", " Downloading Unidecode-1.3.4-py3-none-any.whl (235 kB)\n", - "\u001b[K |████████████████████████████████| 235 kB 4.8 MB/s \n", + "\u001b[K |████████████████████████████████| 235 kB 4.9 MB/s \n", "\u001b[?25hInstalling collected packages: unidecode\n", "Successfully installed unidecode-1.3.4\n", "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", "Collecting phonemizer\n", " Downloading phonemizer-3.2.1-py3-none-any.whl (90 kB)\n", - "\u001b[K |████████████████████████████████| 90 kB 4.3 MB/s \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", + "\u001b[K |████████████████████████████████| 90 kB 4.4 MB/s \n", + "\u001b[?25hCollecting dlinfo\n", " Downloading dlinfo-1.2.1-py3-none-any.whl (3.6 kB)\n", - "Requirement already satisfied: joblib in /usr/local/lib/python3.7/dist-packages (from phonemizer) (1.1.0)\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", " Downloading segments-2.2.1-py2.py3-none-any.whl (15 kB)\n", "Collecting clldutils>=1.7.3\n", " Downloading clldutils-3.12.0-py2.py3-none-any.whl (197 kB)\n", - "\u001b[K |████████████████████████████████| 197 kB 27.4 MB/s \n", + "\u001b[K |████████████████████████████████| 197 kB 24.2 MB/s \n", "\u001b[?25hCollecting csvw>=1.5.6\n", " Downloading csvw-3.1.1-py2.py3-none-any.whl (56 kB)\n", - "\u001b[K |████████████████████████████████| 56 kB 4.9 MB/s \n", + "\u001b[K |████████████████████████████████| 56 kB 6.1 MB/s \n", "\u001b[?25hRequirement already satisfied: regex in /usr/local/lib/python3.7/dist-packages (from segments->phonemizer) (2022.6.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: python-dateutil in /usr/local/lib/python3.7/dist-packages (from clldutils>=1.7.3->segments->phonemizer) (2.8.2)\n", "Collecting colorlog\n", " Downloading colorlog-6.7.0-py2.py3-none-any.whl (11 kB)\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", " Downloading language_tags-1.1.0-py2.py3-none-any.whl (210 kB)\n", - "\u001b[K |████████████████████████████████| 210 kB 58.6 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 colorama\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 rfc3986<2\n", - " Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\n", "Collecting rdflib\n", " Downloading rdflib-6.2.0-py3-none-any.whl (500 kB)\n", - "\u001b[K |████████████████████████████████| 500 kB 59.1 MB/s \n", - "\u001b[?25hCollecting isodate\n", - " Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)\n", - "\u001b[K |████████████████████████████████| 41 kB 649 kB/s \n", - "\u001b[?25hRequirement 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: babel in /usr/local/lib/python3.7/dist-packages (from csvw>=1.5.6->segments->phonemizer) (2.10.3)\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: 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", + " Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)\n", + "\u001b[K |████████████████████████████████| 41 kB 702 kB/s \n", + "\u001b[?25hCollecting rfc3986<2\n", + " Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\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", "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-metadata in /usr/local/lib/python3.7/dist-packages (from jsonschema->csvw>=1.5.6->segments->phonemizer) (4.12.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: 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: 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.8.1)\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: pyparsing in /usr/local/lib/python3.7/dist-packages (from rdflib->csvw>=1.5.6->segments->phonemizer) (3.0.9)\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: setuptools in /usr/local/lib/python3.7/dist-packages (from rdflib->csvw>=1.5.6->segments->phonemizer) (57.4.0)\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: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->csvw>=1.5.6->segments->phonemizer) (2022.6.15)\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: 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", "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", "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", @@ -430,18 +430,18 @@ "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", "Collecting fastapi\n", " Downloading fastapi-0.85.0-py3-none-any.whl (55 kB)\n", - "\u001b[K |████████████████████████████████| 55 kB 2.2 MB/s \n", - "\u001b[?25hCollecting starlette==0.20.4\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", + "Collecting starlette==0.20.4\n", " Downloading starlette-0.20.4-py3-none-any.whl (63 kB)\n", "\u001b[K |████████████████████████████████| 63 kB 2.3 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", - "Requirement 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 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", - "\u001b[K |████████████████████████████████| 80 kB 9.1 MB/s \n", - "\u001b[?25hRequirement 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", + "\u001b[K |████████████████████████████████| 80 kB 11.3 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", "Collecting sniffio>=1.1\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", "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", "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", @@ -452,7 +452,7 @@ "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from uvicorn) (4.1.1)\n", "Collecting h11>=0.8\n", " Downloading h11-0.13.0-py3-none-any.whl (58 kB)\n", - "\u001b[K |████████████████████████████████| 58 kB 5.8 MB/s \n", + "\u001b[K |████████████████████████████████| 58 kB 6.0 MB/s \n", "\u001b[?25hInstalling collected packages: h11, uvicorn\n", "Successfully installed h11-0.13.0 uvicorn-0.18.3\n" ] @@ -474,23 +474,32 @@ "\n", "下記のようなテキストが表示されたら起動完了です。\n", "\n", + "**`Application startup complete`**\n", + "\n", + "という文字列で完了です。`uvicorn.error`という不穏なメッセージも見られますが、これはプロセスの名前で大して重要な意味を持ちませんので無視してください。(どうやったら消せるのだろうか。)\n", + "\n", + "\n", "```\n", - "[2022-08-31 06:48:38,064] INFO in serverFlask: INITIALIZE MODEL\n", - "[2022-08-31 06:48:45,660] INFO in utils: Loaded checkpoint '/content/drive/MyDrive/VoiceChanger/G_326000.pth' (iteration 1136)\n", - "[2022-08-31 06:48:57,329] INFO in serverFlask: START APP\n", + "INFO: Will watch for changes in these directories: ['/content/voice-changer/demo']\n", + "INFO:uvicorn.error:Will watch for changes in these directories: ['/content/voice-changer/demo']\n", + "INFO: Uvicorn running on http://0.0.0.0:8088 (Press CTRL+C to quit)\n", + "INFO:uvicorn.error:Uvicorn running on http://0.0.0.0:8088 (Press CTRL+C to quit)\n", + "INFO: Started reloader process [617] using StatReload\n", + "INFO:uvicorn.error:Started reloader process [617] using StatReload\n", + "INFO:uvicorn:INITIALIZE MODEL\n", + "GPU_NUM: 1\n", + "INFO:root:Loaded checkpoint '/content/drive/MyDrive/VoiceChanger/G_326000.pth' (iteration 1136)\n", + "DEBUG:asyncio:Using selector: EpollSelector\n", + "INFO: INITIALIZE MODEL\n", + "INFO:uvicorn:INITIALIZE MODEL\n", "GPU_NUM: 1\n", - " * Serving Flask app \"serverFlask\" (lazy loading)\n", - " * Environment: production\n", - " WARNING: This is a development server. Do not use it in a production deployment.\n", - " Use a production WSGI server instead.\n", - " * Debug mode: on\n", - "[2022-08-31 06:48:57,336] INFO in _internal: * Running on http://0.0.0.0:8082/ (Press CTRL+C to quit)\n", - "[2022-08-31 06:48:57,337] INFO in _internal: * Restarting with stat\n", - "[2022-08-31 06:48:59,283] INFO in serverFlask: INITIALIZE MODEL\n", - "[2022-08-31 06:49:01,125] INFO in utils: Loaded checkpoint '/content/drive/MyDrive/VoiceChanger/G_326000.pth' (iteration 1136)\n", - "[2022-08-31 06:49:04,996] INFO in serverFlask: START APP\n", - "[2022-08-31 06:49:05,002] WARNING in _internal: * Debugger is active!\n", - "[2022-08-31 06:49:05,074] INFO in _internal: * Debugger PIN: 879-442-767\n", + "INFO:root:Loaded checkpoint '/content/drive/MyDrive/VoiceChanger/G_326000.pth' (iteration 1136)\n", + "INFO: Started server process [637]\n", + "INFO:uvicorn.error:Started server process [637]\n", + "INFO: Waiting for application startup.\n", + "INFO:uvicorn.error:Waiting for application startup.\n", + "INFO: Application startup complete.\n", + "INFO:uvicorn.error:Application startup complete.\n", "```\n", "\n" ], @@ -522,9 +531,9 @@ "base_uri": "https://localhost:8080/" }, "id": "chu06KpAjEK6", - "outputId": "cc836667-5f87-49a2-e6f1-397c10d28a7e" + "outputId": "babff101-af28-4b1f-8173-c067c6b21981" }, - "execution_count": 14, + "execution_count": 17, "outputs": [ { "output_type": "stream", @@ -534,8 +543,8 @@ "INFO:uvicorn.error:Will watch for changes in these directories: ['/content/voice-changer/demo']\n", "INFO: Uvicorn running on http://0.0.0.0:8088 (Press CTRL+C to quit)\n", "INFO:uvicorn.error:Uvicorn running on http://0.0.0.0:8088 (Press CTRL+C to quit)\n", - "INFO: Started reloader process [633] using StatReload\n", - "INFO:uvicorn.error:Started reloader process [633] using StatReload\n", + "INFO: Started reloader process [617] using StatReload\n", + "INFO:uvicorn.error:Started reloader process [617] using StatReload\n", "INFO:uvicorn:INITIALIZE MODEL\n", "GPU_NUM: 1\n", "INFO:root:Loaded checkpoint '/content/drive/MyDrive/VoiceChanger/G_326000.pth' (iteration 1136)\n", @@ -544,8 +553,8 @@ "INFO:uvicorn:INITIALIZE MODEL\n", "GPU_NUM: 1\n", "INFO:root:Loaded checkpoint '/content/drive/MyDrive/VoiceChanger/G_326000.pth' (iteration 1136)\n", - "INFO: Started server process [654]\n", - "INFO:uvicorn.error:Started server process [654]\n", + "INFO: Started server process [637]\n", + "INFO:uvicorn.error:Started server process [637]\n", "INFO: Waiting for application startup.\n", "INFO:uvicorn.error:Waiting for application startup.\n", "INFO: Application startup complete.\n", @@ -582,15 +591,15 @@ "base_uri": "https://localhost:8080/", "height": 34 }, - "outputId": "ec343c63-c165-4375-d7a4-05b02c3c36b1" + "outputId": "6a9869a8-7571-4eec-ce82-2da1859dd3b5" }, - "execution_count": 15, + "execution_count": 18, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "https://1bhiamr2dnh-496ff2e9c6d22116-8088-colab.googleusercontent.com/front/\n" + "https://b5ds0951k67-496ff2e9c6d22116-8088-colab.googleusercontent.com/front/\n" ] } ]