improve gui for so-vits-svc
This commit is contained in:
parent
0fc36c91af
commit
9c62da1a5d
4
client/demo_so-vits-svc_40v2/dist/index.js
vendored
4
client/demo_so-vits-svc_40v2/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -10,7 +10,8 @@ export type ServerSettingState = {
|
||||
|
||||
export const useModelSettingArea = (): ServerSettingState => {
|
||||
const appState = useAppState()
|
||||
const [showPyTorch, setShowPyTorch] = useState<boolean>(false)
|
||||
// const [showPyTorch, setShowPyTorch] = useState<boolean>(false)
|
||||
const [showPyTorch, setShowPyTorch] = useState<boolean>(true)
|
||||
|
||||
const accodionButton = useMemo(() => {
|
||||
const accodionButtonProps: HeaderButtonProps = {
|
||||
@ -107,9 +108,9 @@ export const useModelSettingArea = (): ServerSettingState => {
|
||||
</div>
|
||||
<div className="body-item-text">
|
||||
<div>
|
||||
<input type="checkbox" checked={showPyTorch} onChange={(e) => {
|
||||
{/* <input type="checkbox" checked={showPyTorch} onChange={(e) => {
|
||||
setShowPyTorch(e.target.checked)
|
||||
}} /> enable PyTorch
|
||||
}} /> enable PyTorch */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -124,7 +125,7 @@ export const useModelSettingArea = (): ServerSettingState => {
|
||||
<div className="body-button left-margin-1" onClick={onConfigFileClearClicked}>clear</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="body-row split-3-3-4 left-padding-1 guided">
|
||||
{/* <div className="body-row split-3-3-4 left-padding-1 guided">
|
||||
<div className="body-item-title left-padding-2">Onnx(.onnx)</div>
|
||||
<div className="body-item-text">
|
||||
<div>{onnxModelFilenameText}</div>
|
||||
@ -133,7 +134,7 @@ export const useModelSettingArea = (): ServerSettingState => {
|
||||
<div className="body-button" onClick={onOnnxFileLoadClicked}>select</div>
|
||||
<div className="body-button left-margin-1" onClick={onOnnxFileClearClicked}>clear</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
{showPyTorch ?
|
||||
(
|
||||
<div className="body-row split-3-3-4 left-padding-1 guided">
|
||||
@ -175,26 +176,27 @@ export const useModelSettingArea = (): ServerSettingState => {
|
||||
showPyTorch])
|
||||
|
||||
const frameworkRow = useMemo(() => {
|
||||
const onFrameworkChanged = async (val: Framework) => {
|
||||
appState.serverSetting.updateServerSettings({ ...appState.serverSetting.serverSetting, framework: val })
|
||||
}
|
||||
return (
|
||||
<div className="body-row split-3-7 left-padding-1 guided">
|
||||
<div className="body-item-title left-padding-1">Framework</div>
|
||||
<div className="body-select-container">
|
||||
<select className="body-select" value={appState.serverSetting.serverSetting.framework} onChange={(e) => {
|
||||
onFrameworkChanged(e.target.value as
|
||||
Framework)
|
||||
}}>
|
||||
{
|
||||
Object.values(Framework).map(x => {
|
||||
return <option key={x} value={x}>{x}</option>
|
||||
})
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
return <></>
|
||||
// const onFrameworkChanged = async (val: Framework) => {
|
||||
// appState.serverSetting.updateServerSettings({ ...appState.serverSetting.serverSetting, framework: val })
|
||||
// }
|
||||
// return (
|
||||
// <div className="body-row split-3-7 left-padding-1 guided">
|
||||
// <div className="body-item-title left-padding-1">Framework</div>
|
||||
// <div className="body-select-container">
|
||||
// <select className="body-select" value={appState.serverSetting.serverSetting.framework} onChange={(e) => {
|
||||
// onFrameworkChanged(e.target.value as
|
||||
// Framework)
|
||||
// }}>
|
||||
// {
|
||||
// Object.values(Framework).map(x => {
|
||||
// return <option key={x} value={x}>{x}</option>
|
||||
// })
|
||||
// }
|
||||
// </select>
|
||||
// </div>
|
||||
// </div>
|
||||
// )
|
||||
}, [appState.serverSetting.serverSetting.framework, appState.serverSetting.updateServerSettings])
|
||||
|
||||
const onnxExecutionProviderRow = useMemo(() => {
|
||||
|
@ -44,9 +44,8 @@ export const useSpeakerSetting = () => {
|
||||
const tranRow = useMemo(() => {
|
||||
return (
|
||||
<div className="body-row split-3-2-2-3 left-padding-1 guided">
|
||||
<div className="body-item-title left-padding-1 ">Tuning</div>
|
||||
<div className="body-item-title left-padding-1 ">Tran</div>
|
||||
<div>
|
||||
<span className="body-item-input-slider-label">tran</span>
|
||||
<input type="range" className="body-item-input-slider" min="-50" max="50" step="1" value={appState.serverSetting.serverSetting.tran} onChange={(e) => {
|
||||
appState.serverSetting.updateServerSettings({ ...appState.serverSetting.serverSetting, tran: Number(e.target.value) })
|
||||
}}></input>
|
||||
@ -67,19 +66,30 @@ export const useSpeakerSetting = () => {
|
||||
])
|
||||
|
||||
|
||||
const noiseControlRow = useMemo(() => {
|
||||
const noiceScaleRow = useMemo(() => {
|
||||
return (
|
||||
<div className="body-row split-3-2-2-3 left-padding-1 guided">
|
||||
<div className="body-item-title left-padding-1 ">Noise Control</div>
|
||||
<div className="body-row split-3-3-4 left-padding-1 guided">
|
||||
<div className="body-item-title left-padding-1 ">Noice Scale</div>
|
||||
<div>
|
||||
<span className="body-item-input-slider-label">n-scale</span>
|
||||
<input type="range" className="body-item-input-slider" min="0" max="1" step="0.1" value={appState.serverSetting.serverSetting.noiceScale} onChange={(e) => {
|
||||
appState.serverSetting.updateServerSettings({ ...appState.serverSetting.serverSetting, noiceScale: Number(e.target.value) })
|
||||
}}></input>
|
||||
<span className="body-item-input-slider-val">{appState.serverSetting.serverSetting.noiceScale}</span>
|
||||
</div>
|
||||
<div className="body-button-container">
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}, [
|
||||
appState.serverSetting.serverSetting,
|
||||
appState.serverSetting.updateServerSettings
|
||||
])
|
||||
|
||||
const silentThresholdRow = useMemo(() => {
|
||||
return (
|
||||
<div className="body-row split-3-3-4 left-padding-1 guided">
|
||||
<div className="body-item-title left-padding-1 ">Silent Threshold</div>
|
||||
<div>
|
||||
<span className="body-item-input-slider-label">silent thr</span>
|
||||
<input type="range" className="body-item-input-slider" min="0.00000" max="0.001" step="0.00001" value={appState.serverSetting.serverSetting.silentThreshold} onChange={(e) => {
|
||||
appState.serverSetting.updateServerSettings({ ...appState.serverSetting.serverSetting, silentThreshold: Number(e.target.value) })
|
||||
}}></input>
|
||||
@ -95,7 +105,6 @@ export const useSpeakerSetting = () => {
|
||||
appState.serverSetting.updateServerSettings
|
||||
])
|
||||
|
||||
|
||||
const speakerSetting = useMemo(() => {
|
||||
return (
|
||||
<>
|
||||
@ -113,12 +122,13 @@ export const useSpeakerSetting = () => {
|
||||
<div className="partition-content">
|
||||
{dstIdRow}
|
||||
{tranRow}
|
||||
{noiseControlRow}
|
||||
{noiceScaleRow}
|
||||
{silentThresholdRow}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}, [dstIdRow, tranRow, noiseControlRow])
|
||||
}, [dstIdRow, tranRow, noiceScaleRow, silentThresholdRow])
|
||||
|
||||
return {
|
||||
speakerSetting,
|
||||
|
Loading…
x
Reference in New Issue
Block a user