2022-08-31 09:21:16 +03:00
|
|
|
|
{
|
|
|
|
|
"nbformat": 4,
|
|
|
|
|
"nbformat_minor": 0,
|
|
|
|
|
"metadata": {
|
|
|
|
|
"colab": {
|
|
|
|
|
"name": "VoiceChangerDemo",
|
|
|
|
|
"provenance": [],
|
|
|
|
|
"collapsed_sections": [],
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"authorship_tag": "ABX9TyOqAC5jM8X3OXyG33Xs6lZ3",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"include_colab_link": true
|
|
|
|
|
},
|
|
|
|
|
"kernelspec": {
|
|
|
|
|
"name": "python3",
|
|
|
|
|
"display_name": "Python 3"
|
|
|
|
|
},
|
|
|
|
|
"language_info": {
|
|
|
|
|
"name": "python"
|
|
|
|
|
},
|
|
|
|
|
"accelerator": "GPU",
|
|
|
|
|
"gpuClass": "standard"
|
|
|
|
|
},
|
|
|
|
|
"cells": [
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "view-in-github",
|
|
|
|
|
"colab_type": "text"
|
|
|
|
|
},
|
|
|
|
|
"source": [
|
|
|
|
|
"<a href=\"https://colab.research.google.com/github/w-okada/voice-changer/blob/dev/VoiceChangerDemo.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-08-31 09:27:34 +03:00
|
|
|
|
{
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"cell_type": "markdown",
|
2022-08-31 09:27:34 +03:00
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"Voice Changer (デモ版)\n",
|
|
|
|
|
"---\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"このノートはVoice ChangerをColab上で動かすデモ版です。\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"正式版はローカルPCのDocker上で動かすアプリケーションです。\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"正式版は、多くの場合より少ないタイムラグで滑らかに音声を変換できます。\n",
|
|
|
|
|
"\n",
|
2022-08-31 13:55:50 +03:00
|
|
|
|
"詳細な使用方法はこちらの[リポジトリ](https://github.com/w-okada/voice-changer)からご確認ください。\n"
|
2022-08-31 09:27:34 +03:00
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"id": "Lbbmx_Vjl0zo"
|
|
|
|
|
}
|
2022-08-31 09:27:34 +03:00
|
|
|
|
},
|
2022-08-31 09:21:16 +03:00
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"source": [
|
|
|
|
|
"# GPUを確認\n",
|
|
|
|
|
"GPUを用いたほうが高速に処理が行えます。\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"下記のコマンドでGPUが確認できない場合は、上のメニューから\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"「ランタイム」→「ランタイムの変更」→「ハードウェア アクセラレータ」\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"でGPUを選択してください。"
|
|
|
|
|
],
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"metadata": {
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"id": "oUKi1NYMmXrr"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (1) GPUの確認\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"!nvidia-smi"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"colab": {
|
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
|
},
|
|
|
|
|
"id": "vV1t7PBRm-o6",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"outputId": "a0132696-071b-431b-8b6b-ce7665587dfb"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 1,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"text": [
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Fri Sep 2 03:08:06 2022 \n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"+-----------------------------------------------------------------------------+\n",
|
|
|
|
|
"| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |\n",
|
|
|
|
|
"|-------------------------------+----------------------+----------------------+\n",
|
|
|
|
|
"| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n",
|
|
|
|
|
"| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n",
|
|
|
|
|
"| | | MIG M. |\n",
|
|
|
|
|
"|===============================+======================+======================|\n",
|
|
|
|
|
"| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"| N/A 57C P8 11W / 70W | 0MiB / 15109MiB | 0% Default |\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"| | | N/A |\n",
|
|
|
|
|
"+-------------------------------+----------------------+----------------------+\n",
|
|
|
|
|
" \n",
|
|
|
|
|
"+-----------------------------------------------------------------------------+\n",
|
|
|
|
|
"| Processes: |\n",
|
|
|
|
|
"| GPU GI CI PID Type Process name GPU Memory |\n",
|
|
|
|
|
"| ID ID Usage |\n",
|
|
|
|
|
"|=============================================================================|\n",
|
|
|
|
|
"| No running processes found |\n",
|
|
|
|
|
"+-----------------------------------------------------------------------------+\n"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-08-31 09:59:55 +03:00
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"source": [
|
|
|
|
|
"# 使用するモデルとコンフィグファイルの指定\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"使用するトレーニング済みのモデルと、トレーニングで使用したコンフィグファイルのパスを指定してください。\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"多くの場合はGoogle Driveに格納されているファイルを使用すると思います。その場合は、下の(2-2)のセルを実行してドライブをマウントしてください"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "mHvGrgaWnIPA"
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-08-31 09:21:16 +03:00
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (2-1) 使用するモデルとコンフィグファイルの指定\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"CONFIG=\"/content/drive/MyDrive/VoiceChanger/config.json\"\n",
|
|
|
|
|
"MODEL=\"/content/drive/MyDrive/VoiceChanger/G_326000.pth\""
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "nSXATMWYb4Ik"
|
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 2,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"outputs": []
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 3,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"metadata": {
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"colab": {
|
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
|
},
|
|
|
|
|
"id": "2wxD-gRSMU5R",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"outputId": "3541bafd-bc9a-447f-fae7-45d301c4f950"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
},
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"text": [
|
|
|
|
|
"Mounted at /content/drive\n"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (2-2) Google Driveのマウント\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"from google.colab import drive\n",
|
|
|
|
|
"drive.mount('/content/drive')"
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-08-31 09:59:55 +03:00
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"source": [
|
|
|
|
|
"# リポジトリのクローン\n",
|
|
|
|
|
"リポジトリをクローンします"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "sLBfykjBnjWc"
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-08-31 09:21:16 +03:00
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (3) リポジトリのクローン\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"!git clone https://github.com/w-okada/voice-changer.git\n",
|
|
|
|
|
"%cd voice-changer/demo/\n"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"colab": {
|
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
|
},
|
|
|
|
|
"id": "86wTFmqsNMnD",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"outputId": "d27d12ec-482b-43bf-89a1-6ef3a1697d51"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 4,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"text": [
|
|
|
|
|
"Cloning into 'voice-changer'...\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"remote: Enumerating objects: 354, done.\u001b[K\n",
|
|
|
|
|
"remote: Counting objects: 100% (76/76), done.\u001b[K\n",
|
|
|
|
|
"remote: Compressing objects: 100% (59/59), done.\u001b[K\n",
|
|
|
|
|
"remote: Total 354 (delta 29), reused 40 (delta 17), pack-reused 278\u001b[K\n",
|
|
|
|
|
"Receiving objects: 100% (354/354), 20.87 MiB | 29.89 MiB/s, done.\n",
|
|
|
|
|
"Resolving deltas: 100% (165/165), done.\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"/content/voice-changer/demo\n"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"cell_type": "markdown",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# ファイルの配置\n",
|
|
|
|
|
"このデモでは、GUIをWebサーバで提供します。WebサーバからGUIのファイルにアクセスできるようにファイルをコピーします(4-1)。\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"また、アプリケーションの挙動を記した設定ファイルもコピーします(4-2)。(4-3)はコピーした設定ファイルを表示しています。もしかしたらうまく動かないときに役立つかもしれません。"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"id": "jmDY8W_fnuSi"
|
|
|
|
|
}
|
2022-08-31 09:21:16 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (4-1) GUIファイルの配置 \n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"!mkdir -p ../frontend/dist\n",
|
|
|
|
|
"!cp -r ../docs/* ../frontend/dist/\n",
|
|
|
|
|
"!ls ../frontend/dist\n"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"colab": {
|
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
|
},
|
|
|
|
|
"id": "uCEKf3_JNoyq",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"outputId": "02cd1120-18e0-4f21-e18f-709d5a47dbdd"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 5,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"text": [
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"assets\tcoffee.png favicon.ico index.html index.js index.js.LICENSE.txt\n"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (4-2) 設定ファイルの配置\n",
|
|
|
|
|
"!cp ../template/setting_colab.json ../frontend/dist/assets/setting.json\n"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "Bn4kV8TgXp8i"
|
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 6,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"outputs": []
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (4-3) 設定ファイルの確認\n",
|
|
|
|
|
"!cat ../frontend/dist/assets/setting.json\n"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"colab": {
|
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
|
},
|
|
|
|
|
"id": "pjxPsOOaXXTj",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"outputId": "737a639b-3cf6-4ce1-84e0-27ad88f252d0"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 7,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"text": [
|
|
|
|
|
"{\n",
|
|
|
|
|
" \"app_title\": \"voice-changer\",\n",
|
|
|
|
|
" \"majar_mode\": \"colab\",\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
" \"voice_changer_server_url\": \"./test\",\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
" \"sample_rate\": 48000,\n",
|
|
|
|
|
" \"buffer_size\": 1024,\n",
|
|
|
|
|
" \"prefix_chunk_size\": 24,\n",
|
|
|
|
|
" \"chunk_size\": 24,\n",
|
|
|
|
|
" \"speaker_ids\": [100, 107, 101, 102, 103],\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
" \"speaker_names\": [\"ずんだもん\", \"user\", \"そら\", \"めたん\", \"つむぎ\"],\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
" \"src_id\": 107,\n",
|
|
|
|
|
" \"dst_id\": 100,\n",
|
|
|
|
|
" \"vf_enable\": true,\n",
|
|
|
|
|
" \"voice_changer_mode\": \"realtime\",\n",
|
|
|
|
|
" \"gpu\": 0,\n",
|
|
|
|
|
" \"available_gpus\": [-1, 0, 1, 2, 3, 4],\n",
|
|
|
|
|
" \"avatar\": {\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
" \"enable_avatar\": true, \n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
" \"motion_capture_face\": true,\n",
|
|
|
|
|
" \"motion_capture_upperbody\": true,\n",
|
|
|
|
|
" \"lip_overwrite_with_voice\": true,\n",
|
|
|
|
|
" \"avatar_url\": \"./assets/vrm/zundamon/zundamon.vrm\",\n",
|
|
|
|
|
" \"backgournd_image_url\": \"./assets/images/bg_natural_sougen.jpg\",\n",
|
|
|
|
|
" \"background_color\": \"#0000dd\",\n",
|
|
|
|
|
" \"chroma_key\": \"#0000dd\",\n",
|
|
|
|
|
" \"avatar_canvas_size\": [1280, 720],\n",
|
|
|
|
|
" \"screen_canvas_size\": [1280, 720]\n",
|
|
|
|
|
" },\n",
|
|
|
|
|
" \"advance\": {\n",
|
|
|
|
|
" \"avatar_draw_skip_rate\": 3,\n",
|
|
|
|
|
" \"screen_draw_skip_rate\": 3,\n",
|
|
|
|
|
" \"visualizer_draw_skip_rate\": 3,\n",
|
|
|
|
|
" \"cross_fade_lower_value\": 0.1,\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
" \"cross_fade_offset_rate\": 0.3,\n",
|
|
|
|
|
" \"cross_fade_end_rate\": 0.6\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
" }\n",
|
|
|
|
|
"}\n"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# モジュールのインストール\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"必要なモジュールをインストールします。"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "8Na2PbLZSWgZ"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (5) 設定ファイルの確認\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"!apt-get install -y espeak libsndfile1-dev\n",
|
|
|
|
|
"!pip install flask\n",
|
|
|
|
|
"!pip install python-socketio\n",
|
|
|
|
|
"!pip install eventlet\n",
|
|
|
|
|
"!pip install unidecode\n",
|
|
|
|
|
"!pip install phonemizer\n",
|
|
|
|
|
"!pip install retry\n",
|
|
|
|
|
"!pip install flask\n",
|
|
|
|
|
"!pip install flask_cors\n"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"colab": {
|
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
|
},
|
|
|
|
|
"id": "LwZAAuqxX7yY",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"outputId": "6954acda-444b-4398-df43-9cc33345f98e"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 8,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"text": [
|
|
|
|
|
"Reading package lists... Done\n",
|
|
|
|
|
"Building dependency tree \n",
|
|
|
|
|
"Reading state information... Done\n",
|
|
|
|
|
"libsndfile1-dev is already the newest version (1.0.28-4ubuntu0.18.04.2).\n",
|
|
|
|
|
"The following package was automatically installed and is no longer required:\n",
|
|
|
|
|
" libnvidia-common-460\n",
|
|
|
|
|
"Use 'apt autoremove' to remove it.\n",
|
|
|
|
|
"The following additional packages will be installed:\n",
|
|
|
|
|
" espeak-data libespeak1 libportaudio2 libsonic0\n",
|
|
|
|
|
"The following NEW packages will be installed:\n",
|
|
|
|
|
" espeak espeak-data libespeak1 libportaudio2 libsonic0\n",
|
|
|
|
|
"0 upgraded, 5 newly installed, 0 to remove and 20 not upgraded.\n",
|
|
|
|
|
"Need to get 1,219 kB of archives.\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:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsonic0 amd64 0.2.0-6 [13.4 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:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 espeak amd64 1.48.04+dfsg-5 [61.6 kB]\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Fetched 1,219 kB in 0s (3,967 kB/s)\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"Selecting previously unselected package libportaudio2:amd64.\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"(Reading database ... 155685 files and directories currently installed.)\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"Preparing to unpack .../libportaudio2_19.6.0-1_amd64.deb ...\n",
|
|
|
|
|
"Unpacking libportaudio2:amd64 (19.6.0-1) ...\n",
|
|
|
|
|
"Selecting previously unselected package libsonic0:amd64.\n",
|
|
|
|
|
"Preparing to unpack .../libsonic0_0.2.0-6_amd64.deb ...\n",
|
|
|
|
|
"Unpacking libsonic0:amd64 (0.2.0-6) ...\n",
|
|
|
|
|
"Selecting previously unselected package espeak-data:amd64.\n",
|
|
|
|
|
"Preparing to unpack .../espeak-data_1.48.04+dfsg-5_amd64.deb ...\n",
|
|
|
|
|
"Unpacking espeak-data:amd64 (1.48.04+dfsg-5) ...\n",
|
|
|
|
|
"Selecting previously unselected package libespeak1:amd64.\n",
|
|
|
|
|
"Preparing to unpack .../libespeak1_1.48.04+dfsg-5_amd64.deb ...\n",
|
|
|
|
|
"Unpacking libespeak1:amd64 (1.48.04+dfsg-5) ...\n",
|
|
|
|
|
"Selecting previously unselected package espeak.\n",
|
|
|
|
|
"Preparing to unpack .../espeak_1.48.04+dfsg-5_amd64.deb ...\n",
|
|
|
|
|
"Unpacking espeak (1.48.04+dfsg-5) ...\n",
|
|
|
|
|
"Setting up libportaudio2:amd64 (19.6.0-1) ...\n",
|
|
|
|
|
"Setting up espeak-data:amd64 (1.48.04+dfsg-5) ...\n",
|
|
|
|
|
"Setting up libsonic0:amd64 (0.2.0-6) ...\n",
|
|
|
|
|
"Setting up libespeak1:amd64 (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 libc-bin (2.27-3ubuntu1.5) ...\n",
|
|
|
|
|
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
|
|
|
|
|
"Requirement already satisfied: flask in /usr/local/lib/python3.7/dist-packages (1.1.4)\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"Requirement already satisfied: Werkzeug<2.0,>=0.15 in /usr/local/lib/python3.7/dist-packages (from flask) (1.0.1)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Requirement already satisfied: Jinja2<3.0,>=2.10.1 in /usr/local/lib/python3.7/dist-packages (from flask) (2.11.3)\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"Requirement already satisfied: click<8.0,>=5.1 in /usr/local/lib/python3.7/dist-packages (from flask) (7.1.2)\n",
|
|
|
|
|
"Requirement already satisfied: itsdangerous<2.0,>=0.24 in /usr/local/lib/python3.7/dist-packages (from flask) (1.1.0)\n",
|
|
|
|
|
"Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from Jinja2<3.0,>=2.10.1->flask) (2.0.1)\n",
|
|
|
|
|
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
|
|
|
|
|
"Collecting python-socketio\n",
|
|
|
|
|
" Downloading python_socketio-5.7.1-py3-none-any.whl (56 kB)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"\u001b[K |████████████████████████████████| 56 kB 2.8 MB/s \n",
|
|
|
|
|
"\u001b[?25hCollecting python-engineio>=4.3.0\n",
|
|
|
|
|
" Downloading python_engineio-4.3.4-py3-none-any.whl (52 kB)\n",
|
|
|
|
|
"\u001b[K |████████████████████████████████| 52 kB 1.6 MB/s \n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"\u001b[?25hCollecting bidict>=0.21.0\n",
|
|
|
|
|
" Downloading bidict-0.22.0-py3-none-any.whl (36 kB)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Installing collected packages: python-engineio, bidict, python-socketio\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"Successfully installed bidict-0.22.0 python-engineio-4.3.4 python-socketio-5.7.1\n",
|
|
|
|
|
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
|
|
|
|
|
"Collecting eventlet\n",
|
|
|
|
|
" Downloading eventlet-0.33.1-py2.py3-none-any.whl (226 kB)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"\u001b[K |████████████████████████████████| 226 kB 5.0 MB/s \n",
|
|
|
|
|
"\u001b[?25hRequirement already satisfied: greenlet>=0.3 in /usr/local/lib/python3.7/dist-packages (from eventlet) (1.1.3)\n",
|
|
|
|
|
"Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.7/dist-packages (from eventlet) (1.15.0)\n",
|
|
|
|
|
"Collecting dnspython>=1.15.0\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
" Downloading dnspython-2.2.1-py3-none-any.whl (269 kB)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"\u001b[K |████████████████████████████████| 269 kB 68.3 MB/s \n",
|
|
|
|
|
"\u001b[?25hInstalling collected packages: dnspython, eventlet\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"Successfully installed dnspython-2.2.1 eventlet-0.33.1\n",
|
|
|
|
|
"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",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"\u001b[K |████████████████████████████████| 235 kB 5.0 MB/s \n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"\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",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"\u001b[K |████████████████████████████████| 90 kB 3.9 MB/s \n",
|
|
|
|
|
"\u001b[?25hCollecting segments\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
" Downloading segments-2.2.1-py2.py3-none-any.whl (15 kB)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Collecting dlinfo\n",
|
|
|
|
|
" Downloading dlinfo-1.2.1-py3-none-any.whl (3.6 kB)\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"Requirement already satisfied: joblib in /usr/local/lib/python3.7/dist-packages (from phonemizer) (1.1.0)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Requirement already satisfied: attrs>=18.1 in /usr/local/lib/python3.7/dist-packages (from phonemizer) (22.1.0)\n",
|
|
|
|
|
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from phonemizer) (4.1.1)\n",
|
|
|
|
|
"Collecting csvw>=1.5.6\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
" Downloading csvw-3.1.1-py2.py3-none-any.whl (56 kB)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"\u001b[K |████████████████████████████████| 56 kB 4.8 MB/s \n",
|
|
|
|
|
"\u001b[?25hCollecting clldutils>=1.7.3\n",
|
|
|
|
|
" Downloading clldutils-3.12.0-py2.py3-none-any.whl (197 kB)\n",
|
|
|
|
|
"\u001b[K |████████████████████████████████| 197 kB 29.3 MB/s \n",
|
|
|
|
|
"\u001b[?25hRequirement already satisfied: regex in /usr/local/lib/python3.7/dist-packages (from segments->phonemizer) (2022.6.2)\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"Collecting colorlog\n",
|
|
|
|
|
" Downloading colorlog-6.7.0-py2.py3-none-any.whl (11 kB)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from clldutils>=1.7.3->segments->phonemizer) (2.8.2)\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"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",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Collecting colorama\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
" Downloading colorama-0.4.5-py2.py3-none-any.whl (16 kB)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"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",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"Collecting isodate\n",
|
|
|
|
|
" Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"\u001b[K |████████████████████████████████| 41 kB 608 kB/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",
|
|
|
|
|
"Collecting rdflib\n",
|
|
|
|
|
" Downloading rdflib-6.2.0-py3-none-any.whl (500 kB)\n",
|
|
|
|
|
"\u001b[K |████████████████████████████████| 500 kB 61.6 MB/s \n",
|
|
|
|
|
"\u001b[?25hCollecting language-tags\n",
|
|
|
|
|
" Downloading language_tags-1.1.0-py2.py3-none-any.whl (210 kB)\n",
|
|
|
|
|
"\u001b[K |████████████████████████████████| 210 kB 70.9 MB/s \n",
|
|
|
|
|
"\u001b[?25hCollecting rfc3986<2\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
" Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"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",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"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-resources>=1.4.0 in /usr/local/lib/python3.7/dist-packages (from jsonschema->csvw>=1.5.6->segments->phonemizer) (5.9.0)\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"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",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"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: pyparsing in /usr/local/lib/python3.7/dist-packages (from rdflib->csvw>=1.5.6->segments->phonemizer) (3.0.9)\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from rdflib->csvw>=1.5.6->segments->phonemizer) (57.4.0)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"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",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"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",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"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",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"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",
|
|
|
|
|
"Collecting retry\n",
|
|
|
|
|
" Downloading retry-0.9.2-py2.py3-none-any.whl (8.0 kB)\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",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Requirement already satisfied: decorator>=3.4.2 in /usr/local/lib/python3.7/dist-packages (from retry) (4.4.2)\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"Installing collected packages: retry\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",
|
|
|
|
|
"Requirement already satisfied: flask in /usr/local/lib/python3.7/dist-packages (1.1.4)\n",
|
|
|
|
|
"Requirement already satisfied: click<8.0,>=5.1 in /usr/local/lib/python3.7/dist-packages (from flask) (7.1.2)\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"Requirement already satisfied: Werkzeug<2.0,>=0.15 in /usr/local/lib/python3.7/dist-packages (from flask) (1.0.1)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Requirement already satisfied: Jinja2<3.0,>=2.10.1 in /usr/local/lib/python3.7/dist-packages (from flask) (2.11.3)\n",
|
|
|
|
|
"Requirement already satisfied: itsdangerous<2.0,>=0.24 in /usr/local/lib/python3.7/dist-packages (from flask) (1.1.0)\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from Jinja2<3.0,>=2.10.1->flask) (2.0.1)\n",
|
|
|
|
|
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
|
|
|
|
|
"Collecting flask_cors\n",
|
|
|
|
|
" Downloading Flask_Cors-3.0.10-py2.py3-none-any.whl (14 kB)\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"Requirement already satisfied: Flask>=0.9 in /usr/local/lib/python3.7/dist-packages (from flask_cors) (1.1.4)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Requirement already satisfied: Six in /usr/local/lib/python3.7/dist-packages (from flask_cors) (1.15.0)\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"Requirement already satisfied: itsdangerous<2.0,>=0.24 in /usr/local/lib/python3.7/dist-packages (from Flask>=0.9->flask_cors) (1.1.0)\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Requirement already satisfied: click<8.0,>=5.1 in /usr/local/lib/python3.7/dist-packages (from Flask>=0.9->flask_cors) (7.1.2)\n",
|
|
|
|
|
"Requirement already satisfied: Werkzeug<2.0,>=0.15 in /usr/local/lib/python3.7/dist-packages (from Flask>=0.9->flask_cors) (1.0.1)\n",
|
|
|
|
|
"Requirement already satisfied: Jinja2<3.0,>=2.10.1 in /usr/local/lib/python3.7/dist-packages (from Flask>=0.9->flask_cors) (2.11.3)\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from Jinja2<3.0,>=2.10.1->Flask>=0.9->flask_cors) (2.0.1)\n",
|
|
|
|
|
"Installing collected packages: flask-cors\n",
|
|
|
|
|
"Successfully installed flask-cors-3.0.10\n"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-08-31 09:59:55 +03:00
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"source": [
|
|
|
|
|
"# サーバの起動\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"サーバを起動します。(6-1)\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"サーバの起動状況を確認します。(6-2) \n",
|
|
|
|
|
"\n",
|
|
|
|
|
"このセルは繰り返し実行することになるのでCtrl+Retでセルを実行してください。\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"アクセスできるようになるまで、1~2分かかるようです。コーヒーでも飲みに行きましょう。\n",
|
|
|
|
|
"\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",
|
|
|
|
|
"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",
|
|
|
|
|
"```\n",
|
|
|
|
|
"\n"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "-_2OcN9Borke"
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-08-31 09:21:16 +03:00
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (6-1) サーバの起動\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"get_ipython().system_raw(f'python3 serverFlask.py 8082 {CONFIG} {MODEL} >foo 2>&1 &')"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "iNOAB7zISI6J"
|
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 9,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"outputs": []
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (6-2) サーバの起動確認 (Ctrl+Retで実行)\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"!cat foo"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"colab": {
|
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
|
},
|
|
|
|
|
"id": "chu06KpAjEK6",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"outputId": "c7c09b45-66a8-4e2e-82ad-4bd802c19c01"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 18,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"text": [
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"[2022-09-02 03:09:26,807] INFO in serverFlask: INITIALIZE MODEL\n",
|
|
|
|
|
"[2022-09-02 03:09:32,030] INFO in utils: Loaded checkpoint '/content/drive/MyDrive/VoiceChanger/G_326000.pth' (iteration 1136)\n",
|
|
|
|
|
"[2022-09-02 03:09:44,106] INFO in serverFlask: START APP\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"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-09-02 06:11:05 +03:00
|
|
|
|
"[2022-09-02 03:09:44,114] INFO in _internal: * Running on http://0.0.0.0:8082/ (Press CTRL+C to quit)\n",
|
|
|
|
|
"[2022-09-02 03:09:44,115] INFO in _internal: * Restarting with stat\n",
|
|
|
|
|
"[2022-09-02 03:09:45,942] INFO in serverFlask: INITIALIZE MODEL\n",
|
|
|
|
|
"[2022-09-02 03:09:47,689] INFO in utils: Loaded checkpoint '/content/drive/MyDrive/VoiceChanger/G_326000.pth' (iteration 1136)\n",
|
|
|
|
|
"[2022-09-02 03:09:51,469] INFO in serverFlask: START APP\n",
|
|
|
|
|
"[2022-09-02 03:09:51,474] WARNING in _internal: * Debugger is active!\n",
|
|
|
|
|
"[2022-09-02 03:09:51,544] INFO in _internal: * Debugger PIN: 334-166-753\n"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-08-31 09:59:55 +03:00
|
|
|
|
{
|
|
|
|
|
"cell_type": "markdown",
|
|
|
|
|
"source": [
|
|
|
|
|
"# プロキシを起動\n",
|
|
|
|
|
"ウェブサーバへのアクセスをするためのプロキシを起動します。\n",
|
|
|
|
|
"\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"表示されたURLをクリックして開くと別タブでアプリが開きます。\n",
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"\n",
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"Colabなので、ロードにある程度時間がかかります(30秒くらい)。"
|
2022-08-31 09:59:55 +03:00
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "WhxcFLQEpctq"
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-08-31 09:21:16 +03:00
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [
|
2022-08-31 09:59:55 +03:00
|
|
|
|
"# (7) プロキシを起動\n",
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"from google.colab import output\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"output.serve_kernel_port_as_window(8082)"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "nkRjZm95l87C",
|
|
|
|
|
"colab": {
|
|
|
|
|
"base_uri": "https://localhost:8080/",
|
|
|
|
|
"height": 34
|
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"outputId": "6fd1d798-9e2b-4573-e073-3aa66cbc2278"
|
2022-08-31 09:21:16 +03:00
|
|
|
|
},
|
2022-09-02 06:11:05 +03:00
|
|
|
|
"execution_count": 19,
|
2022-08-31 09:21:16 +03:00
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"output_type": "display_data",
|
|
|
|
|
"data": {
|
|
|
|
|
"text/plain": [
|
|
|
|
|
"<IPython.core.display.Javascript object>"
|
|
|
|
|
],
|
|
|
|
|
"application/javascript": [
|
|
|
|
|
"(async (port, path, text, element) => {\n",
|
|
|
|
|
" if (!google.colab.kernel.accessAllowed) {\n",
|
|
|
|
|
" return;\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
" element.appendChild(document.createTextNode(''));\n",
|
|
|
|
|
" const url = await google.colab.kernel.proxyPort(port);\n",
|
|
|
|
|
" const anchor = document.createElement('a');\n",
|
|
|
|
|
" anchor.href = new URL(path, url).toString();\n",
|
|
|
|
|
" anchor.target = '_blank';\n",
|
|
|
|
|
" anchor.setAttribute('data-href', url + path);\n",
|
|
|
|
|
" anchor.textContent = text;\n",
|
|
|
|
|
" element.appendChild(anchor);\n",
|
|
|
|
|
" })(8082, \"/\", \"https://localhost:8082/\", window.element)"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"metadata": {}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"source": [],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"id": "3hwJmseXZhJY"
|
|
|
|
|
},
|
|
|
|
|
"execution_count": null,
|
|
|
|
|
"outputs": []
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|