Merge branch 'v.1.3.5'
This commit is contained in:
commit
2dc1fb2625
17
Checklist.md
Normal file
17
Checklist.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Release Check List
|
||||
## Run
|
||||
- [] Anaconda on WSL2
|
||||
- [] Docker on WSL2
|
||||
- [] Anaconda on Linux
|
||||
- [] Docker on Linux
|
||||
- [] Colab simple
|
||||
- [] Colab normal
|
||||
- [] Windows exe
|
||||
- [] Mac(M1)
|
||||
|
||||
## Doc
|
||||
- [] Readme
|
||||
- [] Wiki
|
||||
- [] Zenn
|
||||
|
||||
|
BIN
client/demo/public/vc_128.ico
Normal file
BIN
client/demo/public/vc_128.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
BIN
client/demo/public/vc_32.ico
Normal file
BIN
client/demo/public/vc_32.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
client/demo/public/vc_48.ico
Normal file
BIN
client/demo/public/vc_48.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
BIN
client/demo/public/vc_64.ico
Normal file
BIN
client/demo/public/vc_64.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -37,10 +37,25 @@ const App = () => {
|
||||
|
||||
return (
|
||||
<div className="body">
|
||||
<div className="body-row">
|
||||
<div className="body-row split-6-4">
|
||||
<div className="body-top-title">
|
||||
Voice Changer Setting
|
||||
</div>
|
||||
<div className="body-top-title-belongings">
|
||||
<div className="belonging-item">
|
||||
<a className="link" href="https://github.com/w-okada/voice-changer" target="_blank" rel="noopener noreferrer">
|
||||
<img src="./assets/icons/github.svg" />
|
||||
<span>github</span>
|
||||
</a>
|
||||
</div>
|
||||
<div className="belonging-item">
|
||||
<a className="link" href="https://zenn.dev/wok/articles/s01_vc001_top" target="_blank" rel="noopener noreferrer">
|
||||
<img src="./assets/icons/help-circle.svg" />
|
||||
<span>manual</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{clearRow}
|
||||
{voiceChangerSetting}
|
||||
|
@ -68,6 +68,10 @@ export const useServerSettingArea = (props: UseServerSettingProps): ServerSettin
|
||||
props.clientState.serverSetting.loadModel()
|
||||
}
|
||||
|
||||
const uploadButtonClassName = props.clientState.serverSetting.isUploading ? "body-button-disabled" : "body-button"
|
||||
const uploadButtonAction = props.clientState.serverSetting.isUploading ? () => { } : onModelUploadClicked
|
||||
const uploadButtonLabel = props.clientState.serverSetting.isUploading ? "wait..." : "upload"
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="body-row split-3-3-4 left-padding-1 guided">
|
||||
@ -115,7 +119,7 @@ export const useServerSettingArea = (props: UseServerSettingProps): ServerSettin
|
||||
{props.clientState.serverSetting.isUploading ? `uploading.... ${props.clientState.serverSetting.uploadProgress}%` : ""}
|
||||
</div>
|
||||
<div className="body-button-container">
|
||||
<div className="body-button" onClick={onModelUploadClicked}>upload</div>
|
||||
<div className={uploadButtonClassName} onClick={uploadButtonAction}>{uploadButtonLabel}</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
@ -63,6 +63,21 @@ body {
|
||||
}
|
||||
.body-row {
|
||||
}
|
||||
.split-6-4 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
margin: 1px 0px 1px 0px;
|
||||
& > div:nth-child(1) {
|
||||
left: 0px;
|
||||
width: 60%;
|
||||
}
|
||||
& > div:nth-child(2) {
|
||||
left: 60%;
|
||||
width: 40%;
|
||||
}
|
||||
}
|
||||
|
||||
.split-4-6 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
@ -218,6 +233,25 @@ body {
|
||||
.body-top-title {
|
||||
font-size: 3rem;
|
||||
}
|
||||
.body-top-title-belongings{
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: flex-start;
|
||||
& > div {
|
||||
margin-left:10px;
|
||||
margin-right:10px;
|
||||
}
|
||||
&>.belonging-item{
|
||||
&>.link{
|
||||
text-decoration: none;
|
||||
&>span{
|
||||
font-size: small;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.body-section-title {
|
||||
font-size: 1.5rem;
|
||||
color: rgb(51, 49, 49);
|
||||
@ -246,28 +280,45 @@ body {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
& > div {
|
||||
margin-left:5px;
|
||||
margin-right:5px;
|
||||
padding-left:20px;
|
||||
padding-right:20px;
|
||||
|
||||
}
|
||||
.body-button {
|
||||
user-select: none;
|
||||
border: solid 1px #333;
|
||||
border: solid 1px #999;
|
||||
border-radius: 2px;
|
||||
padding: 2px;
|
||||
cursor:pointer;
|
||||
vertical-align:middle;
|
||||
&:hover{
|
||||
border: solid 1px #000;
|
||||
}
|
||||
}
|
||||
.body-button-disabled {
|
||||
user-select: none;
|
||||
border: solid 1px #999;
|
||||
border-radius: 2px;
|
||||
vertical-align:middle;
|
||||
background:#ddd;
|
||||
}
|
||||
.body-button-active {
|
||||
user-select: none;
|
||||
border: solid 1px #333;
|
||||
border-radius: 2px;
|
||||
padding: 2px;
|
||||
background:#ada;
|
||||
}
|
||||
.body-button-stanby {
|
||||
user-select: none;
|
||||
border: solid 1px #333;
|
||||
border: solid 1px #999;
|
||||
border-radius: 2px;
|
||||
padding: 2px;
|
||||
background:#aba;
|
||||
cursor:pointer;
|
||||
&:hover{
|
||||
border: solid 1px #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
.body-select-container {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import sys, os, argparse
|
||||
import socket
|
||||
import misc.log_control
|
||||
|
||||
from dataclasses import dataclass
|
||||
@ -20,12 +21,12 @@ def setupArgParser():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-t", type=str, default="MMVC",
|
||||
help="Server type. MMVC|TRAIN")
|
||||
parser.add_argument("-p", type=int, default=8080, help="port")
|
||||
parser.add_argument("-p", type=int, default=18888, help="port")
|
||||
parser.add_argument("-c", type=str, help="path for the config.json")
|
||||
parser.add_argument("-m", type=str, help="path for the model file")
|
||||
parser.add_argument("-o", type=str, help="path for the onnx model file")
|
||||
parser.add_argument("--https", type=strtobool,
|
||||
default=False, help="use https")
|
||||
default=True, help="use https")
|
||||
parser.add_argument("--httpsKey", type=str,
|
||||
default="ssl.key", help="path for the key of https")
|
||||
parser.add_argument("--httpsCert", type=str,
|
||||
@ -47,44 +48,42 @@ def printMessage(message, level=0):
|
||||
else:
|
||||
print(f"\033[47m {message}\033[0m")
|
||||
|
||||
|
||||
|
||||
global app_socketio
|
||||
global app_fastapi
|
||||
# global app_socketio
|
||||
# global app_fastapi
|
||||
|
||||
parser = setupArgParser()
|
||||
args = parser.parse_args()
|
||||
|
||||
printMessage(f"Phase name:{__name__}", level=2)
|
||||
thisFilename = os.path.basename(__file__)[:-3]
|
||||
# printMessage(f"Phase name:{__name__}", level=2)
|
||||
# thisFilename = os.path.basename(__file__)[:-3]
|
||||
|
||||
if __name__ == thisFilename or args.colab == True:
|
||||
printMessage(f"PHASE3:{__name__}", level=2)
|
||||
TYPE = args.t
|
||||
PORT = args.p
|
||||
CONFIG = args.c
|
||||
MODEL = args.m if args.m != None else None
|
||||
ONNX_MODEL = args.o if args.o != None else None
|
||||
# if __name__ == thisFilename or args.colab == True:
|
||||
# printMessage(f"PHASE3:{__name__}", level=2)
|
||||
TYPE = args.t
|
||||
PORT = args.p
|
||||
CONFIG = args.c
|
||||
MODEL = args.m if args.m != None else None
|
||||
ONNX_MODEL = args.o if args.o != None else None
|
||||
|
||||
|
||||
if args.colab == True:
|
||||
os.environ["colab"] = "True"
|
||||
# if os.getenv("EX_TB_PORT"):
|
||||
# EX_TB_PORT = os.environ["EX_TB_PORT"]
|
||||
# exApplitionInfo.external_tensorboard_port = int(EX_TB_PORT)
|
||||
if args.colab == True:
|
||||
os.environ["colab"] = "True"
|
||||
# if os.getenv("EX_TB_PORT"):
|
||||
# EX_TB_PORT = os.environ["EX_TB_PORT"]
|
||||
# exApplitionInfo.external_tensorboard_port = int(EX_TB_PORT)
|
||||
|
||||
voiceChangerManager = VoiceChangerManager.get_instance()
|
||||
if CONFIG and (MODEL or ONNX_MODEL):
|
||||
voiceChangerManager.loadModel(CONFIG, MODEL, ONNX_MODEL)
|
||||
app_fastapi = MMVC_Rest.get_instance(voiceChangerManager)
|
||||
app_socketio = MMVC_SocketIOApp.get_instance(app_fastapi, voiceChangerManager)
|
||||
voiceChangerManager = VoiceChangerManager.get_instance()
|
||||
if CONFIG and (MODEL or ONNX_MODEL):
|
||||
voiceChangerManager.loadModel(CONFIG, MODEL, ONNX_MODEL)
|
||||
app_fastapi = MMVC_Rest.get_instance(voiceChangerManager)
|
||||
app_socketio = MMVC_SocketIOApp.get_instance(app_fastapi, voiceChangerManager)
|
||||
|
||||
|
||||
if __name__ == '__mp_main__':
|
||||
printMessage(f"PHASE2:{__name__}", level=2)
|
||||
printMessage(f"サーバプロセスを起動しています。", level=2)
|
||||
|
||||
if __name__ == '__main__':
|
||||
printMessage(f"PHASE1:{__name__}", level=2)
|
||||
printMessage(f"Voice Changerを起動しています。", level=2)
|
||||
TYPE = args.t
|
||||
PORT = args.p
|
||||
CONFIG = args.c
|
||||
@ -94,7 +93,8 @@ if __name__ == '__main__':
|
||||
print("Type(-t) should be MMVC or TRAIN")
|
||||
exit(1)
|
||||
|
||||
printMessage(f"Start MMVC SocketIO Server", level=0)
|
||||
# printMessage(f"Start MMVC SocketIO Server", level=0)
|
||||
printMessage(f"-- 設定 -- ", level=1)
|
||||
printMessage(f"CONFIG:{CONFIG}, MODEL:{MODEL} ONNX_MODEL:{ONNX_MODEL}", level=1)
|
||||
|
||||
if args.colab == False:
|
||||
@ -138,27 +138,42 @@ if __name__ == '__main__':
|
||||
else:
|
||||
# HTTP
|
||||
printMessage(f"protocol: HTTP", level=1)
|
||||
printMessage(f"-- ---- -- ", level=1)
|
||||
|
||||
|
||||
# アドレス表示
|
||||
printMessage(
|
||||
f"ブラウザで次のURLを開いてください.", level=2)
|
||||
if args.https == 1:
|
||||
printMessage(
|
||||
f"open https://<IP>:<PORT>/ with your browser.", level=0)
|
||||
f"https://<IP>:<PORT>/", level=1)
|
||||
else:
|
||||
printMessage(
|
||||
f"open http://<IP>:<PORT>/ with your browser.", level=0)
|
||||
f"http://<IP>:<PORT>/", level=1)
|
||||
|
||||
if TYPE == "MMVC":
|
||||
path = ""
|
||||
else:
|
||||
path = "trainer"
|
||||
if "EX_PORT" in locals() and "EX_IP" in locals() and args.https == 1:
|
||||
printMessage(f"In many cases it is one of the following", level=1)
|
||||
printMessage(f"https://localhost:{EX_PORT}/{path}", level=1)
|
||||
for ip in EX_IP.strip().split(" "):
|
||||
printMessage(f"https://{ip}:{EX_PORT}/{path}", level=1)
|
||||
elif "EX_PORT" in locals() and "EX_IP" in locals() and args.https == 0:
|
||||
printMessage(f"In many cases it is one of the following", level=1)
|
||||
printMessage(f"http://localhost:{EX_PORT}/{path}", level=1)
|
||||
|
||||
printMessage(f"多くの場合は次のいずれかのURLにアクセスすると起動します。", level=2)
|
||||
if "EX_PORT" in locals() and "EX_IP" in locals(): # シェルスクリプト経由起動(docker)
|
||||
if args.https == 1:
|
||||
printMessage(f"https://localhost:{EX_PORT}/{path}", level=1)
|
||||
for ip in EX_IP.strip().split(" "):
|
||||
printMessage(f"https://{ip}:{EX_PORT}/{path}", level=1)
|
||||
else:
|
||||
printMessage(f"http://localhost:{EX_PORT}/{path}", level=1)
|
||||
else: # 直接python起動
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
s.connect(("8.8.8.8", 80))
|
||||
hostname = s.getsockname()[0]
|
||||
if args.https == 1:
|
||||
printMessage(f"https://localhost:{PORT}/{path}", level=1)
|
||||
printMessage(f"https://{hostname}:{PORT}/{path}", level=1)
|
||||
else:
|
||||
printMessage(f"http://localhost:{PORT}/{path}", level=1)
|
||||
printMessage(f"http://{hostname}:{PORT}/{path}", level=1)
|
||||
|
||||
# サーバ起動
|
||||
if args.https:
|
||||
@ -167,7 +182,7 @@ if __name__ == '__main__':
|
||||
f"{os.path.basename(__file__)[:-3]}:app_socketio",
|
||||
host="0.0.0.0",
|
||||
port=int(PORT),
|
||||
reload=True,
|
||||
reload = False if hasattr(sys, "_MEIPASS") else True,
|
||||
ssl_keyfile=key_path,
|
||||
ssl_certfile=cert_path,
|
||||
# log_level="warning"
|
||||
@ -186,7 +201,7 @@ if __name__ == '__main__':
|
||||
f"{os.path.basename(__file__)[:-3]}:app_socketio",
|
||||
host="0.0.0.0",
|
||||
port=int(PORT),
|
||||
reload=True,
|
||||
reload = False if hasattr(sys, "_MEIPASS") else True,
|
||||
log_level="warning"
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
frontend_path = "../client/demo/dist"
|
||||
|
||||
import os, sys
|
||||
|
||||
frontend_path = os.path.join(sys._MEIPASS, "dist") if hasattr(sys, "_MEIPASS") else "../client/demo/dist"
|
||||
ERROR_NO_ONNX_SESSION = "ERROR_NO_ONNX_SESSION"
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ if [ "${MODE}" = "TRAIN" ]; then
|
||||
-e LOCAL_GID=$(id -g $USER) \
|
||||
-e EX_PORT=${EX_PORT} -e EX_TB_PORT=${EX_TB_PORT} \
|
||||
-e EX_IP="`hostname -I`" \
|
||||
-p ${EX_PORT}:8080 -p ${EX_TB_PORT}:6006 \
|
||||
-p ${EX_PORT}:18888 -p ${EX_TB_PORT}:6006 \
|
||||
$DOCKER_IMAGE "$@"
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ elif [ "${MODE}" = "MMVC" ]; then
|
||||
-e LOCAL_GID=$(id -g $USER) \
|
||||
-e EX_IP="`hostname -I`" \
|
||||
-e EX_PORT=${EX_PORT} \
|
||||
-p ${EX_PORT}:8080 \
|
||||
-p ${EX_PORT}:18888 \
|
||||
$DOCKER_IMAGE "$@"
|
||||
else
|
||||
echo "MMVCを起動します(only cpu)"
|
||||
@ -66,7 +66,7 @@ elif [ "${MODE}" = "MMVC" ]; then
|
||||
-e LOCAL_GID=$(id -g $USER) \
|
||||
-e EX_IP="`hostname -I`" \
|
||||
-e EX_PORT=${EX_PORT} \
|
||||
-p ${EX_PORT}:8080 \
|
||||
-p ${EX_PORT}:18888 \
|
||||
$DOCKER_IMAGE "$@"
|
||||
fi
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user