mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 13:35:12 +03:00
merge models
This commit is contained in:
parent
cc4d7ebc9d
commit
17521975c1
2
client/demo/dist/index.js
vendored
2
client/demo/dist/index.js
vendored
File diff suppressed because one or more lines are too long
2676
client/demo/dist/index.js.LICENSE.txt
vendored
2676
client/demo/dist/index.js.LICENSE.txt
vendored
File diff suppressed because it is too large
Load Diff
370
client/demo/package-lock.json
generated
370
client/demo/package-lock.json
generated
@ -9,7 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@dannadori/voice-changer-client-js": "^1.0.117",
|
||||
"@dannadori/voice-changer-client-js": "^1.0.119",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.4.0",
|
||||
@ -23,7 +23,7 @@
|
||||
"@babel/preset-env": "^7.21.5",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.5",
|
||||
"@types/node": "^18.16.2",
|
||||
"@types/node": "^18.16.3",
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/react-dom": "^18.2.1",
|
||||
"autoprefixer": "^10.4.14",
|
||||
@ -38,7 +38,7 @@
|
||||
"html-loader": "^4.2.0",
|
||||
"html-webpack-plugin": "^5.5.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss-loader": "^7.2.4",
|
||||
"postcss-loader": "^7.3.0",
|
||||
"postcss-nested": "^6.0.1",
|
||||
"prettier": "^2.8.8",
|
||||
"rimraf": "^5.0.0",
|
||||
@ -3104,34 +3104,10 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@cspotcode/source-map-support": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
||||
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": "0.3.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
|
||||
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/resolve-uri": "^3.0.3",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@dannadori/voice-changer-client-js": {
|
||||
"version": "1.0.117",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.117.tgz",
|
||||
"integrity": "sha512-tWAk9FClDz9SjnVJGjpGKgAGvknzkkxBLNqUFDnWEnPDK9IGRJjPldxIJ2TGt/2f9j3biqeMDQSfYe8FB2s4JA==",
|
||||
"version": "1.0.119",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.119.tgz",
|
||||
"integrity": "sha512-22QbFjLVyO1cXMEzwTzjTPotLP8F/WLXrtduwVUseeDPvO0l+DW0vgjVK/rZQ4OT1Eflgnliymiuj/7lSCzuJQ==",
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
"amazon-chime-sdk-js": "^3.13.0",
|
||||
@ -3566,34 +3542,6 @@
|
||||
"version": "3.1.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node10": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
||||
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@tsconfig/node12": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
|
||||
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@tsconfig/node14": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
|
||||
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@tsconfig/node16": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
|
||||
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/body-parser": {
|
||||
"version": "1.19.2",
|
||||
"dev": true,
|
||||
@ -3723,9 +3671,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.16.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.2.tgz",
|
||||
"integrity": "sha512-GQW/JL/5Fz/0I8RpeBG9lKp0+aNcXEaVL71c0D2Q0QHDTFvlYKT7an0onCUXj85anv7b4/WesqdfchLc0jtsCg=="
|
||||
"version": "18.16.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz",
|
||||
"integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q=="
|
||||
},
|
||||
"node_modules/@types/prop-types": {
|
||||
"version": "15.7.5",
|
||||
@ -4070,16 +4018,6 @@
|
||||
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn-walk": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
|
||||
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ajv": {
|
||||
"version": "6.12.6",
|
||||
"dev": true,
|
||||
@ -4201,13 +4139,6 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/arg": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
"dev": true,
|
||||
@ -4902,29 +4833,6 @@
|
||||
"url": "https://github.com/sponsors/d-fischer"
|
||||
}
|
||||
},
|
||||
"node_modules/cosmiconfig-typescript-loader": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz",
|
||||
"integrity": "sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12",
|
||||
"npm": ">=6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/node": "*",
|
||||
"cosmiconfig": ">=7",
|
||||
"ts-node": ">=10",
|
||||
"typescript": ">=3"
|
||||
}
|
||||
},
|
||||
"node_modules/create-require": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"dev": true,
|
||||
@ -5116,16 +5024,6 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/dir-glob": {
|
||||
"version": "3.0.1",
|
||||
"dev": true,
|
||||
@ -7263,6 +7161,15 @@
|
||||
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/jiti": {
|
||||
"version": "1.18.2",
|
||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz",
|
||||
"integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"jiti": "bin/jiti.js"
|
||||
}
|
||||
},
|
||||
"node_modules/js-sdsl": {
|
||||
"version": "4.3.0",
|
||||
"dev": true,
|
||||
@ -7511,13 +7418,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/make-error": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "0.3.0",
|
||||
"dev": true,
|
||||
@ -8361,13 +8261,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-loader": {
|
||||
"version": "7.2.4",
|
||||
"resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.2.4.tgz",
|
||||
"integrity": "sha512-F88rpxxNspo5hatIc+orYwZDtHFaVFOSIVAx+fBfJC1GmhWbVmPWtmg2gXKE1OxJbneOSGn8PWdIwsZFcruS+w==",
|
||||
"version": "7.3.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.0.tgz",
|
||||
"integrity": "sha512-qLAFjvR2BFNz1H930P7mj1iuWJFjGey/nVhimfOAAQ1ZyPpcClAxP8+A55Sl8mBvM+K2a9Pjgdj10KpANWrNfw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cosmiconfig": "^8.1.3",
|
||||
"cosmiconfig-typescript-loader": "^4.3.0",
|
||||
"jiti": "^1.18.2",
|
||||
"klona": "^2.0.6",
|
||||
"semver": "^7.3.8"
|
||||
},
|
||||
@ -8380,17 +8280,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^7.0.0 || ^8.0.1",
|
||||
"ts-node": ">=10",
|
||||
"typescript": ">=4",
|
||||
"webpack": "^5.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"ts-node": {
|
||||
"optional": true
|
||||
},
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-loader/node_modules/lru-cache": {
|
||||
@ -9863,50 +9753,6 @@
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/ts-node": {
|
||||
"version": "10.9.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
|
||||
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@cspotcode/source-map-support": "^0.8.0",
|
||||
"@tsconfig/node10": "^1.0.7",
|
||||
"@tsconfig/node12": "^1.0.7",
|
||||
"@tsconfig/node14": "^1.0.0",
|
||||
"@tsconfig/node16": "^1.0.2",
|
||||
"acorn": "^8.4.1",
|
||||
"acorn-walk": "^8.1.1",
|
||||
"arg": "^4.1.0",
|
||||
"create-require": "^1.1.0",
|
||||
"diff": "^4.0.1",
|
||||
"make-error": "^1.1.1",
|
||||
"v8-compile-cache-lib": "^3.0.1",
|
||||
"yn": "3.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"ts-node": "dist/bin.js",
|
||||
"ts-node-cwd": "dist/bin-cwd.js",
|
||||
"ts-node-esm": "dist/bin-esm.js",
|
||||
"ts-node-script": "dist/bin-script.js",
|
||||
"ts-node-transpile-only": "dist/bin-transpile.js",
|
||||
"ts-script": "dist/bin-script-deprecated.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@swc/core": ">=1.2.50",
|
||||
"@swc/wasm": ">=1.2.50",
|
||||
"@types/node": "*",
|
||||
"typescript": ">=2.7"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@swc/core": {
|
||||
"optional": true
|
||||
},
|
||||
"@swc/wasm": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/tsconfig-paths": {
|
||||
"version": "4.2.0",
|
||||
"dev": true,
|
||||
@ -10119,13 +9965,6 @@
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/v8-compile-cache-lib": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
||||
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/validate-npm-package-license": {
|
||||
"version": "3.0.4",
|
||||
"dev": true,
|
||||
@ -10576,16 +10415,6 @@
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"dev": true,
|
||||
@ -12977,33 +12806,10 @@
|
||||
"to-fast-properties": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@cspotcode/source-map-support": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
||||
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@jridgewell/trace-mapping": "0.3.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": {
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
|
||||
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@jridgewell/resolve-uri": "^3.0.3",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@dannadori/voice-changer-client-js": {
|
||||
"version": "1.0.117",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.117.tgz",
|
||||
"integrity": "sha512-tWAk9FClDz9SjnVJGjpGKgAGvknzkkxBLNqUFDnWEnPDK9IGRJjPldxIJ2TGt/2f9j3biqeMDQSfYe8FB2s4JA==",
|
||||
"version": "1.0.119",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.119.tgz",
|
||||
"integrity": "sha512-22QbFjLVyO1cXMEzwTzjTPotLP8F/WLXrtduwVUseeDPvO0l+DW0vgjVK/rZQ4OT1Eflgnliymiuj/7lSCzuJQ==",
|
||||
"requires": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
"amazon-chime-sdk-js": "^3.13.0",
|
||||
@ -13300,34 +13106,6 @@
|
||||
"@socket.io/component-emitter": {
|
||||
"version": "3.1.0"
|
||||
},
|
||||
"@tsconfig/node10": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
||||
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"@tsconfig/node12": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
|
||||
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"@tsconfig/node14": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
|
||||
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"@tsconfig/node16": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
|
||||
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"@types/body-parser": {
|
||||
"version": "1.19.2",
|
||||
"dev": true,
|
||||
@ -13442,9 +13220,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "18.16.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.2.tgz",
|
||||
"integrity": "sha512-GQW/JL/5Fz/0I8RpeBG9lKp0+aNcXEaVL71c0D2Q0QHDTFvlYKT7an0onCUXj85anv7b4/WesqdfchLc0jtsCg=="
|
||||
"version": "18.16.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz",
|
||||
"integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q=="
|
||||
},
|
||||
"@types/prop-types": {
|
||||
"version": "15.7.5",
|
||||
@ -13735,13 +13513,6 @@
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"acorn-walk": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
|
||||
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"ajv": {
|
||||
"version": "6.12.6",
|
||||
"dev": true,
|
||||
@ -13819,13 +13590,6 @@
|
||||
"picomatch": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"argparse": {
|
||||
"version": "2.0.1",
|
||||
"dev": true
|
||||
@ -14245,20 +14009,6 @@
|
||||
"path-type": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"cosmiconfig-typescript-loader": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz",
|
||||
"integrity": "sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"create-require": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"dev": true,
|
||||
@ -14371,13 +14121,6 @@
|
||||
"version": "2.1.0",
|
||||
"dev": true
|
||||
},
|
||||
"diff": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"dir-glob": {
|
||||
"version": "3.0.1",
|
||||
"dev": true,
|
||||
@ -15707,6 +15450,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"jiti": {
|
||||
"version": "1.18.2",
|
||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz",
|
||||
"integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==",
|
||||
"dev": true
|
||||
},
|
||||
"js-sdsl": {
|
||||
"version": "4.3.0",
|
||||
"dev": true
|
||||
@ -15876,13 +15625,6 @@
|
||||
"semver": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"make-error": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"media-typer": {
|
||||
"version": "0.3.0",
|
||||
"dev": true
|
||||
@ -16408,13 +16150,13 @@
|
||||
}
|
||||
},
|
||||
"postcss-loader": {
|
||||
"version": "7.2.4",
|
||||
"resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.2.4.tgz",
|
||||
"integrity": "sha512-F88rpxxNspo5hatIc+orYwZDtHFaVFOSIVAx+fBfJC1GmhWbVmPWtmg2gXKE1OxJbneOSGn8PWdIwsZFcruS+w==",
|
||||
"version": "7.3.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.0.tgz",
|
||||
"integrity": "sha512-qLAFjvR2BFNz1H930P7mj1iuWJFjGey/nVhimfOAAQ1ZyPpcClAxP8+A55Sl8mBvM+K2a9Pjgdj10KpANWrNfw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cosmiconfig": "^8.1.3",
|
||||
"cosmiconfig-typescript-loader": "^4.3.0",
|
||||
"jiti": "^1.18.2",
|
||||
"klona": "^2.0.6",
|
||||
"semver": "^7.3.8"
|
||||
},
|
||||
@ -17362,28 +17104,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "10.9.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
|
||||
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@cspotcode/source-map-support": "^0.8.0",
|
||||
"@tsconfig/node10": "^1.0.7",
|
||||
"@tsconfig/node12": "^1.0.7",
|
||||
"@tsconfig/node14": "^1.0.0",
|
||||
"@tsconfig/node16": "^1.0.2",
|
||||
"acorn": "^8.4.1",
|
||||
"acorn-walk": "^8.1.1",
|
||||
"arg": "^4.1.0",
|
||||
"create-require": "^1.1.0",
|
||||
"diff": "^4.0.1",
|
||||
"make-error": "^1.1.1",
|
||||
"v8-compile-cache-lib": "^3.0.1",
|
||||
"yn": "3.1.1"
|
||||
}
|
||||
},
|
||||
"tsconfig-paths": {
|
||||
"version": "4.2.0",
|
||||
"dev": true,
|
||||
@ -17501,13 +17221,6 @@
|
||||
"uuid": {
|
||||
"version": "8.3.2"
|
||||
},
|
||||
"v8-compile-cache-lib": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
||||
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"validate-npm-package-license": {
|
||||
"version": "3.0.4",
|
||||
"dev": true,
|
||||
@ -17780,13 +17493,6 @@
|
||||
"version": "3.1.1",
|
||||
"dev": true
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"dev": true
|
||||
|
@ -51,7 +51,7 @@
|
||||
"webpack-dev-server": "^4.13.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dannadori/voice-changer-client-js": "^1.0.118",
|
||||
"@dannadori/voice-changer-client-js": "^1.0.119",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.4.0",
|
||||
|
@ -34,13 +34,13 @@ export const Lab = () => {
|
||||
{accodionButton}
|
||||
</span>
|
||||
<span className="title" onClick={() => { guiState.stateControls.openLabCheckbox.updateState(!guiState.stateControls.openLabCheckbox.checked()) }}>
|
||||
Labs(N/A)
|
||||
Labs (Experimental)
|
||||
</span>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<div className="partition-content">
|
||||
{/* {components} */}
|
||||
{components}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
@ -12,9 +12,6 @@ export const ONNXExportRow = (_props: ONNXExportRowProps) => {
|
||||
const guiState = useGuiState()
|
||||
|
||||
const onnxExporthRow = useMemo(() => {
|
||||
if (appState.serverSetting.serverSetting.framework != "PyTorch") {
|
||||
return <></>
|
||||
}
|
||||
|
||||
const onnxExportButtonAction = async () => {
|
||||
|
||||
@ -34,12 +31,36 @@ export const ONNXExportRow = (_props: ONNXExportRowProps) => {
|
||||
guiState.stateControls.showWaitingCheckbox.updateState(false)
|
||||
|
||||
}
|
||||
const onDownloadClicked = () => {
|
||||
const slot = appState.serverSetting.serverSetting.modelSlotIndex
|
||||
const model = appState.serverSetting.serverSetting.modelSlots[slot]
|
||||
|
||||
const a = document.createElement("a")
|
||||
if (model.pyTorchModelFile && model.pyTorchModelFile.length > 0) {
|
||||
a.href = model.pyTorchModelFile
|
||||
} else {
|
||||
a.href = model.onnxModelFile
|
||||
}
|
||||
a.download = a.href.replace(/^.*[\\\/]/, '');
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
guiState.stateControls.showWaitingCheckbox.updateState(false)
|
||||
}
|
||||
|
||||
const exportOnnx = appState.serverSetting.serverSetting.framework == "PyTorch" ? (
|
||||
<div className="body-button left-margin-1" onClick={onnxExportButtonAction}>export onnx</div>
|
||||
) : <></>
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="body-row split-3-7 left-padding-1 guided">
|
||||
<div className="body-item-title left-padding-1">Export ONNX</div>
|
||||
<div className="body-button-container">
|
||||
<div className="body-button left-margin-1" onClick={onnxExportButtonAction}>export onnx</div>
|
||||
{exportOnnx}
|
||||
<div className="body-button left-margin-1" onClick={() => {
|
||||
onDownloadClicked()
|
||||
}}>download</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
@ -1,15 +1,11 @@
|
||||
import { Framework } from "@dannadori/voice-changer-client-js"
|
||||
import React, { useEffect, useMemo, useState } from "react"
|
||||
import { useAppState } from "../../../001_provider/001_AppStateProvider"
|
||||
import { MergeElement } from "@dannadori/voice-changer-client-js"
|
||||
|
||||
|
||||
export type MergeLabRowProps = {
|
||||
}
|
||||
|
||||
type MergeElement = {
|
||||
filename: string
|
||||
strength: number
|
||||
}
|
||||
|
||||
export const MergeLabRow = (_props: MergeLabRowProps) => {
|
||||
const [mergeElements, setMergeElements] = useState<MergeElement[]>([])
|
||||
@ -51,7 +47,10 @@ export const MergeLabRow = (_props: MergeLabRowProps) => {
|
||||
|
||||
const modelSwitchRow = useMemo(() => {
|
||||
const onMergeClicked = async () => {
|
||||
|
||||
appState.serverSetting.mergeModel({
|
||||
command: "mix",
|
||||
files: mergeElements
|
||||
})
|
||||
}
|
||||
const onMergeElementsChanged = (filename: string, strength: number) => {
|
||||
const newMergeElements = mergeElements.map(x => {
|
||||
|
32
client/lib/package-lock.json
generated
32
client/lib/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@dannadori/voice-changer-client-js",
|
||||
"version": "1.0.118",
|
||||
"version": "1.0.119",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@dannadori/voice-changer-client-js",
|
||||
"version": "1.0.118",
|
||||
"version": "1.0.119",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
@ -18,8 +18,8 @@
|
||||
"socket.io-client": "^4.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/audioworklet": "^0.0.42",
|
||||
"@types/node": "^18.16.2",
|
||||
"@types/audioworklet": "^0.0.43",
|
||||
"@types/node": "^18.16.3",
|
||||
"@types/react": "18.2.0",
|
||||
"@types/react-dom": "18.2.1",
|
||||
"eslint": "^8.39.0",
|
||||
@ -1686,9 +1686,9 @@
|
||||
"integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg=="
|
||||
},
|
||||
"node_modules/@types/audioworklet": {
|
||||
"version": "0.0.42",
|
||||
"resolved": "https://registry.npmjs.org/@types/audioworklet/-/audioworklet-0.0.42.tgz",
|
||||
"integrity": "sha512-vUHhMkam6BjeomsxZc2f7g0d4fI7PV5EnAoaHo83iy4hNlYphgBgRbcWRK0UEY7jUgfY46kCLYO1riZUdH/P+g==",
|
||||
"version": "0.0.43",
|
||||
"resolved": "https://registry.npmjs.org/@types/audioworklet/-/audioworklet-0.0.43.tgz",
|
||||
"integrity": "sha512-56g/QOa8M/OmnFZm4nhXSxzMoYBaELt0+SP0hK9M/YQhd9Ew0CMuJzP2yo7fdGJt5i8b3kgsO0D+1CJ16dCbXg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/body-parser": {
|
||||
@ -1829,9 +1829,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.16.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.2.tgz",
|
||||
"integrity": "sha512-GQW/JL/5Fz/0I8RpeBG9lKp0+aNcXEaVL71c0D2Q0QHDTFvlYKT7an0onCUXj85anv7b4/WesqdfchLc0jtsCg=="
|
||||
"version": "18.16.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz",
|
||||
"integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q=="
|
||||
},
|
||||
"node_modules/@types/prop-types": {
|
||||
"version": "15.7.5",
|
||||
@ -9333,9 +9333,9 @@
|
||||
"integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg=="
|
||||
},
|
||||
"@types/audioworklet": {
|
||||
"version": "0.0.42",
|
||||
"resolved": "https://registry.npmjs.org/@types/audioworklet/-/audioworklet-0.0.42.tgz",
|
||||
"integrity": "sha512-vUHhMkam6BjeomsxZc2f7g0d4fI7PV5EnAoaHo83iy4hNlYphgBgRbcWRK0UEY7jUgfY46kCLYO1riZUdH/P+g==",
|
||||
"version": "0.0.43",
|
||||
"resolved": "https://registry.npmjs.org/@types/audioworklet/-/audioworklet-0.0.43.tgz",
|
||||
"integrity": "sha512-56g/QOa8M/OmnFZm4nhXSxzMoYBaELt0+SP0hK9M/YQhd9Ew0CMuJzP2yo7fdGJt5i8b3kgsO0D+1CJ16dCbXg==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/body-parser": {
|
||||
@ -9476,9 +9476,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "18.16.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.2.tgz",
|
||||
"integrity": "sha512-GQW/JL/5Fz/0I8RpeBG9lKp0+aNcXEaVL71c0D2Q0QHDTFvlYKT7an0onCUXj85anv7b4/WesqdfchLc0jtsCg=="
|
||||
"version": "18.16.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz",
|
||||
"integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q=="
|
||||
},
|
||||
"@types/prop-types": {
|
||||
"version": "15.7.5",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@dannadori/voice-changer-client-js",
|
||||
"version": "1.0.118",
|
||||
"version": "1.0.119",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"directories": {
|
||||
@ -26,8 +26,8 @@
|
||||
"author": "wataru.okada@flect.co.jp",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@types/audioworklet": "^0.0.42",
|
||||
"@types/node": "^18.16.2",
|
||||
"@types/audioworklet": "^0.0.43",
|
||||
"@types/node": "^18.16.3",
|
||||
"@types/react": "18.2.0",
|
||||
"@types/react-dom": "18.2.1",
|
||||
"eslint": "^8.39.0",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ClientType, OnnxExporterInfo, ServerInfo, ServerSettingKey } from "./const";
|
||||
import { ClientType, MergeModelRequest, OnnxExporterInfo, ServerInfo, ServerSettingKey } from "./const";
|
||||
|
||||
|
||||
type FileChunk = {
|
||||
@ -178,4 +178,21 @@ export class ServerConfigurator {
|
||||
return await info
|
||||
}
|
||||
|
||||
mergeModel = async (req: MergeModelRequest) => {
|
||||
const url = this.serverUrl + "/merge_model"
|
||||
const info = new Promise<ServerInfo>(async (resolve) => {
|
||||
const formData = new FormData();
|
||||
formData.append("request", JSON.stringify(req));
|
||||
|
||||
const request = new Request(url, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
});
|
||||
const res = await (await fetch(request)).json() as ServerInfo
|
||||
console.log("RESPONSE", res)
|
||||
resolve(res)
|
||||
})
|
||||
return await info
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import { VoiceChangerWorkletNode, VoiceChangerWorkletListener } from "./VoiceCha
|
||||
import workerjs from "raw-loader!../worklet/dist/index.js";
|
||||
import { VoiceFocusDeviceTransformer, VoiceFocusTransformDevice } from "amazon-chime-sdk-js";
|
||||
import { createDummyMediaStream, validateUrl } from "./util";
|
||||
import { ClientType, DefaultVoiceChangerClientSetting, ServerSettingKey, VoiceChangerClientSetting, WorkletNodeSetting, WorkletSetting } from "./const";
|
||||
import { ClientType, DefaultVoiceChangerClientSetting, MergeModelRequest, ServerSettingKey, VoiceChangerClientSetting, WorkletNodeSetting, WorkletSetting } from "./const";
|
||||
import { ServerConfigurator } from "./ServerConfigurator";
|
||||
|
||||
// オーディオデータの流れ
|
||||
@ -273,7 +273,9 @@ export class VoiceChangerClient {
|
||||
getOnnx = async () => {
|
||||
return this.configurator.export2onnx()
|
||||
}
|
||||
|
||||
mergeModel = async (req: MergeModelRequest) => {
|
||||
return this.configurator.mergeModel(req)
|
||||
}
|
||||
|
||||
updateServerSettings = (key: ServerSettingKey, val: string) => {
|
||||
return this.configurator.updateSettings(key, val)
|
||||
|
@ -405,4 +405,14 @@ export type OnnxExporterInfo = {
|
||||
}
|
||||
|
||||
|
||||
export const MAX_MODEL_SLOT_NUM = 3
|
||||
export const MAX_MODEL_SLOT_NUM = 3
|
||||
|
||||
// Merge
|
||||
export type MergeElement = {
|
||||
filename: string
|
||||
strength: number
|
||||
}
|
||||
export type MergeModelRequest = {
|
||||
command: "mix",
|
||||
files: MergeElement[]
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useState, useMemo, useEffect } from "react"
|
||||
import { VoiceChangerServerSetting, ServerInfo, ServerSettingKey, INDEXEDDB_KEY_SERVER, INDEXEDDB_KEY_MODEL_DATA, ClientType, DefaultServerSetting_MMVCv13, DefaultServerSetting_MMVCv15, DefaultServerSetting_so_vits_svc_40v2, DefaultServerSetting_so_vits_svc_40, DefaultServerSetting_so_vits_svc_40_c, DefaultServerSetting_RVC, OnnxExporterInfo, DefaultServerSetting_DDSP_SVC, MAX_MODEL_SLOT_NUM, Framework } from "../const"
|
||||
import { VoiceChangerServerSetting, ServerInfo, ServerSettingKey, INDEXEDDB_KEY_SERVER, INDEXEDDB_KEY_MODEL_DATA, ClientType, DefaultServerSetting_MMVCv13, DefaultServerSetting_MMVCv15, DefaultServerSetting_so_vits_svc_40v2, DefaultServerSetting_so_vits_svc_40, DefaultServerSetting_so_vits_svc_40_c, DefaultServerSetting_RVC, OnnxExporterInfo, DefaultServerSetting_DDSP_SVC, MAX_MODEL_SLOT_NUM, Framework, MergeModelRequest } from "../const"
|
||||
import { VoiceChangerClient } from "../VoiceChangerClient"
|
||||
import { useIndexedDB } from "./useIndexedDB"
|
||||
|
||||
@ -61,6 +61,7 @@ export type ServerSettingState = {
|
||||
isUploading: boolean
|
||||
|
||||
getOnnx: () => Promise<OnnxExporterInfo>
|
||||
mergeModel: (request: MergeModelRequest) => Promise<ServerInfo>
|
||||
// updateDefaultTune: (slot: number, tune: number) => void
|
||||
|
||||
}
|
||||
@ -364,6 +365,12 @@ export const useServerSetting = (props: UseServerSettingProps): ServerSettingSta
|
||||
return props.voiceChangerClient!.getOnnx()
|
||||
}
|
||||
|
||||
const mergeModel = async (request: MergeModelRequest) => {
|
||||
const serverInfo = await props.voiceChangerClient!.mergeModel(request)
|
||||
setServerSetting(serverInfo)
|
||||
return serverInfo
|
||||
}
|
||||
|
||||
return {
|
||||
serverSetting,
|
||||
updateServerSettings,
|
||||
@ -376,6 +383,7 @@ export const useServerSetting = (props: UseServerSettingProps): ServerSettingSta
|
||||
uploadProgress,
|
||||
isUploading,
|
||||
getOnnx,
|
||||
mergeModel,
|
||||
// updateDefaultTune,
|
||||
}
|
||||
}
|
BIN
server/merged.pth
Normal file
BIN
server/merged.pth
Normal file
Binary file not shown.
@ -9,7 +9,7 @@ from voice_changer.VoiceChangerManager import VoiceChangerManager
|
||||
from restapi.MMVC_Rest_Hello import MMVC_Rest_Hello
|
||||
from restapi.MMVC_Rest_VoiceChanger import MMVC_Rest_VoiceChanger
|
||||
from restapi.MMVC_Rest_Fileuploader import MMVC_Rest_Fileuploader
|
||||
from const import getFrontendPath, TMP_DIR
|
||||
from const import UPLOAD_DIR, getFrontendPath, TMP_DIR
|
||||
|
||||
|
||||
class ValidationErrorLoggingRoute(APIRoute):
|
||||
@ -64,6 +64,9 @@ class MMVC_Rest:
|
||||
app_fastapi.mount(
|
||||
"/tmp", StaticFiles(directory=f"{TMP_DIR}"), name="static"
|
||||
)
|
||||
app_fastapi.mount(
|
||||
"/upload_dir", StaticFiles(directory=f"{UPLOAD_DIR}"), name="static"
|
||||
)
|
||||
|
||||
restHello = MMVC_Rest_Hello()
|
||||
app_fastapi.include_router(restHello.router)
|
||||
|
@ -36,6 +36,9 @@ class MMVC_Rest_Fileuploader:
|
||||
self.router.add_api_route("/model_type", self.post_model_type, methods=["POST"])
|
||||
self.router.add_api_route("/model_type", self.get_model_type, methods=["GET"])
|
||||
self.router.add_api_route("/onnx", self.get_onnx, methods=["GET"])
|
||||
self.router.add_api_route(
|
||||
"/merge_model", self.post_merge_models, methods=["POST"]
|
||||
)
|
||||
|
||||
def post_upload_file(self, file: UploadFile = File(...), filename: str = Form(...)):
|
||||
res = upload_file(UPLOAD_DIR, file, filename)
|
||||
@ -121,3 +124,9 @@ class MMVC_Rest_Fileuploader:
|
||||
info = self.voiceChangerManager.export2onnx()
|
||||
json_compatible_item_data = jsonable_encoder(info)
|
||||
return JSONResponse(content=json_compatible_item_data)
|
||||
|
||||
def post_merge_models(self, request: str = Form(...)):
|
||||
print(request)
|
||||
info = self.voiceChangerManager.merge_models(request)
|
||||
json_compatible_item_data = jsonable_encoder(info)
|
||||
return JSONResponse(content=json_compatible_item_data)
|
||||
|
62
server/voice_changer/RVC/MergeModel.py
Normal file
62
server/voice_changer/RVC/MergeModel.py
Normal file
@ -0,0 +1,62 @@
|
||||
from typing import Dict, Any
|
||||
from voice_changer.RVC.MergeModelRequest import MergeModelRequest
|
||||
from collections import OrderedDict
|
||||
import torch
|
||||
import tqdm
|
||||
|
||||
|
||||
def merge_model(request: MergeModelRequest):
|
||||
def extract(ckpt: Dict[str, Any]):
|
||||
a = ckpt["model"]
|
||||
opt: Dict[str, Any] = OrderedDict()
|
||||
|
||||
opt["weight"] = {}
|
||||
for key in a.keys():
|
||||
if "enc_q" in key:
|
||||
continue
|
||||
opt["weight"][key] = a[key]
|
||||
return opt
|
||||
|
||||
def load_weight(path: str):
|
||||
print(f"Loading {path}...")
|
||||
state_dict = torch.load(path, map_location="cpu")
|
||||
if "model" in state_dict:
|
||||
weight = extract(state_dict)
|
||||
else:
|
||||
weight = state_dict["weight"]
|
||||
return weight, state_dict
|
||||
|
||||
files = request.files
|
||||
if len(files) == 0:
|
||||
print("no merge file..............")
|
||||
raise RuntimeError("no merge file..............")
|
||||
|
||||
weights = []
|
||||
alphas = []
|
||||
for f in files:
|
||||
strength = f.strength
|
||||
if strength == 0:
|
||||
continue
|
||||
weight, state_dict = load_weight(f.filename)
|
||||
weights.append(weight)
|
||||
alphas.append(f.strength)
|
||||
|
||||
alphas = [x / sum(alphas) for x in alphas]
|
||||
|
||||
for weight in weights:
|
||||
if sorted(list(weight.keys())) != sorted(list(weights[0].keys())):
|
||||
raise RuntimeError("Failed to merge models.")
|
||||
|
||||
merged: Dict[str, Any] = OrderedDict()
|
||||
merged["weight"] = {}
|
||||
for key in tqdm.tqdm(weights[0].keys()):
|
||||
merged["weight"][key] = 0
|
||||
for i, weight in enumerate(weights):
|
||||
merged["weight"][key] += weight[key] * alphas[i]
|
||||
|
||||
merged["config"] = state_dict["config"]
|
||||
merged["params"] = state_dict["params"] if "params" in state_dict else None
|
||||
merged["sr"] = state_dict["sr"]
|
||||
merged["f0"] = state_dict["f0"]
|
||||
merged["info"] = state_dict["info"]
|
||||
return merged
|
18
server/voice_changer/RVC/MergeModelRequest.py
Normal file
18
server/voice_changer/RVC/MergeModelRequest.py
Normal file
@ -0,0 +1,18 @@
|
||||
from dataclasses import dataclass, field
|
||||
from typing import List
|
||||
from dataclasses_json import dataclass_json
|
||||
|
||||
|
||||
@dataclass_json
|
||||
@dataclass
|
||||
class MergeFile:
|
||||
filename: str
|
||||
strength: int
|
||||
|
||||
|
||||
@dataclass_json
|
||||
@dataclass
|
||||
class MergeModelRequest:
|
||||
command: str = ""
|
||||
slot: int = -1
|
||||
files: List[MergeFile] = field(default_factory=lambda: [])
|
@ -2,10 +2,12 @@ import sys
|
||||
import os
|
||||
import json
|
||||
import resampy
|
||||
from voice_changer.RVC.MergeModel import merge_model
|
||||
from voice_changer.RVC.MergeModelRequest import MergeModelRequest
|
||||
from voice_changer.RVC.ModelWrapper import ModelWrapper
|
||||
from Exceptions import NoModeLoadedException
|
||||
from voice_changer.RVC.RVCSettings import RVCSettings
|
||||
from voice_changer.utils.LoadModelParams import LoadModelParams
|
||||
from voice_changer.utils.LoadModelParams import FilePaths, LoadModelParams
|
||||
from voice_changer.utils.VoiceChangerModel import AudioInOut
|
||||
from voice_changer.utils.VoiceChangerParams import VoiceChangerParams
|
||||
|
||||
@ -18,7 +20,7 @@ from fairseq import checkpoint_utils
|
||||
import traceback
|
||||
import faiss
|
||||
|
||||
from const import TMP_DIR # type:ignore
|
||||
from const import TMP_DIR, UPLOAD_DIR # type:ignore
|
||||
|
||||
|
||||
# avoiding parse arg error in RVC
|
||||
@ -92,7 +94,9 @@ class RVC:
|
||||
self.settings.modelSlots[tmp_slot].onnxModelFile = props.files.onnxModelFilename
|
||||
self.settings.modelSlots[tmp_slot].featureFile = props.files.featureFilename
|
||||
self.settings.modelSlots[tmp_slot].indexFile = props.files.indexFilename
|
||||
self.settings.modelSlots[tmp_slot].defaultTrans = params["trans"]
|
||||
self.settings.modelSlots[tmp_slot].defaultTrans = (
|
||||
params["trans"] if "trans" in params else 0
|
||||
)
|
||||
|
||||
isONNX = (
|
||||
True
|
||||
@ -591,3 +595,35 @@ class RVC:
|
||||
"path": f"/tmp/{output_file_simple}",
|
||||
"filename": output_file_simple,
|
||||
}
|
||||
|
||||
def merge_models(self, request: str):
|
||||
print("[Voice Changer] MergeRequest:", request)
|
||||
req: MergeModelRequest = MergeModelRequest.from_json(request)
|
||||
merged = merge_model(req)
|
||||
targetSlot = 0
|
||||
if req.slot < 0:
|
||||
targetSlot = len(self.settings.modelSlots) - 1
|
||||
else:
|
||||
targetSlot = req.slot
|
||||
|
||||
storeDir = os.path.join(UPLOAD_DIR, f"{targetSlot}")
|
||||
print("[Voice Changer] store merged model to:", storeDir)
|
||||
os.makedirs(storeDir, exist_ok=True)
|
||||
storeFile = os.path.join(storeDir, "merged.pth")
|
||||
torch.save(merged, storeFile)
|
||||
|
||||
filePaths: FilePaths = FilePaths(
|
||||
pyTorchModelFilename=storeFile,
|
||||
configFilename=None,
|
||||
onnxModelFilename=None,
|
||||
featureFilename=None,
|
||||
indexFilename=None,
|
||||
clusterTorchModelFilename=None,
|
||||
)
|
||||
props: LoadModelParams = LoadModelParams(
|
||||
slot=targetSlot, isHalf=True, files=filePaths, params="{}"
|
||||
)
|
||||
self.loadModel(props)
|
||||
self.prepareModel(targetSlot)
|
||||
self.settings.modelSlotIndex = targetSlot
|
||||
self.currentSlot = self.settings.modelSlotIndex
|
||||
|
@ -19,7 +19,7 @@ class RVCSettings:
|
||||
onnxModelFile: str = ""
|
||||
configFile: str = ""
|
||||
modelSlots: list[ModelSlot] = field(
|
||||
default_factory=lambda: [ModelSlot(), ModelSlot(), ModelSlot()]
|
||||
default_factory=lambda: [ModelSlot(), ModelSlot(), ModelSlot(), ModelSlot()]
|
||||
)
|
||||
indexRatio: float = 0
|
||||
rvcQuality: int = 0
|
||||
|
@ -351,6 +351,10 @@ class VoiceChanger:
|
||||
|
||||
##############
|
||||
|
||||
def merge_models(self, request: str):
|
||||
self.voiceChanger.merge_models(request)
|
||||
return self.get_info()
|
||||
|
||||
|
||||
PRINT_CONVERT_PROCESSING: bool = False
|
||||
# PRINT_CONVERT_PROCESSING = True
|
||||
|
@ -56,3 +56,6 @@ class VoiceChangerManager(object):
|
||||
|
||||
def export2onnx(self):
|
||||
return self.voiceChanger.export2onnx()
|
||||
|
||||
def merge_models(self, request: str):
|
||||
return self.voiceChanger.merge_models(request)
|
||||
|
Loading…
Reference in New Issue
Block a user