mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 05:25:01 +03:00
add license
This commit is contained in:
parent
5b2519d0e9
commit
3e5ed4dac1
11
client/demo_so-vits-svc_40v2/dist/index.html
vendored
11
client/demo_so-vits-svc_40v2/dist/index.html
vendored
@ -1,10 +1 @@
|
||||
<!DOCTYPE html>
|
||||
<html style="width: 100%; height: 100%; overflow: hidden">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Voice Changer Client Demo</title>
|
||||
<script defer src="index.js"></script></head>
|
||||
<body style="width: 100%; height: 100%; margin: 0px">
|
||||
<div id="app" style="width: 100%; height: 100%"></div>
|
||||
</body>
|
||||
</html>
|
||||
<!doctype html><html style="width:100%;height:100%;overflow:hidden"><head><meta charset="utf-8"/><title>Voice Changer Client Demo</title><script defer="defer" src="index.js"></script></head><body style="width:100%;height:100%;margin:0"><div id="app" style="width:100%;height:100%"></div></body></html>
|
892
client/demo_so-vits-svc_40v2/dist/index.js
vendored
892
client/demo_so-vits-svc_40v2/dist/index.js
vendored
File diff suppressed because one or more lines are too long
31
client/demo_so-vits-svc_40v2/dist/index.js.LICENSE.txt
vendored
Normal file
31
client/demo_so-vits-svc_40v2/dist/index.js.LICENSE.txt
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
42
client/demo_so-vits-svc_40v2/package-lock.json
generated
42
client/demo_so-vits-svc_40v2/package-lock.json
generated
@ -9,7 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@dannadori/voice-changer-client-js": "^1.0.88",
|
||||
"@dannadori/voice-changer-client-js": "^1.0.90",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.3.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.3.0",
|
||||
@ -23,7 +23,7 @@
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.0",
|
||||
"@types/node": "^18.15.0",
|
||||
"@types/node": "^18.15.3",
|
||||
"@types/react": "^18.0.28",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"autoprefixer": "^10.4.14",
|
||||
@ -42,7 +42,7 @@
|
||||
"postcss-nested": "^6.0.1",
|
||||
"prettier": "^2.8.4",
|
||||
"rimraf": "^4.4.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"style-loader": "^3.3.2",
|
||||
"ts-loader": "^9.4.2",
|
||||
"tsconfig-paths": "^4.1.2",
|
||||
"typescript": "^4.9.5",
|
||||
@ -3187,9 +3187,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@dannadori/voice-changer-client-js": {
|
||||
"version": "1.0.88",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.88.tgz",
|
||||
"integrity": "sha512-LdqtpnOr5r9mxck81uUgpC5mVGjpvyAOuVE2Waa0TR1511gag6QD4isOWmaaZ5TLi1E62LqGoP0zHXj86+5M+g==",
|
||||
"version": "1.0.90",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.90.tgz",
|
||||
"integrity": "sha512-+OEfe3Izmz43k4OlaM0WNCVglUfSJibLDheplN+Yo1jRdSny6Rc8AusGFOCPKLtRB1JYkCAEagZsfoEfOxUzVQ==",
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
"amazon-chime-sdk-js": "^3.11.0",
|
||||
@ -3802,9 +3802,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.15.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.0.tgz",
|
||||
"integrity": "sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w=="
|
||||
"version": "18.15.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz",
|
||||
"integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw=="
|
||||
},
|
||||
"node_modules/@types/parse-json": {
|
||||
"version": "4.0.0",
|
||||
@ -9990,9 +9990,9 @@
|
||||
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
|
||||
},
|
||||
"node_modules/style-loader": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
|
||||
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.2.tgz",
|
||||
"integrity": "sha512-RHs/vcrKdQK8wZliteNK4NKzxvLBzpuHMqYmUVWeKa6MkaIQ97ZTOS0b+zapZhy6GcrgWnvWYCMHRirC3FsUmw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 12.13.0"
|
||||
@ -13567,9 +13567,9 @@
|
||||
}
|
||||
},
|
||||
"@dannadori/voice-changer-client-js": {
|
||||
"version": "1.0.88",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.88.tgz",
|
||||
"integrity": "sha512-LdqtpnOr5r9mxck81uUgpC5mVGjpvyAOuVE2Waa0TR1511gag6QD4isOWmaaZ5TLi1E62LqGoP0zHXj86+5M+g==",
|
||||
"version": "1.0.90",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.90.tgz",
|
||||
"integrity": "sha512-+OEfe3Izmz43k4OlaM0WNCVglUfSJibLDheplN+Yo1jRdSny6Rc8AusGFOCPKLtRB1JYkCAEagZsfoEfOxUzVQ==",
|
||||
"requires": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
"amazon-chime-sdk-js": "^3.11.0",
|
||||
@ -14079,9 +14079,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "18.15.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.0.tgz",
|
||||
"integrity": "sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w=="
|
||||
"version": "18.15.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz",
|
||||
"integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw=="
|
||||
},
|
||||
"@types/parse-json": {
|
||||
"version": "4.0.0",
|
||||
@ -18741,9 +18741,9 @@
|
||||
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
|
||||
},
|
||||
"style-loader": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
|
||||
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.2.tgz",
|
||||
"integrity": "sha512-RHs/vcrKdQK8wZliteNK4NKzxvLBzpuHMqYmUVWeKa6MkaIQ97ZTOS0b+zapZhy6GcrgWnvWYCMHRirC3FsUmw==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
|
@ -23,7 +23,7 @@
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.0",
|
||||
"@types/node": "^18.15.0",
|
||||
"@types/node": "^18.15.3",
|
||||
"@types/react": "^18.0.28",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"autoprefixer": "^10.4.14",
|
||||
@ -42,7 +42,7 @@
|
||||
"postcss-nested": "^6.0.1",
|
||||
"prettier": "^2.8.4",
|
||||
"rimraf": "^4.4.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"style-loader": "^3.3.2",
|
||||
"ts-loader": "^9.4.2",
|
||||
"tsconfig-paths": "^4.1.2",
|
||||
"typescript": "^4.9.5",
|
||||
@ -51,7 +51,7 @@
|
||||
"webpack-dev-server": "^4.11.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dannadori/voice-changer-client-js": "^1.0.88",
|
||||
"@dannadori/voice-changer-client-js": "^1.0.90",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.3.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.3.0",
|
||||
|
@ -13,6 +13,7 @@ import { AppRootProvider } from "./001_provider/001_AppRootProvider";
|
||||
import ErrorBoundary from "./001_provider/900_ErrorBoundary";
|
||||
import { INDEXEDDB_KEY_CLIENT, INDEXEDDB_KEY_MODEL_DATA, INDEXEDDB_KEY_SERVER, INDEXEDDB_KEY_WORKLET, INDEXEDDB_KEY_WORKLETNODE, useIndexedDB } from "@dannadori/voice-changer-client-js";
|
||||
import { CLIENT_TYPE, INDEXEDDB_KEY_AUDIO_OUTPUT, isDesktopApp } from "./const";
|
||||
import { Dialog } from "./components/201_Dialog";
|
||||
|
||||
library.add(fas, far, fab);
|
||||
|
||||
@ -73,6 +74,15 @@ const App = () => {
|
||||
</a>
|
||||
)
|
||||
|
||||
|
||||
const licenseButton = (
|
||||
<span className="link" onClick={() => {
|
||||
document.getElementById("dialog")?.classList.add("dialog-container-show")
|
||||
appState.frontendManagerState.stateControls.showLicenseCheckbox.updateState(true)
|
||||
}}>
|
||||
<span>License</span>
|
||||
</span>
|
||||
)
|
||||
return (
|
||||
<div className="top-title">
|
||||
<span className="title">Voice Changer Setting</span>
|
||||
@ -81,6 +91,7 @@ const App = () => {
|
||||
{githubLink}
|
||||
{manualLink}
|
||||
{coffeeLink}
|
||||
{licenseButton}
|
||||
</span>
|
||||
<span className="belongings">
|
||||
|
||||
@ -112,6 +123,7 @@ const App = () => {
|
||||
return (
|
||||
<>
|
||||
<div className="main-body">
|
||||
<Dialog />
|
||||
{titleRow}
|
||||
{clearRow}
|
||||
{voiceChangerSetting}
|
||||
|
@ -10,6 +10,8 @@ export type StateControls = {
|
||||
openSpeakerSettingCheckbox: StateControlCheckbox
|
||||
openConverterSettingCheckbox: StateControlCheckbox
|
||||
openAdvancedSettingCheckbox: StateControlCheckbox
|
||||
|
||||
showLicenseCheckbox: StateControlCheckbox
|
||||
}
|
||||
|
||||
type FrontendManagerState = {
|
||||
@ -36,6 +38,9 @@ export const useFrontendManager = (): FrontendManagerStateAndMethod => {
|
||||
const openConverterSettingCheckbox = useStateControlCheckbox(OpenConverterSettingCheckbox);
|
||||
const openAdvancedSettingCheckbox = useStateControlCheckbox(OpenAdvancedSettingCheckbox);
|
||||
|
||||
|
||||
const showLicenseCheckbox = useStateControlCheckbox("leave-checkbox");
|
||||
|
||||
useEffect(() => {
|
||||
openServerControlCheckbox.updateState(true)
|
||||
openModelSettingCheckbox.updateState(true)
|
||||
@ -56,7 +61,9 @@ export const useFrontendManager = (): FrontendManagerStateAndMethod => {
|
||||
openQualityControlCheckbox,
|
||||
openSpeakerSettingCheckbox,
|
||||
openConverterSettingCheckbox,
|
||||
openAdvancedSettingCheckbox
|
||||
openAdvancedSettingCheckbox,
|
||||
|
||||
showLicenseCheckbox
|
||||
},
|
||||
isConverting,
|
||||
setIsConverting,
|
||||
|
@ -36,7 +36,7 @@ export const useSpeakerSetting = () => {
|
||||
appState.serverSetting.updateServerSettings({ ...appState.serverSetting.serverSetting, dstId: Number(e.target.value) })
|
||||
|
||||
}}>
|
||||
<option key="unknown" value={-1}>unknwon(-1)</option>
|
||||
<option key="unknown" value={0}>default(0)</option>
|
||||
{
|
||||
Object.keys(speakers).map(x => {
|
||||
return <option key={x} value={speakers[x]}>{x}({speakers[x]})</option>
|
||||
|
17
client/demo_so-vits-svc_40v2/src/components/201_Dialog.tsx
Normal file
17
client/demo_so-vits-svc_40v2/src/components/201_Dialog.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import React from "react";
|
||||
import { useAppState } from "../001_provider/001_AppStateProvider";
|
||||
import { LicenseDialog } from "./202_LicenseDialog";
|
||||
|
||||
export const Dialog = () => {
|
||||
const { frontendManagerState } = useAppState();
|
||||
|
||||
return (
|
||||
<div>
|
||||
{frontendManagerState.stateControls.showLicenseCheckbox.trigger}
|
||||
<div className="dialog-container" id="dialog">
|
||||
{frontendManagerState.stateControls.showLicenseCheckbox.trigger}
|
||||
<LicenseDialog></LicenseDialog>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
@ -0,0 +1,44 @@
|
||||
import { getLicenceInfo } from "@dannadori/voice-changer-client-js";
|
||||
import React, { useMemo } from "react";
|
||||
import { useAppState } from "../001_provider/001_AppStateProvider";
|
||||
|
||||
export const LicenseDialog = () => {
|
||||
const { frontendManagerState } = useAppState();
|
||||
|
||||
const form = useMemo(() => {
|
||||
const closeButtonRow = (
|
||||
<div className="body-row split-3-4-3 left-padding-1">
|
||||
<div className="body-item-text">
|
||||
</div>
|
||||
<div className="body-button-container body-button-container-space-around">
|
||||
<div className="body-button" onClick={() => { frontendManagerState.stateControls.showLicenseCheckbox.updateState(false) }} >close</div>
|
||||
</div>
|
||||
<div className="body-item-text"></div>
|
||||
</div>
|
||||
)
|
||||
const records = getLicenceInfo().map(x => {
|
||||
return (
|
||||
<div key={x.url} className="body-row split-3-4-3 left-padding-1">
|
||||
<div className="body-item-text">
|
||||
<a href={x.url} target="_blank" rel="noopener noreferrer">{x.name}</a>
|
||||
</div>
|
||||
<div className="body-item-text">
|
||||
<a href={x.licenseUrl} target="_blank" rel="noopener noreferrer">{x.license}</a>
|
||||
</div>
|
||||
<div className="body-item-text"></div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
return (
|
||||
<div className="dialog-frame">
|
||||
<div className="dialog-title">License</div>
|
||||
<div className="dialog-content">
|
||||
<div className={"dialog-application-title"}>Voice Changer Demo</div>
|
||||
{records}
|
||||
{closeButtonRow}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}, []);
|
||||
return form;
|
||||
};
|
@ -216,6 +216,24 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.split-3-4-3 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
margin: 1px 0px 1px 0px;
|
||||
& > div:nth-child(1) {
|
||||
left: 0px;
|
||||
width: 30%;
|
||||
}
|
||||
& > div:nth-child(2) {
|
||||
left: 30%;
|
||||
width: 40%;
|
||||
}
|
||||
& > div:nth-child(3) {
|
||||
left: 70%;
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
.split-2-5-3 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
@ -465,6 +483,9 @@ body {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
.body-button-container-space-around {
|
||||
justify-content: space-around;
|
||||
}
|
||||
.body-button-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@ -538,3 +559,92 @@ body {
|
||||
border-radius: 35px;
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
/* Dialog */
|
||||
.dialog-container {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: -1;
|
||||
display: none;
|
||||
.dialog-frame {
|
||||
color: var(--company-color2);
|
||||
width: 40rem;
|
||||
border: 2px solid var(--dialog-border-color);
|
||||
border-radius: 20px;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-shadow: 5px 5px 5px var(--dialog-shadow-color);
|
||||
background: var(--dialog-background-color);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
.dialog-title {
|
||||
margin-top: 20px;
|
||||
background: var(--company-color2);
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.dialog-content {
|
||||
width: 90%;
|
||||
.dialog-application-title {
|
||||
font-family: "Chicle", cursive;
|
||||
font-size: 3rem;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.dialog-container-show {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.state-control-checkbox:checked ~ .dialog-container {
|
||||
background: rgba(200, 200, 200, 0.4);
|
||||
animation-name: dialog-show;
|
||||
animation-duration: 0.4s;
|
||||
animation-iteration-count: 1;
|
||||
animation-fill-mode: forwards;
|
||||
animation-direction: normal;
|
||||
}
|
||||
.state-control-checkbox ~ .dialog-container {
|
||||
background: rgba(100, 100, 100, 0.4);
|
||||
animation-name: dialog-hide;
|
||||
animation-duration: 0.4s;
|
||||
animation-iteration-count: 1;
|
||||
animation-fill-mode: forwards;
|
||||
animation-direction: normal;
|
||||
}
|
||||
|
||||
@keyframes dialog-hide {
|
||||
from {
|
||||
opacity: 1;
|
||||
z-index: 200;
|
||||
}
|
||||
90% {
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dialog-show {
|
||||
from {
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
10% {
|
||||
z-index: 200;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
z-index: 200;
|
||||
}
|
||||
}
|
||||
|
2
client/demo_v13/dist/index.js
vendored
2
client/demo_v13/dist/index.js
vendored
File diff suppressed because one or more lines are too long
42
client/demo_v13/package-lock.json
generated
42
client/demo_v13/package-lock.json
generated
@ -9,7 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@dannadori/voice-changer-client-js": "^1.0.88",
|
||||
"@dannadori/voice-changer-client-js": "^1.0.90",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.3.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.3.0",
|
||||
@ -23,7 +23,7 @@
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.0",
|
||||
"@types/node": "^18.15.0",
|
||||
"@types/node": "^18.15.3",
|
||||
"@types/react": "^18.0.28",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"autoprefixer": "^10.4.14",
|
||||
@ -42,7 +42,7 @@
|
||||
"postcss-nested": "^6.0.1",
|
||||
"prettier": "^2.8.4",
|
||||
"rimraf": "^4.4.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"style-loader": "^3.3.2",
|
||||
"ts-loader": "^9.4.2",
|
||||
"tsconfig-paths": "^4.1.2",
|
||||
"typescript": "^4.9.5",
|
||||
@ -3187,9 +3187,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@dannadori/voice-changer-client-js": {
|
||||
"version": "1.0.88",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.88.tgz",
|
||||
"integrity": "sha512-LdqtpnOr5r9mxck81uUgpC5mVGjpvyAOuVE2Waa0TR1511gag6QD4isOWmaaZ5TLi1E62LqGoP0zHXj86+5M+g==",
|
||||
"version": "1.0.90",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.90.tgz",
|
||||
"integrity": "sha512-+OEfe3Izmz43k4OlaM0WNCVglUfSJibLDheplN+Yo1jRdSny6Rc8AusGFOCPKLtRB1JYkCAEagZsfoEfOxUzVQ==",
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
"amazon-chime-sdk-js": "^3.11.0",
|
||||
@ -3802,9 +3802,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.15.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.0.tgz",
|
||||
"integrity": "sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w=="
|
||||
"version": "18.15.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz",
|
||||
"integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw=="
|
||||
},
|
||||
"node_modules/@types/parse-json": {
|
||||
"version": "4.0.0",
|
||||
@ -9990,9 +9990,9 @@
|
||||
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
|
||||
},
|
||||
"node_modules/style-loader": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
|
||||
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.2.tgz",
|
||||
"integrity": "sha512-RHs/vcrKdQK8wZliteNK4NKzxvLBzpuHMqYmUVWeKa6MkaIQ97ZTOS0b+zapZhy6GcrgWnvWYCMHRirC3FsUmw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 12.13.0"
|
||||
@ -13567,9 +13567,9 @@
|
||||
}
|
||||
},
|
||||
"@dannadori/voice-changer-client-js": {
|
||||
"version": "1.0.88",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.88.tgz",
|
||||
"integrity": "sha512-LdqtpnOr5r9mxck81uUgpC5mVGjpvyAOuVE2Waa0TR1511gag6QD4isOWmaaZ5TLi1E62LqGoP0zHXj86+5M+g==",
|
||||
"version": "1.0.90",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.90.tgz",
|
||||
"integrity": "sha512-+OEfe3Izmz43k4OlaM0WNCVglUfSJibLDheplN+Yo1jRdSny6Rc8AusGFOCPKLtRB1JYkCAEagZsfoEfOxUzVQ==",
|
||||
"requires": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
"amazon-chime-sdk-js": "^3.11.0",
|
||||
@ -14079,9 +14079,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "18.15.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.0.tgz",
|
||||
"integrity": "sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w=="
|
||||
"version": "18.15.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz",
|
||||
"integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw=="
|
||||
},
|
||||
"@types/parse-json": {
|
||||
"version": "4.0.0",
|
||||
@ -18741,9 +18741,9 @@
|
||||
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
|
||||
},
|
||||
"style-loader": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
|
||||
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.2.tgz",
|
||||
"integrity": "sha512-RHs/vcrKdQK8wZliteNK4NKzxvLBzpuHMqYmUVWeKa6MkaIQ97ZTOS0b+zapZhy6GcrgWnvWYCMHRirC3FsUmw==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
|
@ -23,7 +23,7 @@
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.0",
|
||||
"@types/node": "^18.15.0",
|
||||
"@types/node": "^18.15.3",
|
||||
"@types/react": "^18.0.28",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"autoprefixer": "^10.4.14",
|
||||
@ -42,7 +42,7 @@
|
||||
"postcss-nested": "^6.0.1",
|
||||
"prettier": "^2.8.4",
|
||||
"rimraf": "^4.4.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"style-loader": "^3.3.2",
|
||||
"ts-loader": "^9.4.2",
|
||||
"tsconfig-paths": "^4.1.2",
|
||||
"typescript": "^4.9.5",
|
||||
@ -51,7 +51,7 @@
|
||||
"webpack-dev-server": "^4.11.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dannadori/voice-changer-client-js": "^1.0.88",
|
||||
"@dannadori/voice-changer-client-js": "^1.0.90",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.3.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.3.0",
|
||||
|
@ -13,6 +13,7 @@ import { AppRootProvider } from "./001_provider/001_AppRootProvider";
|
||||
import ErrorBoundary from "./001_provider/900_ErrorBoundary";
|
||||
import { INDEXEDDB_KEY_CLIENT, INDEXEDDB_KEY_MODEL_DATA, INDEXEDDB_KEY_SERVER, INDEXEDDB_KEY_WORKLET, INDEXEDDB_KEY_WORKLETNODE, useIndexedDB } from "@dannadori/voice-changer-client-js";
|
||||
import { CLIENT_TYPE, INDEXEDDB_KEY_AUDIO_OUTPUT, isDesktopApp } from "./const";
|
||||
import { Dialog } from "./components/201_Dialog";
|
||||
|
||||
library.add(fas, far, fab);
|
||||
|
||||
@ -73,14 +74,25 @@ const App = () => {
|
||||
</a>
|
||||
)
|
||||
|
||||
|
||||
const licenseButton = (
|
||||
<span className="link" onClick={() => {
|
||||
document.getElementById("dialog")?.classList.add("dialog-container-show")
|
||||
appState.frontendManagerState.stateControls.showLicenseCheckbox.updateState(true)
|
||||
}}>
|
||||
<span>License</span>
|
||||
</span>
|
||||
)
|
||||
|
||||
return (
|
||||
<div className="top-title">
|
||||
<span className="title">Voice Changer Setting</span>
|
||||
<span className="top-title-version">for so-vits-svc 40v2</span>
|
||||
<span className="top-title-version">for MMVC v.1.3.x</span>
|
||||
<span className="belongings">
|
||||
{githubLink}
|
||||
{manualLink}
|
||||
{coffeeLink}
|
||||
{licenseButton}
|
||||
</span>
|
||||
<span className="belongings">
|
||||
|
||||
@ -112,6 +124,7 @@ const App = () => {
|
||||
return (
|
||||
<>
|
||||
<div className="main-body">
|
||||
<Dialog />
|
||||
{titleRow}
|
||||
{clearRow}
|
||||
{voiceChangerSetting}
|
||||
|
@ -10,6 +10,8 @@ export type StateControls = {
|
||||
openSpeakerSettingCheckbox: StateControlCheckbox
|
||||
openConverterSettingCheckbox: StateControlCheckbox
|
||||
openAdvancedSettingCheckbox: StateControlCheckbox
|
||||
|
||||
showLicenseCheckbox: StateControlCheckbox
|
||||
}
|
||||
|
||||
type FrontendManagerState = {
|
||||
@ -36,6 +38,8 @@ export const useFrontendManager = (): FrontendManagerStateAndMethod => {
|
||||
const openConverterSettingCheckbox = useStateControlCheckbox(OpenConverterSettingCheckbox);
|
||||
const openAdvancedSettingCheckbox = useStateControlCheckbox(OpenAdvancedSettingCheckbox);
|
||||
|
||||
const showLicenseCheckbox = useStateControlCheckbox("leave-checkbox");
|
||||
|
||||
useEffect(() => {
|
||||
openServerControlCheckbox.updateState(true)
|
||||
openModelSettingCheckbox.updateState(true)
|
||||
@ -56,7 +60,9 @@ export const useFrontendManager = (): FrontendManagerStateAndMethod => {
|
||||
openQualityControlCheckbox,
|
||||
openSpeakerSettingCheckbox,
|
||||
openConverterSettingCheckbox,
|
||||
openAdvancedSettingCheckbox
|
||||
openAdvancedSettingCheckbox,
|
||||
|
||||
showLicenseCheckbox
|
||||
},
|
||||
isConverting,
|
||||
setIsConverting,
|
||||
|
17
client/demo_v13/src/components/201_Dialog.tsx
Normal file
17
client/demo_v13/src/components/201_Dialog.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import React from "react";
|
||||
import { useAppState } from "../001_provider/001_AppStateProvider";
|
||||
import { LicenseDialog } from "./202_LicenseDialog";
|
||||
|
||||
export const Dialog = () => {
|
||||
const { frontendManagerState } = useAppState();
|
||||
|
||||
return (
|
||||
<div>
|
||||
{frontendManagerState.stateControls.showLicenseCheckbox.trigger}
|
||||
<div className="dialog-container" id="dialog">
|
||||
{frontendManagerState.stateControls.showLicenseCheckbox.trigger}
|
||||
<LicenseDialog></LicenseDialog>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
44
client/demo_v13/src/components/202_LicenseDialog.tsx
Normal file
44
client/demo_v13/src/components/202_LicenseDialog.tsx
Normal file
@ -0,0 +1,44 @@
|
||||
import { getLicenceInfo } from "@dannadori/voice-changer-client-js";
|
||||
import React, { useMemo } from "react";
|
||||
import { useAppState } from "../001_provider/001_AppStateProvider";
|
||||
|
||||
export const LicenseDialog = () => {
|
||||
const { frontendManagerState } = useAppState();
|
||||
|
||||
const form = useMemo(() => {
|
||||
const closeButtonRow = (
|
||||
<div className="body-row split-3-4-3 left-padding-1">
|
||||
<div className="body-item-text">
|
||||
</div>
|
||||
<div className="body-button-container body-button-container-space-around">
|
||||
<div className="body-button" onClick={() => { frontendManagerState.stateControls.showLicenseCheckbox.updateState(false) }} >close</div>
|
||||
</div>
|
||||
<div className="body-item-text"></div>
|
||||
</div>
|
||||
)
|
||||
const records = getLicenceInfo().map(x => {
|
||||
return (
|
||||
<div key={x.url} className="body-row split-3-4-3 left-padding-1">
|
||||
<div className="body-item-text">
|
||||
<a href={x.url} target="_blank" rel="noopener noreferrer">{x.name}</a>
|
||||
</div>
|
||||
<div className="body-item-text">
|
||||
<a href={x.licenseUrl} target="_blank" rel="noopener noreferrer">{x.license}</a>
|
||||
</div>
|
||||
<div className="body-item-text"></div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
return (
|
||||
<div className="dialog-frame">
|
||||
<div className="dialog-title">License</div>
|
||||
<div className="dialog-content">
|
||||
<div className={"dialog-application-title"}>Voice Changer Demo</div>
|
||||
{records}
|
||||
{closeButtonRow}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}, []);
|
||||
return form;
|
||||
};
|
@ -216,6 +216,24 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.split-3-4-3 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
margin: 1px 0px 1px 0px;
|
||||
& > div:nth-child(1) {
|
||||
left: 0px;
|
||||
width: 30%;
|
||||
}
|
||||
& > div:nth-child(2) {
|
||||
left: 30%;
|
||||
width: 40%;
|
||||
}
|
||||
& > div:nth-child(3) {
|
||||
left: 70%;
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
.split-2-5-3 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
@ -509,6 +527,11 @@ body {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.body-button-container-space-around {
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.body-select {
|
||||
color: rgb(30, 30, 30);
|
||||
max-width: 100%;
|
||||
@ -538,3 +561,92 @@ body {
|
||||
border-radius: 35px;
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
/* Dialog */
|
||||
.dialog-container {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: -1;
|
||||
display: none;
|
||||
.dialog-frame {
|
||||
color: var(--company-color2);
|
||||
width: 40rem;
|
||||
border: 2px solid var(--dialog-border-color);
|
||||
border-radius: 20px;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-shadow: 5px 5px 5px var(--dialog-shadow-color);
|
||||
background: var(--dialog-background-color);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
.dialog-title {
|
||||
margin-top: 20px;
|
||||
background: var(--company-color2);
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.dialog-content {
|
||||
width: 90%;
|
||||
.dialog-application-title {
|
||||
font-family: "Chicle", cursive;
|
||||
font-size: 3rem;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.dialog-container-show {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.state-control-checkbox:checked ~ .dialog-container {
|
||||
background: rgba(200, 200, 200, 0.4);
|
||||
animation-name: dialog-show;
|
||||
animation-duration: 0.4s;
|
||||
animation-iteration-count: 1;
|
||||
animation-fill-mode: forwards;
|
||||
animation-direction: normal;
|
||||
}
|
||||
.state-control-checkbox ~ .dialog-container {
|
||||
background: rgba(100, 100, 100, 0.4);
|
||||
animation-name: dialog-hide;
|
||||
animation-duration: 0.4s;
|
||||
animation-iteration-count: 1;
|
||||
animation-fill-mode: forwards;
|
||||
animation-direction: normal;
|
||||
}
|
||||
|
||||
@keyframes dialog-hide {
|
||||
from {
|
||||
opacity: 1;
|
||||
z-index: 200;
|
||||
}
|
||||
90% {
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dialog-show {
|
||||
from {
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
10% {
|
||||
z-index: 200;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
z-index: 200;
|
||||
}
|
||||
}
|
||||
|
2
client/demo_v15/dist/index.js
vendored
2
client/demo_v15/dist/index.js
vendored
File diff suppressed because one or more lines are too long
42
client/demo_v15/package-lock.json
generated
42
client/demo_v15/package-lock.json
generated
@ -9,7 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@dannadori/voice-changer-client-js": "^1.0.88",
|
||||
"@dannadori/voice-changer-client-js": "^1.0.90",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.3.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.3.0",
|
||||
@ -23,7 +23,7 @@
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.0",
|
||||
"@types/node": "^18.15.0",
|
||||
"@types/node": "^18.15.3",
|
||||
"@types/react": "^18.0.28",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"autoprefixer": "^10.4.14",
|
||||
@ -42,7 +42,7 @@
|
||||
"postcss-nested": "^6.0.1",
|
||||
"prettier": "^2.8.4",
|
||||
"rimraf": "^4.4.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"style-loader": "^3.3.2",
|
||||
"ts-loader": "^9.4.2",
|
||||
"tsconfig-paths": "^4.1.2",
|
||||
"typescript": "^4.9.5",
|
||||
@ -3187,9 +3187,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@dannadori/voice-changer-client-js": {
|
||||
"version": "1.0.88",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.88.tgz",
|
||||
"integrity": "sha512-LdqtpnOr5r9mxck81uUgpC5mVGjpvyAOuVE2Waa0TR1511gag6QD4isOWmaaZ5TLi1E62LqGoP0zHXj86+5M+g==",
|
||||
"version": "1.0.90",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.90.tgz",
|
||||
"integrity": "sha512-+OEfe3Izmz43k4OlaM0WNCVglUfSJibLDheplN+Yo1jRdSny6Rc8AusGFOCPKLtRB1JYkCAEagZsfoEfOxUzVQ==",
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
"amazon-chime-sdk-js": "^3.11.0",
|
||||
@ -3802,9 +3802,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.15.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.0.tgz",
|
||||
"integrity": "sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w=="
|
||||
"version": "18.15.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz",
|
||||
"integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw=="
|
||||
},
|
||||
"node_modules/@types/parse-json": {
|
||||
"version": "4.0.0",
|
||||
@ -9990,9 +9990,9 @@
|
||||
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
|
||||
},
|
||||
"node_modules/style-loader": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
|
||||
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.2.tgz",
|
||||
"integrity": "sha512-RHs/vcrKdQK8wZliteNK4NKzxvLBzpuHMqYmUVWeKa6MkaIQ97ZTOS0b+zapZhy6GcrgWnvWYCMHRirC3FsUmw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 12.13.0"
|
||||
@ -13547,9 +13547,9 @@
|
||||
}
|
||||
},
|
||||
"@dannadori/voice-changer-client-js": {
|
||||
"version": "1.0.88",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.88.tgz",
|
||||
"integrity": "sha512-LdqtpnOr5r9mxck81uUgpC5mVGjpvyAOuVE2Waa0TR1511gag6QD4isOWmaaZ5TLi1E62LqGoP0zHXj86+5M+g==",
|
||||
"version": "1.0.90",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.90.tgz",
|
||||
"integrity": "sha512-+OEfe3Izmz43k4OlaM0WNCVglUfSJibLDheplN+Yo1jRdSny6Rc8AusGFOCPKLtRB1JYkCAEagZsfoEfOxUzVQ==",
|
||||
"requires": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
"amazon-chime-sdk-js": "^3.11.0",
|
||||
@ -14059,9 +14059,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "18.15.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.0.tgz",
|
||||
"integrity": "sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w=="
|
||||
"version": "18.15.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz",
|
||||
"integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw=="
|
||||
},
|
||||
"@types/parse-json": {
|
||||
"version": "4.0.0",
|
||||
@ -18721,9 +18721,9 @@
|
||||
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
|
||||
},
|
||||
"style-loader": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
|
||||
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.2.tgz",
|
||||
"integrity": "sha512-RHs/vcrKdQK8wZliteNK4NKzxvLBzpuHMqYmUVWeKa6MkaIQ97ZTOS0b+zapZhy6GcrgWnvWYCMHRirC3FsUmw==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
|
@ -23,7 +23,7 @@
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.0",
|
||||
"@types/node": "^18.15.0",
|
||||
"@types/node": "^18.15.3",
|
||||
"@types/react": "^18.0.28",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"autoprefixer": "^10.4.14",
|
||||
@ -42,7 +42,7 @@
|
||||
"postcss-nested": "^6.0.1",
|
||||
"prettier": "^2.8.4",
|
||||
"rimraf": "^4.4.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"style-loader": "^3.3.2",
|
||||
"ts-loader": "^9.4.2",
|
||||
"tsconfig-paths": "^4.1.2",
|
||||
"typescript": "^4.9.5",
|
||||
@ -51,7 +51,7 @@
|
||||
"webpack-dev-server": "^4.11.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dannadori/voice-changer-client-js": "^1.0.88",
|
||||
"@dannadori/voice-changer-client-js": "^1.0.90",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.3.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.3.0",
|
||||
|
@ -13,6 +13,7 @@ import { AppRootProvider } from "./001_provider/001_AppRootProvider";
|
||||
import ErrorBoundary from "./001_provider/900_ErrorBoundary";
|
||||
import { INDEXEDDB_KEY_CLIENT, INDEXEDDB_KEY_MODEL_DATA, INDEXEDDB_KEY_SERVER, INDEXEDDB_KEY_WORKLET, INDEXEDDB_KEY_WORKLETNODE, useIndexedDB } from "@dannadori/voice-changer-client-js";
|
||||
import { CLIENT_TYPE, INDEXEDDB_KEY_AUDIO_OUTPUT, isDesktopApp } from "./const";
|
||||
import { Dialog } from "./components/201_Dialog";
|
||||
|
||||
library.add(fas, far, fab);
|
||||
|
||||
@ -72,15 +73,23 @@ const App = () => {
|
||||
<span>donate(寄付)</span>
|
||||
</a>
|
||||
)
|
||||
|
||||
const licenseButton = (
|
||||
<span className="link" onClick={() => {
|
||||
document.getElementById("dialog")?.classList.add("dialog-container-show")
|
||||
appState.frontendManagerState.stateControls.showLicenseCheckbox.updateState(true)
|
||||
}}>
|
||||
<span>License</span>
|
||||
</span>
|
||||
)
|
||||
return (
|
||||
<div className="top-title">
|
||||
<span className="title">Voice Changer Setting</span>
|
||||
<span className="top-title-version">for so-vits-svc 40v2</span>
|
||||
<span className="top-title-version">for MMVC v.1.5.x</span>
|
||||
<span className="belongings">
|
||||
{githubLink}
|
||||
{manualLink}
|
||||
{coffeeLink}
|
||||
{licenseButton}
|
||||
</span>
|
||||
<span className="belongings">
|
||||
|
||||
@ -112,6 +121,7 @@ const App = () => {
|
||||
return (
|
||||
<>
|
||||
<div className="main-body">
|
||||
<Dialog />
|
||||
{titleRow}
|
||||
{clearRow}
|
||||
{voiceChangerSetting}
|
||||
|
@ -10,6 +10,8 @@ export type StateControls = {
|
||||
openSpeakerSettingCheckbox: StateControlCheckbox
|
||||
openConverterSettingCheckbox: StateControlCheckbox
|
||||
openAdvancedSettingCheckbox: StateControlCheckbox
|
||||
|
||||
showLicenseCheckbox: StateControlCheckbox
|
||||
}
|
||||
|
||||
type FrontendManagerState = {
|
||||
@ -36,6 +38,8 @@ export const useFrontendManager = (): FrontendManagerStateAndMethod => {
|
||||
const openConverterSettingCheckbox = useStateControlCheckbox(OpenConverterSettingCheckbox);
|
||||
const openAdvancedSettingCheckbox = useStateControlCheckbox(OpenAdvancedSettingCheckbox);
|
||||
|
||||
const showLicenseCheckbox = useStateControlCheckbox("leave-checkbox");
|
||||
|
||||
useEffect(() => {
|
||||
openServerControlCheckbox.updateState(true)
|
||||
openModelSettingCheckbox.updateState(true)
|
||||
@ -56,7 +60,9 @@ export const useFrontendManager = (): FrontendManagerStateAndMethod => {
|
||||
openQualityControlCheckbox,
|
||||
openSpeakerSettingCheckbox,
|
||||
openConverterSettingCheckbox,
|
||||
openAdvancedSettingCheckbox
|
||||
openAdvancedSettingCheckbox,
|
||||
|
||||
showLicenseCheckbox
|
||||
},
|
||||
isConverting,
|
||||
setIsConverting,
|
||||
|
17
client/demo_v15/src/components/201_Dialog.tsx
Normal file
17
client/demo_v15/src/components/201_Dialog.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import React from "react";
|
||||
import { useAppState } from "../001_provider/001_AppStateProvider";
|
||||
import { LicenseDialog } from "./202_LicenseDialog";
|
||||
|
||||
export const Dialog = () => {
|
||||
const { frontendManagerState } = useAppState();
|
||||
|
||||
return (
|
||||
<div>
|
||||
{frontendManagerState.stateControls.showLicenseCheckbox.trigger}
|
||||
<div className="dialog-container" id="dialog">
|
||||
{frontendManagerState.stateControls.showLicenseCheckbox.trigger}
|
||||
<LicenseDialog></LicenseDialog>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
44
client/demo_v15/src/components/202_LicenseDialog.tsx
Normal file
44
client/demo_v15/src/components/202_LicenseDialog.tsx
Normal file
@ -0,0 +1,44 @@
|
||||
import { getLicenceInfo } from "@dannadori/voice-changer-client-js";
|
||||
import React, { useMemo } from "react";
|
||||
import { useAppState } from "../001_provider/001_AppStateProvider";
|
||||
|
||||
export const LicenseDialog = () => {
|
||||
const { frontendManagerState } = useAppState();
|
||||
|
||||
const form = useMemo(() => {
|
||||
const closeButtonRow = (
|
||||
<div className="body-row split-3-4-3 left-padding-1">
|
||||
<div className="body-item-text">
|
||||
</div>
|
||||
<div className="body-button-container body-button-container-space-around">
|
||||
<div className="body-button" onClick={() => { frontendManagerState.stateControls.showLicenseCheckbox.updateState(false) }} >close</div>
|
||||
</div>
|
||||
<div className="body-item-text"></div>
|
||||
</div>
|
||||
)
|
||||
const records = getLicenceInfo().map(x => {
|
||||
return (
|
||||
<div key={x.url} className="body-row split-3-4-3 left-padding-1">
|
||||
<div className="body-item-text">
|
||||
<a href={x.url} target="_blank" rel="noopener noreferrer">{x.name}</a>
|
||||
</div>
|
||||
<div className="body-item-text">
|
||||
<a href={x.licenseUrl} target="_blank" rel="noopener noreferrer">{x.license}</a>
|
||||
</div>
|
||||
<div className="body-item-text"></div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
return (
|
||||
<div className="dialog-frame">
|
||||
<div className="dialog-title">License</div>
|
||||
<div className="dialog-content">
|
||||
<div className={"dialog-application-title"}>Voice Changer Demo</div>
|
||||
{records}
|
||||
{closeButtonRow}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}, []);
|
||||
return form;
|
||||
};
|
@ -216,6 +216,24 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.split-3-4-3 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
margin: 1px 0px 1px 0px;
|
||||
& > div:nth-child(1) {
|
||||
left: 0px;
|
||||
width: 30%;
|
||||
}
|
||||
& > div:nth-child(2) {
|
||||
left: 30%;
|
||||
width: 40%;
|
||||
}
|
||||
& > div:nth-child(3) {
|
||||
left: 70%;
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
.split-2-5-3 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
@ -509,6 +527,11 @@ body {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.body-button-container-space-around {
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.body-select {
|
||||
color: rgb(30, 30, 30);
|
||||
max-width: 100%;
|
||||
@ -538,3 +561,92 @@ body {
|
||||
border-radius: 35px;
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
/* Dialog */
|
||||
.dialog-container {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: -1;
|
||||
display: none;
|
||||
.dialog-frame {
|
||||
color: var(--company-color2);
|
||||
width: 40rem;
|
||||
border: 2px solid var(--dialog-border-color);
|
||||
border-radius: 20px;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-shadow: 5px 5px 5px var(--dialog-shadow-color);
|
||||
background: var(--dialog-background-color);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
.dialog-title {
|
||||
margin-top: 20px;
|
||||
background: var(--company-color2);
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.dialog-content {
|
||||
width: 90%;
|
||||
.dialog-application-title {
|
||||
font-family: "Chicle", cursive;
|
||||
font-size: 3rem;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.dialog-container-show {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.state-control-checkbox:checked ~ .dialog-container {
|
||||
background: rgba(200, 200, 200, 0.4);
|
||||
animation-name: dialog-show;
|
||||
animation-duration: 0.4s;
|
||||
animation-iteration-count: 1;
|
||||
animation-fill-mode: forwards;
|
||||
animation-direction: normal;
|
||||
}
|
||||
.state-control-checkbox ~ .dialog-container {
|
||||
background: rgba(100, 100, 100, 0.4);
|
||||
animation-name: dialog-hide;
|
||||
animation-duration: 0.4s;
|
||||
animation-iteration-count: 1;
|
||||
animation-fill-mode: forwards;
|
||||
animation-direction: normal;
|
||||
}
|
||||
|
||||
@keyframes dialog-hide {
|
||||
from {
|
||||
opacity: 1;
|
||||
z-index: 200;
|
||||
}
|
||||
90% {
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dialog-show {
|
||||
from {
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
10% {
|
||||
z-index: 200;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
z-index: 200;
|
||||
}
|
||||
}
|
||||
|
4
client/lib/package-lock.json
generated
4
client/lib/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@dannadori/voice-changer-client-js",
|
||||
"version": "1.0.88",
|
||||
"version": "1.0.90",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@dannadori/voice-changer-client-js",
|
||||
"version": "1.0.88",
|
||||
"version": "1.0.90",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@dannadori/voice-changer-client-js",
|
||||
"version": "1.0.88",
|
||||
"version": "1.0.90",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"directories": {
|
||||
|
40
client/lib/src/License.ts
Normal file
40
client/lib/src/License.ts
Normal file
@ -0,0 +1,40 @@
|
||||
export type LicenseInfo = {
|
||||
name: string,
|
||||
url: string
|
||||
license: string,
|
||||
licenseUrl: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export const getLicenceInfo = (): LicenseInfo[] => {
|
||||
return [
|
||||
{
|
||||
name: "VC Helper",
|
||||
url: "https://github.com/w-okada/voice-changer",
|
||||
license: "MIT",
|
||||
licenseUrl: "https://raw.githubusercontent.com/w-okada/voice-changer/master/LICENSE",
|
||||
description: ""
|
||||
},
|
||||
{
|
||||
name: "MMVC",
|
||||
url: "https://github.com/isletennos/MMVC_Trainer",
|
||||
license: "MIT",
|
||||
licenseUrl: "https://raw.githubusercontent.com/isletennos/MMVC_Trainer/main/LICENSE",
|
||||
description: ""
|
||||
},
|
||||
{
|
||||
name: "so-vits-svc",
|
||||
url: "https://github.com/svc-develop-team/so-vits-svc",
|
||||
license: "MIT",
|
||||
licenseUrl: "https://github.com/svc-develop-team/so-vits-svc/blob/4.0/LICENSE",
|
||||
description: ""
|
||||
},
|
||||
{
|
||||
name: "ContentVec",
|
||||
url: "https://github.com/auspicious3000/contentvec",
|
||||
license: "MIT",
|
||||
licenseUrl: "https://raw.githubusercontent.com/auspicious3000/contentvec/main/LICENSE",
|
||||
description: ""
|
||||
},
|
||||
]
|
||||
}
|
@ -3,3 +3,4 @@ export * from "./VoiceChangerClient"
|
||||
export * from "./util"
|
||||
export * from "./hooks/useClient"
|
||||
export * from "./hooks/useIndexedDB"
|
||||
export * from "./License"
|
@ -180,12 +180,14 @@ class SoVitsSvc40v2:
|
||||
c = utils.repeat_expand_2d(c.squeeze(0), f0.shape[1])
|
||||
|
||||
if self.settings.clusterInferRatio != 0 and hasattr(self, "cluster_model") and self.cluster_model != None:
|
||||
print("use cluster")
|
||||
# self.hsp.spk.tsukuyomi
|
||||
cluster_c = cluster.get_cluster_center_result(self.cluster_model, c.cpu().numpy().T, "tsukuyomi").T
|
||||
# cluster_c = cluster.get_cluster_center_result(self.cluster_model, c.cpu().numpy().T, self.settings.dstId).T
|
||||
cluster_c = torch.FloatTensor(cluster_c).cpu()
|
||||
c = self.settings.clusterInferRatio * cluster_c + (1 - self.settings.clusterInferRatio) * c
|
||||
speaker = [key for key, value in self.settings.speakers.items() if value == self.settings.dstId]
|
||||
if len(speaker) != 1:
|
||||
print("not only one speaker found.", speaker)
|
||||
else:
|
||||
cluster_c = cluster.get_cluster_center_result(self.cluster_model, c.cpu().numpy().T, speaker[0]).T
|
||||
# cluster_c = cluster.get_cluster_center_result(self.cluster_model, c.cpu().numpy().T, self.settings.dstId).T
|
||||
cluster_c = torch.FloatTensor(cluster_c).cpu()
|
||||
c = self.settings.clusterInferRatio * cluster_c + (1 - self.settings.clusterInferRatio) * c
|
||||
|
||||
c = c.unsqueeze(0)
|
||||
return c, f0, uv
|
||||
|
Loading…
Reference in New Issue
Block a user