Destination Speaker Id
@@ -31,10 +34,8 @@ export const DstIdRow = () => {
)
}, [appState.serverSetting.serverSetting, appState.clientSetting.clientSetting.speakers, appState.serverSetting.updateServerSettings])
-
-
const dstIdRowWithF0 = useMemo(() => {
- if (!speakerSetting.showSpeakerF0) {
+ if (clientId != "MMVCv15") {
return <>>
}
const selected = appState.clientSetting.clientSetting.correspondences?.find(x => {
@@ -63,16 +64,45 @@ export const DstIdRow = () => {
)
-
-
-
}, [appState.serverSetting.serverSetting, appState.serverSetting.updateServerSettings, appState.clientSetting.clientSetting.correspondences])
+ const dstIdRowFromServer = useMemo(() => {
+ const settings = appState.serverSetting.serverSetting as ServerInfoSoVitsSVC
+ const speakers = settings.speakers
+ if (!speakers) {
+ return <>>
+ }
+
+ const currentValue = Object.values(speakers).includes(appState.serverSetting.serverSetting.dstId) ? appState.serverSetting.serverSetting.dstId : -1
+
+ return (
+
+
Destination Speaker Id
+
+
+
+
+
+
+
+ )
+ }, [appState.serverSetting.serverSetting, appState.serverSetting.updateServerSettings, appState.clientSetting.clientSetting.correspondences])
return (
<>
{dstIdRow}
{dstIdRowWithF0}
+ {dstIdRowFromServer}
>
)
}
\ No newline at end of file
diff --git a/client/demo_v13/src/components/demo/603_EditSpeakerIdMappingRow.tsx b/client/demo_v13/src/components/demo/603_EditSpeakerIdMappingRow.tsx
index d7ede661..982824c2 100644
--- a/client/demo_v13/src/components/demo/603_EditSpeakerIdMappingRow.tsx
+++ b/client/demo_v13/src/components/demo/603_EditSpeakerIdMappingRow.tsx
@@ -1,9 +1,11 @@
import React, { useMemo, useState } from "react"
+import { useAppRoot } from "../../001_provider/001_AppRootProvider"
import { useAppState } from "../../001_provider/001_AppStateProvider"
export const EditSpeakerIdMappingRow = () => {
const appState = useAppState()
- const speakerSetting = appState.appGuiSettingState.appGuiSetting.front.speakerSetting
+ const { appGuiSettingState } = useAppRoot()
+ const speakerSetting = appGuiSettingState.appGuiSetting.front.speakerSetting
const [editSpeakerTargetId, setEditSpeakerTargetId] = useState