mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 13:35:12 +03:00
dstid selector for ddsp-svc
This commit is contained in:
parent
975fea2458
commit
04d3937818
@ -95,10 +95,9 @@
|
||||
],
|
||||
"speakerSetting": [
|
||||
{
|
||||
"name": "dstId",
|
||||
"name": "dstId2",
|
||||
"options": {
|
||||
"showF0": true,
|
||||
"useServerInfo": false
|
||||
"selectableIds": [1, 2]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
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
28
client/demo/package-lock.json
generated
28
client/demo/package-lock.json
generated
@ -9,7 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@dannadori/voice-changer-client-js": "^1.0.108",
|
||||
"@dannadori/voice-changer-client-js": "^1.0.109",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.4.0",
|
||||
@ -24,7 +24,7 @@
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.4",
|
||||
"@types/node": "^18.15.11",
|
||||
"@types/react": "^18.0.35",
|
||||
"@types/react": "^18.0.37",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"babel-loader": "^9.1.2",
|
||||
@ -3097,9 +3097,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@dannadori/voice-changer-client-js": {
|
||||
"version": "1.0.108",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.108.tgz",
|
||||
"integrity": "sha512-QtqsSClUC/8bKdJJpTyI5zOjK1VO6sQRVHHrGzBVB3zU9hURnUJzOXaDDBf9XdJqD9R5UEIpUWg7YEPyKH+0Iw==",
|
||||
"version": "1.0.109",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.109.tgz",
|
||||
"integrity": "sha512-d3f+kPV1ZAymRABP46JdGX/mBQftcpd8yIOvOnNiEis1+EiKbgfV+MMGjfN6MTzvQfp9CGIjJkWsnztqUj6a5w==",
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
"amazon-chime-sdk-js": "^3.13.0",
|
||||
@ -3710,9 +3710,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "18.0.35",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.35.tgz",
|
||||
"integrity": "sha512-6Laome31HpetaIUGFWl1VQ3mdSImwxtFZ39rh059a1MNnKGqBpC88J6NJ8n/Is3Qx7CefDGLgf/KhN/sYCf7ag==",
|
||||
"version": "18.0.37",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.37.tgz",
|
||||
"integrity": "sha512-4yaZZtkRN3ZIQD3KSEwkfcik8s0SWV+82dlJot1AbGYHCzJkWP3ENBY6wYeDRmKZ6HkrgoGAmR2HqdwYGp6OEw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
@ -12882,9 +12882,9 @@
|
||||
}
|
||||
},
|
||||
"@dannadori/voice-changer-client-js": {
|
||||
"version": "1.0.108",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.108.tgz",
|
||||
"integrity": "sha512-QtqsSClUC/8bKdJJpTyI5zOjK1VO6sQRVHHrGzBVB3zU9hURnUJzOXaDDBf9XdJqD9R5UEIpUWg7YEPyKH+0Iw==",
|
||||
"version": "1.0.109",
|
||||
"resolved": "https://registry.npmjs.org/@dannadori/voice-changer-client-js/-/voice-changer-client-js-1.0.109.tgz",
|
||||
"integrity": "sha512-d3f+kPV1ZAymRABP46JdGX/mBQftcpd8yIOvOnNiEis1+EiKbgfV+MMGjfN6MTzvQfp9CGIjJkWsnztqUj6a5w==",
|
||||
"requires": {
|
||||
"@types/readable-stream": "^2.3.15",
|
||||
"amazon-chime-sdk-js": "^3.13.0",
|
||||
@ -13338,9 +13338,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/react": {
|
||||
"version": "18.0.35",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.35.tgz",
|
||||
"integrity": "sha512-6Laome31HpetaIUGFWl1VQ3mdSImwxtFZ39rh059a1MNnKGqBpC88J6NJ8n/Is3Qx7CefDGLgf/KhN/sYCf7ag==",
|
||||
"version": "18.0.37",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.37.tgz",
|
||||
"integrity": "sha512-4yaZZtkRN3ZIQD3KSEwkfcik8s0SWV+82dlJot1AbGYHCzJkWP3ENBY6wYeDRmKZ6HkrgoGAmR2HqdwYGp6OEw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/prop-types": "*",
|
||||
|
@ -24,7 +24,7 @@
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.4",
|
||||
"@types/node": "^18.15.11",
|
||||
"@types/react": "^18.0.35",
|
||||
"@types/react": "^18.0.37",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"babel-loader": "^9.1.2",
|
||||
@ -51,7 +51,7 @@
|
||||
"webpack-dev-server": "^4.13.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dannadori/voice-changer-client-js": "^1.0.108",
|
||||
"@dannadori/voice-changer-client-js": "^1.0.109",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.4.0",
|
||||
|
@ -95,10 +95,9 @@
|
||||
],
|
||||
"speakerSetting": [
|
||||
{
|
||||
"name": "dstId",
|
||||
"name": "dstId2",
|
||||
"options": {
|
||||
"showF0": true,
|
||||
"useServerInfo": false
|
||||
"selectableIds": [1, 2]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -39,6 +39,7 @@ import { ModelSamplingRateRow, ModelSamplingRateRowProps } from "./components/30
|
||||
// import { OnnxExportRow, OnnxExportRowProps } from "./components/304_OnnxExportRow"
|
||||
import { SolaEnableRow, SolaEnableRowProps } from "./components/811_SolaEnableRow"
|
||||
import { EnableEnhancerRow, EnableEnhancerRowProps } from "./components/610_EnableEnhancerRow"
|
||||
import { DstIdRow2, DstIdRow2Props } from "./components/602v2_DstIdRow2"
|
||||
|
||||
export const catalog: { [key: string]: (props: any) => JSX.Element } = {}
|
||||
|
||||
@ -79,6 +80,7 @@ const initialize = () => {
|
||||
|
||||
addToCatalog("srcId", (props: SrcIdRowProps) => { return <SrcIdRow {...props} /> })
|
||||
addToCatalog("dstId", (props: DstIdRowProps) => { return <DstIdRow {...props} /> })
|
||||
addToCatalog("dstId2", (props: DstIdRow2Props) => { return <DstIdRow2 {...props} /> })
|
||||
addToCatalog("editSpeakerIdMapping", (props: EditSpeakerIdMappingRowProps) => { return <EditSpeakerIdMappingRow {...props} /> })
|
||||
addToCatalog("f0Factor", (props: F0FactorRowProps) => { return <F0FactorRow {...props} /> })
|
||||
addToCatalog("tune", (props: TuneRowProps) => { return <TuneRow {...props} /> })
|
||||
|
@ -0,0 +1,40 @@
|
||||
import React, { useMemo } from "react"
|
||||
import { useAppState } from "../../../001_provider/001_AppStateProvider"
|
||||
import { ServerInfoSoVitsSVC } from "@dannadori/voice-changer-client-js";
|
||||
|
||||
export type DstIdRow2Props = {
|
||||
selectableIds: (number | string)[]
|
||||
}
|
||||
|
||||
export const DstIdRow2 = (props: DstIdRow2Props) => {
|
||||
const appState = useAppState()
|
||||
|
||||
const dstIdRow = useMemo(() => {
|
||||
return (
|
||||
<div className="body-row split-3-2-1-4 left-padding-1 guided">
|
||||
<div className="body-item-title left-padding-1">Destination Speaker Id</div>
|
||||
<div className="body-select-container">
|
||||
<select className="body-select" value={appState.serverSetting.serverSetting.dstId} onChange={(e) => {
|
||||
appState.serverSetting.updateServerSettings({ ...appState.serverSetting.serverSetting, dstId: Number(e.target.value) })
|
||||
}}>
|
||||
{
|
||||
props.selectableIds.map(x => {
|
||||
return <option key={x} value={x}>{x}({x})</option>
|
||||
})
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div className="body-item-text">
|
||||
</div>
|
||||
<div className="body-item-text"></div>
|
||||
</div>
|
||||
)
|
||||
}, [appState.serverSetting.serverSetting, appState.serverSetting.updateServerSettings])
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
{dstIdRow}
|
||||
</>
|
||||
)
|
||||
}
|
@ -275,7 +275,7 @@ class DDSP_SVC:
|
||||
# return np.zeros(convertSize).astype(np.int16)
|
||||
|
||||
with torch.no_grad():
|
||||
spk_id = torch.LongTensor(np.array([[int(1)]])).to(self.useDevice())
|
||||
spk_id = torch.LongTensor(np.array([[self.settings.dstId]])).to(self.useDevice())
|
||||
seg_output, _, (s_h, s_n) = self.model(c, f0, volume, spk_id=spk_id, spk_mix_dict=None)
|
||||
seg_output *= mask
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user