@@ -41,10 +42,13 @@ export const MessageFormat = (props) => {
);
};
-const ExampleComponent = ({ format, example_view_filter_variable, exampleViewFilterToggleFunction, format_id }) => {
+const ExampleComponent = ({ format, format_id }) => {
const { currentUiLanguage } = useAppearance();
const { t } = useTranslation();
-
+ const {
+ currentMessageFormat_ExampleViewFilter,
+ updateMessageFormat_ExampleViewFilter,
+ } = useStore_MessageFormat_ExampleViewFilter();
const locale_base_path = "config_page.others.message_format_common.example_view.";
@@ -116,8 +120,8 @@ const ExampleComponent = ({ format, example_view_filter_variable, exampleViewFil
};
const svg_class_names = clsx(styles.arrow_left_svg, {
- [styles.to_down]: example_view_filter_variable[format_id] === "Simplified",
- [styles.to_up]: example_view_filter_variable[format_id] === "All"
+ [styles.to_down]: currentMessageFormat_ExampleViewFilter.data[format_id] === "Simplified",
+ [styles.to_up]: currentMessageFormat_ExampleViewFilter.data[format_id] === "All"
});
@@ -151,12 +155,22 @@ const ExampleComponent = ({ format, example_view_filter_variable, exampleViewFil
}
};
+ const exampleViewFilterToggleFunction = (format_id) => {
+ if (["send", "received"].includes(format_id) === false) return console.error(`format_id should be small case 'send' or 'received'. got format_id: ${format_id}`);
+
+ updateMessageFormat_ExampleViewFilter({
+ ...currentMessageFormat_ExampleViewFilter.data,
+ [format_id]: currentMessageFormat_ExampleViewFilter.data[format_id] === "Simplified"
+ ? "All"
+ : "Simplified"
+ });
+ };
return (
{label_title}
-
+
{ format_id === "send" &&
exampleViewFilterToggleFunction(format_id)}>
diff --git a/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx b/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx
index 3328f7f9..e64c5b47 100644
--- a/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx
+++ b/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx
@@ -168,8 +168,6 @@ const SendMessageFormatPartsContainer = () => {
const {
currentSendMessageFormatParts,
setSendMessageFormatParts,
- currentMessageFormat_ExampleViewFilter,
- toggleMessageFormat_ExampleViewFilter,
} = useOthers();
return (
@@ -178,8 +176,6 @@ const SendMessageFormatPartsContainer = () => {
desc={t("config_page.others.send_message_format.desc")}
variable={currentSendMessageFormatParts}
setFunction={setSendMessageFormatParts}
- example_view_filter_variable={currentMessageFormat_ExampleViewFilter.data}
- exampleViewFilterToggleFunction={toggleMessageFormat_ExampleViewFilter}
format_id="send"
/>
);
@@ -190,8 +186,6 @@ const ReceivedMessageFormatPartsContainer = () => {
const {
currentReceivedMessageFormatParts,
setReceivedMessageFormatParts,
- currentMessageFormat_ExampleViewFilter,
- toggleMessageFormat_ExampleViewFilter,
} = useOthers();
return (
@@ -200,8 +194,6 @@ const ReceivedMessageFormatPartsContainer = () => {
desc={t("config_page.others.received_message_format.desc")}
variable={currentReceivedMessageFormatParts}
setFunction={setReceivedMessageFormatParts}
- example_view_filter_variable={currentMessageFormat_ExampleViewFilter.data}
- exampleViewFilterToggleFunction={toggleMessageFormat_ExampleViewFilter}
format_id="received"
/>
);
diff --git a/src-ui/store.js b/src-ui/store.js
index be12b207..b5a91406 100644
--- a/src-ui/store.js
+++ b/src-ui/store.js
@@ -332,10 +332,10 @@ export const { atomInstance: Atom_OverlayShowOnlyTranslatedMessages, useHook: us
// export const { atomInstance: Atom_EnableSendMessageToVrc, useHook: useStore_EnableSendMessageToVrc } = createAtomWithHook(true, "EnableSendMessageToVrc");
// export const { atomInstance: Atom_EnableSendReceivedMessageToVrc, useHook: useStore_EnableSendReceivedMessageToVrc } = createAtomWithHook(false, "EnableSendReceivedMessageToVrc");
// export const { atomInstance: Atom_EnableNotificationVrcSfx, useHook: useStore_EnableNotificationVrcSfx } = createAtomWithHook(true, "EnableNotificationVrcSfx");
-// export const { atomInstance: Atom_MessageFormat_ExampleViewFilter, useHook: useStore_MessageFormat_ExampleViewFilter } = createAtomWithHook({
-// send: "Simplified",
-// received: "Simplified",
-// }, "MessageFormat_ExampleViewFilter");
+export const { atomInstance: Atom_MessageFormat_ExampleViewFilter, useHook: useStore_MessageFormat_ExampleViewFilter } = createAtomWithHook({
+ send: "Simplified",
+ received: "Simplified",
+}, "MessageFormat_ExampleViewFilter");
// export const { atomInstance: Atom_SendMessageFormatParts, useHook: useStore_SendMessageFormatParts } = createAtomWithHook({
// message: {
// prefix: "",
diff --git a/src-ui/ui_config_setter.js b/src-ui/ui_config_setter.js
index d0f6c1b5..aff22a55 100644
--- a/src-ui/ui_config_setter.js
+++ b/src-ui/ui_config_setter.js
@@ -468,14 +468,6 @@ export const SETTINGS_ARRAY = [
logics_template_id: "toggle_enable_disable",
base_endpoint_name: "send_received_message_to_vrc",
},
- {
- Category: "Others",
- Base_Name: "MessageFormat_ExampleViewFilter",
- default_value: {},
- ui_template_id: "object",
- logics_template_id: "get_set",
- base_endpoint_name: "message_format_example_view_filter",
- },
{
Category: "Others",
Base_Name: "SendMessageFormatParts",
From d3ef567ef295ad937661c2e7684c72f9a4742609 Mon Sep 17 00:00:00 2001
From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com>
Date: Wed, 22 Oct 2025 17:34:57 +0900
Subject: [PATCH 5/6] [Refactor/TMP5] Refactor UI components and connect to
backend APIs. (VR(Overlay))
---
src-ui/store.js | 50 ++++++++++++++++++-------------------
src-ui/ui_config_setter.js | 42 +++++++++++++------------------
src-ui/useSettingsLogics.js | 16 ++++++++++++
3 files changed, 59 insertions(+), 49 deletions(-)
diff --git a/src-ui/store.js b/src-ui/store.js
index b5a91406..4eb3f56b 100644
--- a/src-ui/store.js
+++ b/src-ui/store.js
@@ -298,31 +298,31 @@ export const { atomInstance: Atom_IsOpenedMicWordFilterList, useHook: useStore_I
// VR
-export const { atomInstance: Atom_OverlaySmallLogSettings, useHook: useStore_OverlaySmallLogSettings } = createAtomWithHook({
- x_pos: 0.0,
- y_pos: 0.0,
- z_pos: 0.0,
- x_rotation: 0.0,
- y_rotation: 0.0,
- z_rotation: 0.0,
- display_duration: 5,
- fadeout_duration: 2,
- tracker: "HMD",
-}, "OverlaySmallLogSettings");
-export const { atomInstance: Atom_IsEnabledOverlaySmallLog, useHook: useStore_IsEnabledOverlaySmallLog } = createAtomWithHook(false, "IsEnabledOverlaySmallLog");
-export const { atomInstance: Atom_OverlayLargeLogSettings, useHook: useStore_OverlayLargeLogSettings } = createAtomWithHook({
- x_pos: 0.0,
- y_pos: 0.0,
- z_pos: 0.0,
- x_rotation: 0.0,
- y_rotation: 0.0,
- z_rotation: 0.0,
- display_duration: 5,
- fadeout_duration: 2,
- tracker: "HMD",
-}, "OverlayLargeLogSettings");
-export const { atomInstance: Atom_IsEnabledOverlayLargeLog, useHook: useStore_IsEnabledOverlayLargeLog } = createAtomWithHook(false, "IsEnabledOverlayLargeLog");
-export const { atomInstance: Atom_OverlayShowOnlyTranslatedMessages, useHook: useStore_OverlayShowOnlyTranslatedMessages } = createAtomWithHook(false, "OverlayShowOnlyTranslatedMessages");
+// export const { atomInstance: Atom_OverlaySmallLogSettings, useHook: useStore_OverlaySmallLogSettings } = createAtomWithHook({
+// x_pos: 0.0,
+// y_pos: 0.0,
+// z_pos: 0.0,
+// x_rotation: 0.0,
+// y_rotation: 0.0,
+// z_rotation: 0.0,
+// display_duration: 5,
+// fadeout_duration: 2,
+// tracker: "HMD",
+// }, "OverlaySmallLogSettings");
+// export const { atomInstance: Atom_IsEnabledOverlaySmallLog, useHook: useStore_IsEnabledOverlaySmallLog } = createAtomWithHook(false, "IsEnabledOverlaySmallLog");
+// export const { atomInstance: Atom_OverlayLargeLogSettings, useHook: useStore_OverlayLargeLogSettings } = createAtomWithHook({
+// x_pos: 0.0,
+// y_pos: 0.0,
+// z_pos: 0.0,
+// x_rotation: 0.0,
+// y_rotation: 0.0,
+// z_rotation: 0.0,
+// display_duration: 5,
+// fadeout_duration: 2,
+// tracker: "HMD",
+// }, "OverlayLargeLogSettings");
+// export const { atomInstance: Atom_IsEnabledOverlayLargeLog, useHook: useStore_IsEnabledOverlayLargeLog } = createAtomWithHook(false, "IsEnabledOverlayLargeLog");
+// export const { atomInstance: Atom_OverlayShowOnlyTranslatedMessages, useHook: useStore_OverlayShowOnlyTranslatedMessages } = createAtomWithHook(false, "OverlayShowOnlyTranslatedMessages");
// Others
// export const { atomInstance: Atom_EnableAutoClearMessageInputBox, useHook: useStore_EnableAutoClearMessageInputBox } = createAtomWithHook(true, "EnableAutoClearMessageInputBox");
diff --git a/src-ui/ui_config_setter.js b/src-ui/ui_config_setter.js
index aff22a55..889bce48 100644
--- a/src-ui/ui_config_setter.js
+++ b/src-ui/ui_config_setter.js
@@ -3,9 +3,13 @@ import { createAtomWithHook } from "@store";
import {
ctranslate2_weight_type_status,
whisper_weight_type_status,
+ ui_configs,
} from "@ui_configs";
-import { useSettingsLogics } from "./useSettingsLogics";
+import {
+ useSettingsLogics,
+ useConfigFunctions,
+} from "./useSettingsLogics";
export const SETTINGS_ARRAY = [
@@ -378,6 +382,14 @@ export const SETTINGS_ARRAY = [
logics_template_id: "toggle_enable_disable",
base_endpoint_name: "overlay_small_log",
},
+ {
+ Category: "Vr",
+ Base_Name: "OverlaySmallLogSettings",
+ default_value: ui_configs.overlay_small_log_default_settings,
+ ui_template_id: "object",
+ logics_template_id: "get_set",
+ base_endpoint_name: "overlay_small_log_settings",
+ },
{
Category: "Vr",
Base_Name: "IsEnabledOverlayLargeLog",
@@ -386,18 +398,10 @@ export const SETTINGS_ARRAY = [
logics_template_id: "toggle_enable_disable",
base_endpoint_name: "overlay_large_log",
},
- {
- Category: "Vr",
- Base_Name: "OverlaySmallLogSettings",
- default_value: {},
- ui_template_id: "object",
- logics_template_id: "get_set",
- base_endpoint_name: "overlay_small_log_settings",
- },
{
Category: "Vr",
Base_Name: "OverlayLargeLogSettings",
- default_value: {},
+ default_value: ui_configs.overlay_large_log_default_settings,
ui_template_id: "object",
logics_template_id: "get_set",
base_endpoint_name: "overlay_large_log_settings",
@@ -501,16 +505,6 @@ export const SETTINGS_ARRAY = [
base_endpoint_name: "convert_message_to_hiragana",
},
- // Hotkeys
- // {
- // Category: "Hotkeys",
- // Base_Name: "SendMessageHotkey",
- // default_value: "",
- // ui_template_id: "input",
- // logics_template_id: "get_set",
- // base_endpoint_name: "send_message_hotkey",
- // },
-
// AdvancedSettings
{
Category: "AdvancedSettings",
@@ -561,7 +555,7 @@ for (const setting_data of SETTINGS_ARRAY) {
createAtomWithHook(setting_data.default_value, setting_data.Base_Name);
}
-const buildCategoryApiFromSettings = (settings, settingsArray, Category) => {
+const buildCategoryApiFromSettings = (settings, settingsArray, Category, extraFunctions = {}) => {
const api = {};
const filtered = settingsArray.filter((s) => s.Category === Category);
@@ -598,14 +592,14 @@ const buildCategoryApiFromSettings = (settings, settingsArray, Category) => {
if (typeof settings[updateFromBackendKey] === "function") api[updateFromBackendKey] = settings[updateFromBackendKey];
}
}
-
- return api;
+ return { ...api, ...extraFunctions };
};
const createCategoryHook = (Category) => {
return () => {
const { settings } = useSettingsLogics(SETTINGS_ARRAY, Category);
- const autoApi = buildCategoryApiFromSettings(settings, SETTINGS_ARRAY, Category);
+ const extraFunctions = useConfigFunctions(Category);
+ const autoApi = buildCategoryApiFromSettings(settings, SETTINGS_ARRAY, Category, extraFunctions);
return { ...autoApi };
};
};
diff --git a/src-ui/useSettingsLogics.js b/src-ui/useSettingsLogics.js
index 1429cd8a..613c17d4 100644
--- a/src-ui/useSettingsLogics.js
+++ b/src-ui/useSettingsLogics.js
@@ -185,3 +185,19 @@ export const useSettingsLogics = (settingsArray, Category) => {
return { settings: result };
};
+
+
+export const useConfigFunctions = (Category) => {
+ const { asyncStdoutToPython } = useStdoutToPython();
+
+ switch (Category) {
+ case "Vr":
+ return {
+ sendTextToOverlay: (text) => {
+ asyncStdoutToPython("/run/send_text_overlay", text);
+ },
+ };
+ default:
+ return {};
+ }
+};
\ No newline at end of file
From 4fdaf6611ff5acdecba76a8d9b4a833f73e632fe Mon Sep 17 00:00:00 2001
From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com>
Date: Thu, 23 Oct 2025 11:20:05 +0900
Subject: [PATCH 6/6] [Refactor] Remove the commented code that is no longer
needed.
---
.../advanced_settings/useAdvancedSettings.js | 150 ------
.../configs/appearance/useAppearance.js | 207 --------
src-ui/logics/configs/device/useDevice.js | 306 -----------
src-ui/logics/configs/others/useOthers.js | 367 -------------
.../configs/transcription/useTranscription.js | 488 ------------------
.../configs/translation/useTranslation.js | 198 -------
src-ui/logics/configs/vr/useVr.js | 145 ------
src-ui/logics/useReceiveRoutes.js | 233 ---------
src-ui/store.js | 155 +-----
9 files changed, 2 insertions(+), 2247 deletions(-)
delete mode 100644 src-ui/logics/configs/advanced_settings/useAdvancedSettings.js
delete mode 100644 src-ui/logics/configs/appearance/useAppearance.js
delete mode 100644 src-ui/logics/configs/device/useDevice.js
delete mode 100644 src-ui/logics/configs/others/useOthers.js
delete mode 100644 src-ui/logics/configs/transcription/useTranscription.js
delete mode 100644 src-ui/logics/configs/translation/useTranslation.js
delete mode 100644 src-ui/logics/configs/vr/useVr.js
diff --git a/src-ui/logics/configs/advanced_settings/useAdvancedSettings.js b/src-ui/logics/configs/advanced_settings/useAdvancedSettings.js
deleted file mode 100644
index 7bf5652e..00000000
--- a/src-ui/logics/configs/advanced_settings/useAdvancedSettings.js
+++ /dev/null
@@ -1,150 +0,0 @@
-import {
- useStore_OscIpAddress,
- useStore_OscPort,
- useStore_EnableWebsocket,
- useStore_WebsocketHost,
- useStore_WebsocketPort,
-} from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-import { useNotificationStatus } from "@logics_common";
-
-export const useAdvancedSettings = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { showNotification_Error, showNotification_SaveSuccess } = useNotificationStatus();
-
- // OSC IP Address
- const { currentOscIpAddress, updateOscIpAddress, pendingOscIpAddress } = useStore_OscIpAddress();
- // OSC Port
- const { currentOscPort, updateOscPort, pendingOscPort } = useStore_OscPort();
- // WebSocket
- const { currentEnableWebsocket, updateEnableWebsocket, pendingEnableWebsocket } = useStore_EnableWebsocket();
- const { currentWebsocketHost, updateWebsocketHost, pendingWebsocketHost } = useStore_WebsocketHost();
- const { currentWebsocketPort, updateWebsocketPort, pendingWebsocketPort } = useStore_WebsocketPort();
-
- // OSC IP Address
- const getOscIpAddress = () => {
- pendingOscIpAddress();
- asyncStdoutToPython("/get/data/osc_ip_address");
- };
-
- const setOscIpAddress = (osc_ip_address) => {
- pendingOscIpAddress();
- asyncStdoutToPython("/set/data/osc_ip_address", osc_ip_address);
- };
-
- const setSuccessOscIpAddress = (osc_ip_address) => {
- updateOscIpAddress(osc_ip_address);
- showNotification_SaveSuccess();
- };
-
- // OSC Port
- const getOscPort = () => {
- pendingOscPort();
- asyncStdoutToPython("/get/data/osc_port");
- };
-
- const setOscPort = (osc_port) => {
- pendingOscPort();
- asyncStdoutToPython("/set/data/osc_port", osc_port);
- };
-
- const setSuccessOscPort = (osc_port) => {
- updateOscPort(osc_port);
- showNotification_SaveSuccess();
- };
-
- const saveErrorOscPort = ({ data, message, _result }) => {
- updateOscPort(d => d.data);
- showNotification_Error(_result);
- };
-
- // WebSocket Enable
- const getEnableWebsocket = () => {
- pendingEnableWebsocket();
- asyncStdoutToPython("/get/data/websocket_server");
- };
-
- const toggleEnableWebsocket = () => {
- pendingEnableWebsocket();
- if (currentEnableWebsocket.data) {
- asyncStdoutToPython("/set/disable/websocket_server");
- } else {
- asyncStdoutToPython("/set/enable/websocket_server");
- }
- };
-
- const setSuccessEnableWebsocket = (is_enabled) => {
- updateEnableWebsocket(is_enabled);
- showNotification_SaveSuccess();
- };
-
- // WebSocket Host
- const getWebsocketHost = () => {
- pendingWebsocketHost();
- asyncStdoutToPython("/get/data/websocket_host");
- };
-
- const setWebsocketHost = (websocket_host) => {
- pendingWebsocketHost();
- asyncStdoutToPython("/set/data/websocket_host", websocket_host);
- };
-
- const setSuccessWebsocketHost = (websocket_host) => {
- updateWebsocketHost(websocket_host);
- showNotification_SaveSuccess();
- };
-
- // WebSocket Port
- const getWebsocketPort = () => {
- pendingWebsocketPort();
- asyncStdoutToPython("/get/data/websocket_port");
- };
-
- const setWebsocketPort = (websocket_port) => {
- pendingWebsocketPort();
- asyncStdoutToPython("/set/data/websocket_port", websocket_port);
- };
-
- const setSuccessWebsocketPort = (websocket_port) => {
- updateWebsocketPort(websocket_port);
- showNotification_SaveSuccess();
- };
-
- return {
- // OSC IP Address
- currentOscIpAddress,
- getOscIpAddress,
- updateOscIpAddress,
- setOscIpAddress,
- setSuccessOscIpAddress,
-
- // OSC Port
- currentOscPort,
- getOscPort,
- updateOscPort,
- setOscPort,
- setSuccessOscPort,
- saveErrorOscPort,
-
- // WebSocket Enable
- currentEnableWebsocket,
- getEnableWebsocket,
- updateEnableWebsocket,
- toggleEnableWebsocket,
- setSuccessEnableWebsocket,
-
- // WebSocket Host
- currentWebsocketHost,
- getWebsocketHost,
- updateWebsocketHost,
- setWebsocketHost,
- setSuccessWebsocketHost,
-
- // WebSocket Port
- currentWebsocketPort,
- getWebsocketPort,
- updateWebsocketPort,
- setWebsocketPort,
- setSuccessWebsocketPort,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/appearance/useAppearance.js b/src-ui/logics/configs/appearance/useAppearance.js
deleted file mode 100644
index f253441f..00000000
--- a/src-ui/logics/configs/appearance/useAppearance.js
+++ /dev/null
@@ -1,207 +0,0 @@
-import { useAppearance_S } from "../../../ui_config_setter";
-
-export const useAppearance = () => {
- return {...useAppearance_S()};
-}
-
-// import {
-// useStore_UiLanguage,
-// useStore_UiScaling,
-// useStore_MessageLogUiScaling,
-// useStore_SendMessageButtonType,
-// useStore_ShowResendButton,
-// useStore_SelectedFontFamily,
-// useStore_Transparency,
-// } from "@store";
-// import { useStdoutToPython } from "@useStdoutToPython";
-// import { useI18n } from "@useI18n";
-// import { useNotificationStatus } from "@logics_common";
-
-// export const useAppearance = () => {
-// const { t } = useI18n();
-// const { asyncStdoutToPython } = useStdoutToPython();
-// const { showNotification_SaveSuccess } = useNotificationStatus();
-
-// // UI Language
-// const { currentUiLanguage, updateUiLanguage, pendingUiLanguage } = useStore_UiLanguage();
-// // UI Scaling
-// const { currentUiScaling, updateUiScaling, pendingUiScaling } = useStore_UiScaling();
-// // Message Log Ui Scaling
-// const { currentMessageLogUiScaling, updateMessageLogUiScaling, pendingMessageLogUiScaling } = useStore_MessageLogUiScaling();
-// // Send Message Button Type
-// const { currentSendMessageButtonType, updateSendMessageButtonType, pendingSendMessageButtonType } = useStore_SendMessageButtonType();
-// // Show Resend Button
-// const { currentShowResendButton, updateShowResendButton, pendingShowResendButton } = useStore_ShowResendButton();
-// // Selected Font Family
-// const { currentSelectedFontFamily, updateSelectedFontFamily, pendingSelectedFontFamily } = useStore_SelectedFontFamily();
-// // Transparency
-// const { currentTransparency, updateTransparency, pendingTransparency } = useStore_Transparency();
-
-
-// // UI Language
-// const getUiLanguage = () => {
-// pendingUiLanguage();
-// asyncStdoutToPython("/get/data/ui_language");
-// };
-
-// const setUiLanguage = (selected_ui_language) => {
-// pendingUiLanguage();
-// asyncStdoutToPython("/set/data/ui_language", selected_ui_language);
-// };
-
-// const setSuccessUiLanguage = (selected_ui_language) => {
-// updateUiLanguage(selected_ui_language);
-// showNotification_SaveSuccess();
-// };
-
-// // UI Scaling
-// const getUiScaling = () => {
-// pendingUiScaling();
-// asyncStdoutToPython("/get/data/ui_scaling");
-// };
-
-// const setUiScaling = (selected_ui_scaling) => {
-// pendingUiScaling();
-// asyncStdoutToPython("/set/data/ui_scaling", selected_ui_scaling);
-// };
-
-// const setSuccessUiScaling = (selected_ui_scaling) => {
-// updateUiScaling(selected_ui_scaling);
-// showNotification_SaveSuccess();
-// };
-
-// // Message Log Ui Scaling
-// const getMessageLogUiScaling = () => {
-// pendingMessageLogUiScaling();
-// asyncStdoutToPython("/get/data/textbox_ui_scaling");
-// };
-
-// const setMessageLogUiScaling = (selected_ui_scaling) => {
-// pendingMessageLogUiScaling();
-// asyncStdoutToPython("/set/data/textbox_ui_scaling", selected_ui_scaling);
-// };
-
-// const setSuccessMessageLogUiScaling = (selected_ui_scaling) => {
-// updateMessageLogUiScaling(selected_ui_scaling);
-// showNotification_SaveSuccess();
-// };
-
-// // Send Message Button Type
-// const getSendMessageButtonType = () => {
-// pendingSendMessageButtonType();
-// asyncStdoutToPython("/get/data/send_message_button_type");
-// };
-
-// const setSendMessageButtonType = (send_message_button_type) => {
-// pendingSendMessageButtonType();
-// asyncStdoutToPython("/set/data/send_message_button_type", send_message_button_type);
-// };
-
-// const setSuccessSendMessageButtonType = (send_message_button_type) => {
-// updateSendMessageButtonType(send_message_button_type);
-// showNotification_SaveSuccess();
-// };
-
-// // Show Resend Button
-// const getShowResendButton = () => {
-// pendingShowResendButton();
-// asyncStdoutToPython("/get/data/show_resend_button");
-// };
-
-// const toggleShowResendButton = () => {
-// pendingShowResendButton();
-// if (currentShowResendButton.data) {
-// asyncStdoutToPython("/set/disable/show_resend_button");
-// } else {
-// asyncStdoutToPython("/set/enable/show_resend_button");
-// }
-// };
-// const setSuccessShowResendButton = (to_show) => {
-// updateShowResendButton(to_show);
-// showNotification_SaveSuccess();
-// };
-
-// // Selected Font Family
-// const getSelectedFontFamily = () => {
-// pendingSelectedFontFamily();
-// asyncStdoutToPython("/get/data/font_family");
-// };
-
-// const setSelectedFontFamily = (selected_font_family) => {
-// pendingSelectedFontFamily();
-// asyncStdoutToPython("/set/data/font_family", selected_font_family);
-// };
-
-// const setSuccessSelectedFontFamily = (selected_font_family) => {
-// updateSelectedFontFamily(selected_font_family);
-// showNotification_SaveSuccess();
-// };
-
-// // Transparency
-// const getTransparency = () => {
-// pendingTransparency();
-// asyncStdoutToPython("/get/data/transparency");
-// };
-
-// const setTransparency = (selected_transparency) => {
-// pendingTransparency();
-// asyncStdoutToPython("/set/data/transparency", selected_transparency);
-// };
-
-// const setSuccessTransparency = (selected_transparency) => {
-// updateTransparency(selected_transparency);
-// showNotification_SaveSuccess();
-// };
-
-
-// return {
-// // UI Language
-// currentUiLanguage,
-// getUiLanguage,
-// updateUiLanguage,
-// setUiLanguage,
-// setSuccessUiLanguage,
-
-// // UI Scaling
-// currentUiScaling,
-// getUiScaling,
-// updateUiScaling,
-// setUiScaling,
-// setSuccessUiScaling,
-
-// // Message Log Ui Scaling
-// currentMessageLogUiScaling,
-// getMessageLogUiScaling,
-// updateMessageLogUiScaling,
-// setMessageLogUiScaling,
-// setSuccessMessageLogUiScaling,
-
-// // Send Message Button Type
-// currentSendMessageButtonType,
-// getSendMessageButtonType,
-// setSendMessageButtonType,
-// setSuccessSendMessageButtonType,
-// updateSendMessageButtonType,
-
-// // Show Resend Button
-// currentShowResendButton,
-// getShowResendButton,
-// updateShowResendButton,
-// toggleShowResendButton,
-// setSuccessShowResendButton,
-
-// // Selected Font Family
-// currentSelectedFontFamily,
-// getSelectedFontFamily,
-// updateSelectedFontFamily,
-// setSelectedFontFamily,
-// setSuccessSelectedFontFamily,
-
-// // Transparency
-// currentTransparency,
-// getTransparency,
-// updateTransparency,
-// setTransparency,
-// setSuccessTransparency,
-// };
-// };
\ No newline at end of file
diff --git a/src-ui/logics/configs/device/useDevice.js b/src-ui/logics/configs/device/useDevice.js
deleted file mode 100644
index b0919ad1..00000000
--- a/src-ui/logics/configs/device/useDevice.js
+++ /dev/null
@@ -1,306 +0,0 @@
-import {
- useStore_EnableAutoMicSelect,
- useStore_EnableAutoSpeakerSelect,
-
- useStore_MicDeviceList,
- useStore_MicHostList,
- useStore_SpeakerDeviceList,
-
- useStore_SelectedMicHost,
- useStore_SelectedMicDevice,
-
- useStore_SelectedSpeakerDevice,
-
- useStore_MicThreshold,
- useStore_EnableAutomaticMicThreshold,
- useStore_SpeakerThreshold,
- useStore_EnableAutomaticSpeakerThreshold,
-} from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-import { arrayToObject } from "@utils";
-import { useNotificationStatus } from "@logics_common";
-
-export const useDevice = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { showNotification_SaveSuccess } = useNotificationStatus();
-
- const { currentEnableAutoMicSelect, updateEnableAutoMicSelect, pendingEnableAutoMicSelect } = useStore_EnableAutoMicSelect();
- const { currentEnableAutoSpeakerSelect, updateEnableAutoSpeakerSelect, pendingEnableAutoSpeakerSelect } = useStore_EnableAutoSpeakerSelect();
-
- const { currentMicDeviceList, updateMicDeviceList, pendingMicDeviceList } = useStore_MicDeviceList();
- const { currentMicHostList, updateMicHostList, pendingMicHostList } = useStore_MicHostList();
- const { currentSpeakerDeviceList, updateSpeakerDeviceList, pendingSpeakerDeviceList } = useStore_SpeakerDeviceList();
-
- const { currentSelectedMicHost, updateSelectedMicHost, pendingSelectedMicHost } = useStore_SelectedMicHost();
- const { currentSelectedMicDevice, updateSelectedMicDevice, pendingSelectedMicDevice } = useStore_SelectedMicDevice();
-
- const { currentSelectedSpeakerDevice, updateSelectedSpeakerDevice, pendingSelectedSpeakerDevice } = useStore_SelectedSpeakerDevice();
-
- const { currentMicThreshold, updateMicThreshold } = useStore_MicThreshold();
- const { currentEnableAutomaticMicThreshold, updateEnableAutomaticMicThreshold, pendingEnableAutomaticMicThreshold } = useStore_EnableAutomaticMicThreshold();
-
- const { currentSpeakerThreshold, updateSpeakerThreshold } = useStore_SpeakerThreshold();
- const { currentEnableAutomaticSpeakerThreshold, updateEnableAutomaticSpeakerThreshold, pendingEnableAutomaticSpeakerThreshold } = useStore_EnableAutomaticSpeakerThreshold();
-
- // Auto Select (Mic)
- const getEnableAutoMicSelect = () => {
- pendingEnableAutoMicSelect();
- asyncStdoutToPython("/get/data/auto_mic_select");
- };
-
- const toggleEnableAutoMicSelect = () => {
- pendingEnableAutoMicSelect();
- if (currentEnableAutoMicSelect.data) {
- asyncStdoutToPython("/set/disable/auto_mic_select");
- } else {
- asyncStdoutToPython("/set/enable/auto_mic_select");
- }
- };
-
- const setSuccessEnableAutoMicSelect = (enabled) => {
- updateEnableAutoMicSelect(enabled);
- showNotification_SaveSuccess();
- };
-
- // Auto Select (Speaker)
- const getEnableAutoSpeakerSelect = () => {
- pendingEnableAutoSpeakerSelect();
- asyncStdoutToPython("/get/data/auto_speaker_select");
- };
-
- const toggleEnableAutoSpeakerSelect = () => {
- pendingEnableAutoSpeakerSelect();
- if (currentEnableAutoSpeakerSelect.data) {
- asyncStdoutToPython("/set/disable/auto_speaker_select");
- } else {
- asyncStdoutToPython("/set/enable/auto_speaker_select");
- }
- };
-
- const setSuccessEnableAutoSpeakerSelect = (enabled) => {
- updateEnableAutoSpeakerSelect(enabled);
- showNotification_SaveSuccess();
- };
-
- // List (Mic device)
- const getMicDeviceList = () => {
- pendingMicDeviceList();
- asyncStdoutToPython("/get/data/mic_device_list");
- };
-
- const updateMicDeviceList_FromBackend = (payload) => {
- updateMicDeviceList(arrayToObject(payload));
- };
-
- // List (Mic host)
- const getMicHostList = () => {
- pendingMicHostList();
- asyncStdoutToPython("/get/data/mic_host_list");
- };
-
- const updateMicHostList_FromBackend = (payload) => {
- updateMicHostList(arrayToObject(payload));
- };
-
- // List (Speaker device)
- const getSpeakerDeviceList = () => {
- pendingSpeakerDeviceList();
- asyncStdoutToPython("/get/data/speaker_device_list");
- };
-
- const updateSpeakerDeviceList_FromBackend = (payload) => {
- updateSpeakerDeviceList(arrayToObject(payload));
- };
-
- // Selected (Mic host)
- const getSelectedMicHost = () => {
- pendingSelectedMicHost();
- asyncStdoutToPython("/get/data/selected_mic_host");
- };
-
- const setSelectedMicHost = (selected_mic_host) => {
- pendingSelectedMicHost();
- asyncStdoutToPython("/set/data/selected_mic_host", selected_mic_host);
- };
-
- const setSuccessSelectedMicHost = (payload) => {
- updateSelectedMicHostAndDevice(payload); // Receive host and device from backend.
- showNotification_SaveSuccess();
- };
-
- // Selected (Mic device)
- const getSelectedMicDevice = () => {
- pendingSelectedMicDevice();
- asyncStdoutToPython("/get/data/selected_mic_device");
- };
-
- const setSelectedMicDevice = (selected_mic_device) => {
- pendingSelectedMicDevice();
- asyncStdoutToPython("/set/data/selected_mic_device", selected_mic_device);
- };
-
- const setSuccessSelectedMicDevice = (selected_mic_device) => {
- updateSelectedMicDevice(selected_mic_device);
- showNotification_SaveSuccess();
- };
-
- // Selected (Mic Device and Host)
- const updateSelectedMicHostAndDevice = (payload) => {
- updateSelectedMicHost(payload.host);
- updateSelectedMicDevice(payload.device);
- }
-
- // Selected (Speaker device)
- const getSelectedSpeakerDevice = () => {
- pendingSelectedSpeakerDevice();
- asyncStdoutToPython("/get/data/selected_speaker_device");
- };
-
- const setSelectedSpeakerDevice = (selected_speaker_device) => {
- pendingSelectedSpeakerDevice();
- asyncStdoutToPython("/set/data/selected_speaker_device", selected_speaker_device);
- };
-
- const setSuccessSelectedSpeakerDevice = (selected_speaker_device) => {
- updateSelectedSpeakerDevice(selected_speaker_device);
- showNotification_SaveSuccess();
- };
-
- // Threshold (Mic)
- const getMicThreshold = () => {
- asyncStdoutToPython("/get/data/mic_threshold");
- };
-
- const setMicThreshold = (mic_threshold) => {
- asyncStdoutToPython("/set/data/mic_threshold", mic_threshold);
- };
-
- const setSuccessMicThreshold = (mic_threshold) => {
- updateMicThreshold(mic_threshold);
- showNotification_SaveSuccess();
- };
-
- const getEnableAutomaticMicThreshold = () => {
- pendingEnableAutomaticMicThreshold();
- asyncStdoutToPython("/get/data/mic_automatic_threshold");
- };
-
- const toggleEnableAutomaticMicThreshold = () => {
- pendingEnableAutomaticMicThreshold();
- if (currentEnableAutomaticMicThreshold.data) {
- asyncStdoutToPython("/set/disable/mic_automatic_threshold");
- } else {
- asyncStdoutToPython("/set/enable/mic_automatic_threshold");
- }
- };
-
- const setSuccessEnableAutomaticMicThreshold = (enabled) => {
- updateEnableAutomaticMicThreshold(enabled);
- showNotification_SaveSuccess();
- };
-
- // Threshold (Speaker)
- const getSpeakerThreshold = () => {
- asyncStdoutToPython("/get/data/speaker_threshold");
- };
-
- const setSpeakerThreshold = (speaker_threshold) => {
- asyncStdoutToPython("/set/data/speaker_threshold", speaker_threshold);
- };
-
- const setSuccessSpeakerThreshold = (speaker_threshold) => {
- updateSpeakerThreshold(speaker_threshold);
- showNotification_SaveSuccess();
- };
-
- const getEnableAutomaticSpeakerThreshold = () => {
- pendingEnableAutomaticSpeakerThreshold();
- asyncStdoutToPython("/get/data/speaker_automatic_threshold");
- };
-
- const toggleEnableAutomaticSpeakerThreshold = () => {
- pendingEnableAutomaticSpeakerThreshold();
- if (currentEnableAutomaticSpeakerThreshold.data) {
- asyncStdoutToPython("/set/disable/speaker_automatic_threshold");
- } else {
- asyncStdoutToPython("/set/enable/speaker_automatic_threshold");
- }
- };
-
- const setSuccessEnableAutomaticSpeakerThreshold = (enabled) => {
- updateEnableAutomaticSpeakerThreshold(enabled);
- showNotification_SaveSuccess();
- };
-
- return {
- currentEnableAutoMicSelect,
- getEnableAutoMicSelect,
- updateEnableAutoMicSelect,
- toggleEnableAutoMicSelect,
- setSuccessEnableAutoMicSelect,
-
- currentEnableAutoSpeakerSelect,
- getEnableAutoSpeakerSelect,
- updateEnableAutoSpeakerSelect,
- toggleEnableAutoSpeakerSelect,
- setSuccessEnableAutoSpeakerSelect,
-
- currentMicDeviceList,
- getMicDeviceList,
- updateMicDeviceList,
- updateMicDeviceList_FromBackend,
-
- currentMicHostList,
- getMicHostList,
- updateMicHostList,
- updateMicHostList_FromBackend,
-
- currentSpeakerDeviceList,
- getSpeakerDeviceList,
- updateSpeakerDeviceList,
- updateSpeakerDeviceList_FromBackend,
-
- currentSelectedMicHost,
- getSelectedMicHost,
- updateSelectedMicHost,
- setSelectedMicHost,
- setSuccessSelectedMicHost,
-
- currentSelectedMicDevice,
- getSelectedMicDevice,
- updateSelectedMicDevice,
- setSelectedMicDevice,
- setSuccessSelectedMicDevice,
- updateSelectedMicHostAndDevice,
-
- currentSelectedSpeakerDevice,
- getSelectedSpeakerDevice,
- updateSelectedSpeakerDevice,
- setSelectedSpeakerDevice,
- setSuccessSelectedSpeakerDevice,
-
- currentMicThreshold,
- getMicThreshold,
- setMicThreshold,
- updateMicThreshold,
- setSuccessMicThreshold,
-
- currentEnableAutomaticMicThreshold,
- getEnableAutomaticMicThreshold,
- toggleEnableAutomaticMicThreshold,
- updateEnableAutomaticMicThreshold,
- setSuccessEnableAutomaticMicThreshold,
-
- currentSpeakerThreshold,
- getSpeakerThreshold,
- setSpeakerThreshold,
- updateSpeakerThreshold,
- setSuccessSpeakerThreshold,
-
- currentEnableAutomaticSpeakerThreshold,
- getEnableAutomaticSpeakerThreshold,
- toggleEnableAutomaticSpeakerThreshold,
- updateEnableAutomaticSpeakerThreshold,
- setSuccessEnableAutomaticSpeakerThreshold,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/others/useOthers.js b/src-ui/logics/configs/others/useOthers.js
deleted file mode 100644
index 855ab24e..00000000
--- a/src-ui/logics/configs/others/useOthers.js
+++ /dev/null
@@ -1,367 +0,0 @@
-import {
- useStore_EnableAutoClearMessageInputBox,
- useStore_EnableSendOnlyTranslatedMessages,
- useStore_EnableAutoExportMessageLogs,
- useStore_EnableVrcMicMuteSync,
- useStore_EnableSendMessageToVrc,
- useStore_EnableNotificationVrcSfx,
- useStore_EnableSendReceivedMessageToVrc,
- useStore_MessageFormat_ExampleViewFilter,
- useStore_SendMessageFormatParts,
- useStore_ReceivedMessageFormatParts,
- useStore_ConvertMessageToRomaji,
- useStore_ConvertMessageToHiragana,
-} from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-import { useNotificationStatus } from "@logics_common";
-
-export const useOthers = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
-
- // Auto Clear Message Input Box
- const { currentEnableAutoClearMessageInputBox, updateEnableAutoClearMessageInputBox, pendingEnableAutoClearMessageInputBox } = useStore_EnableAutoClearMessageInputBox();
- // Send Only Translated Messages
- const { currentEnableSendOnlyTranslatedMessages, updateEnableSendOnlyTranslatedMessages, pendingEnableSendOnlyTranslatedMessages } = useStore_EnableSendOnlyTranslatedMessages();
- // Auto Export Message Logs
- const { currentEnableAutoExportMessageLogs, updateEnableAutoExportMessageLogs, pendingEnableAutoExportMessageLogs } = useStore_EnableAutoExportMessageLogs();
- // VRC Mic Mute Sync
- const { currentEnableVrcMicMuteSync, updateEnableVrcMicMuteSync, pendingEnableVrcMicMuteSync } = useStore_EnableVrcMicMuteSync();
- // Send Message To VRCT
- const { currentEnableSendMessageToVrc, updateEnableSendMessageToVrc, pendingEnableSendMessageToVrc } = useStore_EnableSendMessageToVrc();
- // Sounds
- // Notification VRC SFX
- const { currentEnableNotificationVrcSfx, updateEnableNotificationVrcSfx, pendingEnableNotificationVrcSfx } = useStore_EnableNotificationVrcSfx();
- // Speaker2Chatbox
- // Send Received Message To VRC
- const { currentEnableSendReceivedMessageToVrc, updateEnableSendReceivedMessageToVrc, pendingEnableSendReceivedMessageToVrc } = useStore_EnableSendReceivedMessageToVrc();
- // Message Formats
- const { currentMessageFormat_ExampleViewFilter, updateMessageFormat_ExampleViewFilter, pendingMessageFormat_ExampleViewFilter } = useStore_MessageFormat_ExampleViewFilter();
- // Send
- const { currentSendMessageFormatParts, updateSendMessageFormatParts, pendingSendMessageFormatParts } = useStore_SendMessageFormatParts();
- // Received
- const { currentReceivedMessageFormatParts, updateReceivedMessageFormatParts, pendingReceivedMessageFormatParts } = useStore_ReceivedMessageFormatParts();
-
- // Convert Message To Romaji
- const { currentConvertMessageToRomaji, updateConvertMessageToRomaji, pendingConvertMessageToRomaji } = useStore_ConvertMessageToRomaji();
- // Convert Message To Hiragana
- const { currentConvertMessageToHiragana, updateConvertMessageToHiragana, pendingConvertMessageToHiragana } = useStore_ConvertMessageToHiragana();
-
- const { showNotification_SaveSuccess } = useNotificationStatus();
-
- // Auto Clear Message Input Box
- const getEnableAutoClearMessageInputBox = () => {
- pendingEnableAutoClearMessageInputBox();
- asyncStdoutToPython("/get/data/auto_clear_message_box");
- };
-
- const toggleEnableAutoClearMessageInputBox = () => {
- pendingEnableAutoClearMessageInputBox();
- if (currentEnableAutoClearMessageInputBox.data) {
- asyncStdoutToPython("/set/disable/auto_clear_message_box");
- } else {
- asyncStdoutToPython("/set/enable/auto_clear_message_box");
- }
- };
-
- const setSuccessEnableAutoClearMessageInputBox = (enabled) => {
- updateEnableAutoClearMessageInputBox(enabled);
- showNotification_SaveSuccess();
- };
-
- // Send Only Translated Messages
- const getEnableSendOnlyTranslatedMessages = () => {
- pendingEnableSendOnlyTranslatedMessages();
- asyncStdoutToPython("/get/data/send_only_translated_messages");
- };
-
- const toggleEnableSendOnlyTranslatedMessages = () => {
- pendingEnableSendOnlyTranslatedMessages();
- if (currentEnableSendOnlyTranslatedMessages.data) {
- asyncStdoutToPython("/set/disable/send_only_translated_messages");
- } else {
- asyncStdoutToPython("/set/enable/send_only_translated_messages");
- }
- };
-
- const setSuccessEnableSendOnlyTranslatedMessages = (enabled) => {
- updateEnableSendOnlyTranslatedMessages(enabled);
- showNotification_SaveSuccess();
- };
-
- // Auto Export Message Logs
- const getEnableAutoExportMessageLogs = () => {
- pendingEnableAutoExportMessageLogs();
- asyncStdoutToPython("/get/data/logger_feature");
- };
-
- const toggleEnableAutoExportMessageLogs = () => {
- pendingEnableAutoExportMessageLogs();
- if (currentEnableAutoExportMessageLogs.data) {
- asyncStdoutToPython("/set/disable/logger_feature");
- } else {
- asyncStdoutToPython("/set/enable/logger_feature");
- }
- };
-
- const setSuccessEnableAutoExportMessageLogs = (enabled) => {
- updateEnableAutoExportMessageLogs(enabled);
- showNotification_SaveSuccess();
- };
-
- // VRC Mic Mute Sync
- const getEnableVrcMicMuteSync = () => {
- pendingEnableVrcMicMuteSync();
- asyncStdoutToPython("/get/data/vrc_mic_mute_sync");
- };
-
- const toggleEnableVrcMicMuteSync = () => {
- pendingEnableVrcMicMuteSync();
- if (currentEnableVrcMicMuteSync.data.is_enabled) {
- asyncStdoutToPython("/set/disable/vrc_mic_mute_sync");
- } else {
- asyncStdoutToPython("/set/enable/vrc_mic_mute_sync");
- }
- };
-
- const getSuccessEnableVrcMicMuteSync = (is_enabled) => {
- updateEnableVrcMicMuteSync(old => ({ ...old.data, is_enabled: is_enabled }));
- };
-
- const setSuccessEnableVrcMicMuteSync = (is_enabled) => {
- updateEnableVrcMicMuteSync(old => ({ ...old.data, is_enabled: is_enabled }));
- showNotification_SaveSuccess();
- };
-
- // Send Message To VRCT
- const getEnableSendMessageToVrc = () => {
- pendingEnableSendMessageToVrc();
- asyncStdoutToPython("/get/data/send_message_to_vrc");
- };
-
- const toggleEnableSendMessageToVrc = () => {
- pendingEnableSendMessageToVrc();
- if (currentEnableSendMessageToVrc.data) {
- asyncStdoutToPython("/set/disable/send_message_to_vrc");
- } else {
- asyncStdoutToPython("/set/enable/send_message_to_vrc");
- }
- };
-
- const setSuccessEnableSendMessageToVrc = (enabled) => {
- updateEnableSendMessageToVrc(enabled);
- showNotification_SaveSuccess();
- };
-
- // Sounds
- // Notification VRC SFX
- const getEnableNotificationVrcSfx = () => {
- pendingEnableNotificationVrcSfx();
- asyncStdoutToPython("/get/data/notification_vrc_sfx");
- };
-
- const toggleEnableNotificationVrcSfx = () => {
- pendingEnableNotificationVrcSfx();
- if (currentEnableNotificationVrcSfx.data) {
- asyncStdoutToPython("/set/disable/notification_vrc_sfx");
- } else {
- asyncStdoutToPython("/set/enable/notification_vrc_sfx");
- }
- };
-
- const setSuccessEnableNotificationVrcSfx = (enabled) => {
- updateEnableNotificationVrcSfx(enabled);
- showNotification_SaveSuccess();
- };
-
- // Speaker2Chatbox
- // Send Received Message To VRC
- const getEnableSendReceivedMessageToVrc = () => {
- pendingEnableSendReceivedMessageToVrc();
- asyncStdoutToPython("/get/data/send_received_message_to_vrc");
- };
-
- const toggleEnableSendReceivedMessageToVrc = () => {
- pendingEnableSendReceivedMessageToVrc();
- if (currentEnableSendReceivedMessageToVrc.data) {
- asyncStdoutToPython("/set/disable/send_received_message_to_vrc");
- } else {
- asyncStdoutToPython("/set/enable/send_received_message_to_vrc");
- }
- };
-
- const setSuccessEnableSendReceivedMessageToVrc = (enabled) => {
- updateEnableSendReceivedMessageToVrc(enabled);
- showNotification_SaveSuccess();
- };
-
- // Message Formats
- // Send
- const getSendMessageFormatParts = () => {
- pendingSendMessageFormatParts();
- asyncStdoutToPython("/get/data/send_message_format_parts");
- };
-
- const setSendMessageFormatParts = (message_format_parts) => {
- pendingSendMessageFormatParts();
- asyncStdoutToPython("/set/data/send_message_format_parts", message_format_parts);
- };
-
- const setSuccessSendMessageFormatParts = (message_format_parts) => {
- updateSendMessageFormatParts(message_format_parts);
- showNotification_SaveSuccess();
- };
-
- // Received
- const getReceivedMessageFormatParts = () => {
- pendingReceivedMessageFormatParts();
- asyncStdoutToPython("/get/data/received_message_format_parts");
- };
-
- const setReceivedMessageFormatParts = (message_format_parts) => {
- pendingReceivedMessageFormatParts();
- asyncStdoutToPython("/set/data/received_message_format_parts", message_format_parts);
- };
-
- const setSuccessReceivedMessageFormatParts = (message_format_parts) => {
- updateReceivedMessageFormatParts(message_format_parts);
- showNotification_SaveSuccess();
- };
-
-
- const toggleMessageFormat_ExampleViewFilter = (id) => {
- pendingMessageFormat_ExampleViewFilter();
- if (["send", "received"].includes(id) === false) return console.error(`id should be small case 'send' or 'received'. got id: ${id}`);
-
- updateMessageFormat_ExampleViewFilter({
- ...currentMessageFormat_ExampleViewFilter.data,
- [id]: currentMessageFormat_ExampleViewFilter.data[id] === "Simplified"
- ? "All"
- : "Simplified"
- });
- };
-
- // Convert Message To Romaji
- const getConvertMessageToRomaji = () => {
- pendingConvertMessageToRomaji();
- asyncStdoutToPython("/get/data/convert_message_to_romaji");
- };
-
- const toggleConvertMessageToRomaji = () => {
- pendingConvertMessageToRomaji();
- if (currentConvertMessageToRomaji.data) {
- asyncStdoutToPython("/set/disable/convert_message_to_romaji");
- } else {
- asyncStdoutToPython("/set/enable/convert_message_to_romaji");
- }
- };
-
- const setSuccessConvertMessageToRomaji = (enabled) => {
- updateConvertMessageToRomaji(enabled);
- showNotification_SaveSuccess();
- };
-
- // Convert Message To Hiragana
- const getConvertMessageToHiragana = () => {
- pendingConvertMessageToHiragana();
- asyncStdoutToPython("/get/data/convert_message_to_hiragana");
- };
-
- const toggleConvertMessageToHiragana = () => {
- pendingConvertMessageToHiragana();
- if (currentConvertMessageToHiragana.data) {
- asyncStdoutToPython("/set/disable/convert_message_to_hiragana");
- } else {
- asyncStdoutToPython("/set/enable/convert_message_to_hiragana");
- }
- };
-
- const setSuccessConvertMessageToHiragana = (enabled) => {
- updateConvertMessageToHiragana(enabled);
- showNotification_SaveSuccess();
- };
-
- return {
- // Auto Clear Message Input Box
- currentEnableAutoClearMessageInputBox,
- getEnableAutoClearMessageInputBox,
- toggleEnableAutoClearMessageInputBox,
- updateEnableAutoClearMessageInputBox,
- setSuccessEnableAutoClearMessageInputBox,
-
- // Send Only Translated Messages
- currentEnableSendOnlyTranslatedMessages,
- getEnableSendOnlyTranslatedMessages,
- toggleEnableSendOnlyTranslatedMessages,
- updateEnableSendOnlyTranslatedMessages,
- setSuccessEnableSendOnlyTranslatedMessages,
-
- // Auto Export Message Logs
- currentEnableAutoExportMessageLogs,
- getEnableAutoExportMessageLogs,
- toggleEnableAutoExportMessageLogs,
- updateEnableAutoExportMessageLogs,
- setSuccessEnableAutoExportMessageLogs,
-
- // VRC Mic Mute Sync
- currentEnableVrcMicMuteSync,
- getEnableVrcMicMuteSync,
- getSuccessEnableVrcMicMuteSync,
- toggleEnableVrcMicMuteSync,
- updateEnableVrcMicMuteSync,
- setSuccessEnableVrcMicMuteSync,
-
- // Send Message To VRCT
- currentEnableSendMessageToVrc,
- getEnableSendMessageToVrc,
- toggleEnableSendMessageToVrc,
- updateEnableSendMessageToVrc,
- setSuccessEnableSendMessageToVrc,
-
- // Sounds
- // Notification VRC SFX
- currentEnableNotificationVrcSfx,
- getEnableNotificationVrcSfx,
- toggleEnableNotificationVrcSfx,
- updateEnableNotificationVrcSfx,
- setSuccessEnableNotificationVrcSfx,
-
- // Speaker2Chatbox
- // Send Received Message To VRC
- currentEnableSendReceivedMessageToVrc,
- getEnableSendReceivedMessageToVrc,
- toggleEnableSendReceivedMessageToVrc,
- updateEnableSendReceivedMessageToVrc,
- setSuccessEnableSendReceivedMessageToVrc,
-
- // Message Formats
- currentMessageFormat_ExampleViewFilter,
- toggleMessageFormat_ExampleViewFilter,
- // Send
- currentSendMessageFormatParts,
- updateSendMessageFormatParts,
- getSendMessageFormatParts,
- setSendMessageFormatParts,
- setSuccessSendMessageFormatParts,
-
- // Received
- currentReceivedMessageFormatParts,
- updateReceivedMessageFormatParts,
- getReceivedMessageFormatParts,
- setReceivedMessageFormatParts,
- setSuccessReceivedMessageFormatParts,
-
- // Convert Message To Romaji
- currentConvertMessageToRomaji,
- getConvertMessageToRomaji,
- toggleConvertMessageToRomaji,
- updateConvertMessageToRomaji,
- setSuccessConvertMessageToRomaji,
-
- // Convert Message To Hiragana
- currentConvertMessageToHiragana,
- getConvertMessageToHiragana,
- toggleConvertMessageToHiragana,
- updateConvertMessageToHiragana,
- setSuccessConvertMessageToHiragana,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useTranscription.js b/src-ui/logics/configs/transcription/useTranscription.js
deleted file mode 100644
index 008e4b10..00000000
--- a/src-ui/logics/configs/transcription/useTranscription.js
+++ /dev/null
@@ -1,488 +0,0 @@
-import {
- useStore_MicRecordTimeout,
- useStore_MicPhraseTimeout,
- useStore_MicMaxWords,
- useStore_MicWordFilterList,
-
- useStore_SpeakerMaxWords,
- useStore_SpeakerPhraseTimeout,
- useStore_SpeakerRecordTimeout,
-
- useStore_SelectableTranscriptionComputeDeviceList,
- useStore_SelectedTranscriptionEngine,
- useStore_SelectedTranscriptionComputeDevice,
-
- useStore_WhisperWeightTypeStatus,
- useStore_SelectedWhisperWeightType,
- useStore_SelectedTranscriptionComputeType,
-
- useStore_MicAvgLogprob,
- useStore_MicNoSpeechProb,
- useStore_SpeakerAvgLogprob,
- useStore_SpeakerNoSpeechProb,
-} from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-import { transformToIndexedArray, arrayToObject } from "@utils";
-import { useNotificationStatus } from "@logics_common";
-
-export const useTranscription = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { showNotification_SaveSuccess } = useNotificationStatus();
-
- // Mic
- const { currentMicRecordTimeout, updateMicRecordTimeout, pendingMicRecordTimeout } = useStore_MicRecordTimeout();
- const { currentMicPhraseTimeout, updateMicPhraseTimeout, pendingMicPhraseTimeout } = useStore_MicPhraseTimeout();
- const { currentMicMaxWords, updateMicMaxWords, pendingMicMaxWords } = useStore_MicMaxWords();
- const { currentMicWordFilterList, updateMicWordFilterList, pendingMicWordFilterList } = useStore_MicWordFilterList();
-
- // Speaker
- const { currentSpeakerRecordTimeout, updateSpeakerRecordTimeout, pendingSpeakerRecordTimeout } = useStore_SpeakerRecordTimeout();
- const { currentSpeakerPhraseTimeout, updateSpeakerPhraseTimeout, pendingSpeakerPhraseTimeout } = useStore_SpeakerPhraseTimeout();
- const { currentSpeakerMaxWords, updateSpeakerMaxWords, pendingSpeakerMaxWords } = useStore_SpeakerMaxWords();
-
- // Transcription Engines
- const { currentSelectedTranscriptionEngine, updateSelectedTranscriptionEngine, pendingSelectedTranscriptionEngine } = useStore_SelectedTranscriptionEngine();
-
- const { currentWhisperWeightTypeStatus, updateWhisperWeightTypeStatus, pendingWhisperWeightTypeStatus } = useStore_WhisperWeightTypeStatus();
- const { currentSelectedWhisperWeightType, updateSelectedWhisperWeightType, pendingSelectedWhisperWeightType } = useStore_SelectedWhisperWeightType();
-
-
- const { currentSelectedTranscriptionComputeType, updateSelectedTranscriptionComputeType, pendingSelectedTranscriptionComputeType } = useStore_SelectedTranscriptionComputeType();
-
- const { currentSelectableTranscriptionComputeDeviceList, updateSelectableTranscriptionComputeDeviceList, pendingSelectableTranscriptionComputeDeviceList } = useStore_SelectableTranscriptionComputeDeviceList();
- const { currentSelectedTranscriptionComputeDevice, updateSelectedTranscriptionComputeDevice, pendingSelectedTranscriptionComputeDevice } = useStore_SelectedTranscriptionComputeDevice();
-
- // Advanced Settings
- const { currentMicAvgLogprob, updateMicAvgLogprob, pendingMicAvgLogprob } = useStore_MicAvgLogprob();
- const { currentMicNoSpeechProb, updateMicNoSpeechProb, pendingMicNoSpeechProb } = useStore_MicNoSpeechProb();
- const { currentSpeakerAvgLogprob, updateSpeakerAvgLogprob, pendingSpeakerAvgLogprob } = useStore_SpeakerAvgLogprob();
- const { currentSpeakerNoSpeechProb, updateSpeakerNoSpeechProb, pendingSpeakerNoSpeechProb } = useStore_SpeakerNoSpeechProb();
-
-
- // Mic
- const getMicRecordTimeout = () => {
- pendingMicRecordTimeout();
- asyncStdoutToPython("/get/data/mic_record_timeout");
- };
-
- const setMicRecordTimeout = (selected_mic_record_timeout) => {
- pendingMicRecordTimeout();
- asyncStdoutToPython("/set/data/mic_record_timeout", selected_mic_record_timeout);
- };
-
- const setSuccessMicRecordTimeout = (value) => {
- updateMicRecordTimeout(value);
- showNotification_SaveSuccess();
- };
-
- const getMicPhraseTimeout = () => {
- pendingMicPhraseTimeout();
- asyncStdoutToPython("/get/data/mic_phrase_timeout");
- };
-
- const setMicPhraseTimeout = (selected_mic_phrase_timeout) => {
- pendingMicPhraseTimeout();
- asyncStdoutToPython("/set/data/mic_phrase_timeout", selected_mic_phrase_timeout);
- };
-
- const setSuccessMicPhraseTimeout = (value) => {
- updateMicPhraseTimeout(value);
- showNotification_SaveSuccess();
- };
-
- const getMicMaxWords = () => {
- pendingMicMaxWords();
- asyncStdoutToPython("/get/data/mic_max_phrases");
- };
-
- const setMicMaxWords = (selected_mic_max_phrases) => {
- pendingMicMaxWords();
- asyncStdoutToPython("/set/data/mic_max_phrases", selected_mic_max_phrases);
- };
-
- const setSuccessMicMaxWords = (value) => {
- updateMicMaxWords(value);
- showNotification_SaveSuccess();
- };
-
- const getMicWordFilterList = () => {
- pendingMicWordFilterList();
- asyncStdoutToPython("/get/data/mic_word_filter");
- };
-
- const setMicWordFilterList = (selected_mic_word_filter) => {
- pendingMicWordFilterList();
- asyncStdoutToPython("/set/data/mic_word_filter", selected_mic_word_filter);
- };
-
- const getSuccessMicWordFilterList = (payload) => {
- updateMicWordFilterList((prev_list) => {
- const updated_list = [...prev_list.data];
- for (const value of payload) {
- const existing_item = updated_list.find(item => item.value === value);
- if (existing_item) {
- existing_item.is_redoable = false;
- } else {
- updated_list.push({ value, is_redoable: false });
- }
- }
- return updated_list;
- });
- };
-
- const setSuccessMicWordFilterList = (payload) => {
- updateMicWordFilterList((prev_list) => {
- const updated_list = [...prev_list.data];
- for (const value of payload) {
- const existing_item = updated_list.find(item => item.value === value);
- if (existing_item) {
- existing_item.is_redoable = false;
- } else {
- updated_list.push({ value, is_redoable: false });
- }
- }
- return updated_list;
- });
- showNotification_SaveSuccess();
- };
-
- // Speaker
- const getSpeakerRecordTimeout = () => {
- pendingSpeakerRecordTimeout();
- asyncStdoutToPython("/get/data/speaker_record_timeout");
- };
-
- const setSpeakerRecordTimeout = (selected_speaker_record_timeout) => {
- pendingSpeakerRecordTimeout();
- asyncStdoutToPython("/set/data/speaker_record_timeout", selected_speaker_record_timeout);
- };
-
- const setSuccessSpeakerRecordTimeout = (value) => {
- updateSpeakerRecordTimeout(value);
- showNotification_SaveSuccess();
- };
-
- const getSpeakerPhraseTimeout = () => {
- pendingSpeakerPhraseTimeout();
- asyncStdoutToPython("/get/data/speaker_phrase_timeout");
- };
-
- const setSpeakerPhraseTimeout = (selected_speaker_phrase_timeout) => {
- pendingSpeakerPhraseTimeout();
- asyncStdoutToPython("/set/data/speaker_phrase_timeout", selected_speaker_phrase_timeout);
- };
-
- const setSuccessSpeakerPhraseTimeout = (value) => {
- updateSpeakerPhraseTimeout(value);
- showNotification_SaveSuccess();
- };
-
- const getSpeakerMaxWords = () => {
- pendingSpeakerMaxWords();
- asyncStdoutToPython("/get/data/speaker_max_phrases");
- };
-
- const setSpeakerMaxWords = (selected_speaker_max_phrases) => {
- pendingSpeakerMaxWords();
- asyncStdoutToPython("/set/data/speaker_max_phrases", selected_speaker_max_phrases);
- };
-
- const setSuccessSpeakerMaxWords = (value) => {
- updateSpeakerMaxWords(value);
- showNotification_SaveSuccess();
- };
-
- // Transcription Engines
- // Transcription Engines (Google / Whisper)
- const getSelectedTranscriptionEngine = () => {
- pendingSelectedTranscriptionEngine();
- asyncStdoutToPython("/get/data/selected_transcription_engine");
- };
-
- const setSelectedTranscriptionEngine = (selected_transcription_engine) => {
- pendingSelectedTranscriptionEngine();
- asyncStdoutToPython("/set/data/selected_transcription_engine", selected_transcription_engine);
- };
-
- const setSuccessSelectedTranscriptionEngine = (engine) => {
- updateSelectedTranscriptionEngine(engine);
- showNotification_SaveSuccess();
- };
-
- // Transcription Engines (Weight Type List)
- const updateDownloadedWhisperWeightTypeStatus = (downloaded_weight_type_status) => {
- updateWhisperWeightTypeStatus((old_status) =>
- old_status.data.map((item) => ({
- ...item,
- is_downloaded: downloaded_weight_type_status[item.id] ?? item.is_downloaded,
- }))
- );
- };
- const updateDownloadProgressWhisperWeightTypeStatus = (payload) => {
- if (payload === true) return console.error("fix me.");
-
- updateWhisperWeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- payload.weight_type === item.id
- ? { ...item, progress: payload.progress * 100 }
- : item
- )
- );
- };
- const pendingWhisperWeightType = (id) => {
- updateWhisperWeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- id === item.id
- ? { ...item, is_pending: true }
- : item
- )
- );
- };
- const downloadedWhisperWeightType = (id) => {
- updateWhisperWeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- id === item.id
- ? { ...item, is_downloaded: true, is_pending: false, progress: null }
- : item
- )
- );
- };
-
- const downloadWhisperWeight = (weight_type) => {
- asyncStdoutToPython("/run/download_whisper_weight", weight_type);
- };
-
-
-
- const getSelectedTranscriptionComputeType = () => {
- pendingSelectedTranscriptionComputeType();
- asyncStdoutToPython("/get/data/selected_transcription_compute_type");
- };
-
- const setSelectedTranscriptionComputeType = (selected_transcription_compute_type) => {
- pendingSelectedTranscriptionComputeType();
- asyncStdoutToPython("/set/data/selected_transcription_compute_type", selected_transcription_compute_type);
- };
-
- const setSuccessSelectedTranscriptionComputeType = (selected_transcription_compute_type) => {
- updateSelectedTranscriptionComputeType(selected_transcription_compute_type);
- showNotification_SaveSuccess();
- };
-
-
- // Transcription Engines (Selected Weight Type)
- const getSelectedWhisperWeightType = () => {
- pendingSelectedWhisperWeightType();
- asyncStdoutToPython("/get/data/whisper_weight_type");
- };
-
- const setSelectedWhisperWeightType = (selected_whisper_weight_type) => {
- pendingSelectedWhisperWeightType();
- asyncStdoutToPython("/set/data/whisper_weight_type", selected_whisper_weight_type);
- };
-
- const setSuccessSelectedWhisperWeightType = (wt) => {
- updateSelectedWhisperWeightType(wt);
- showNotification_SaveSuccess();
- };
-
- // Transcription Engines (Compute Device List)
- const getSelectableTranscriptionComputeDeviceList = () => {
- pendingSelectableTranscriptionComputeDeviceList();
- asyncStdoutToPython("/get/data/transcription_compute_device_list");
- };
-
- const updateSelectableTranscriptionComputeDeviceList_FromBackend = (payload) => {
- updateSelectableTranscriptionComputeDeviceList(transformToIndexedArray(payload));
- };
-
- // Transcription Engines (Selected Compute Device)
- const getSelectedTranscriptionComputeDevice = () => {
- pendingSelectedTranscriptionComputeDevice();
- asyncStdoutToPython("/get/data/selected_transcription_compute_device");
- };
-
- const setSelectedTranscriptionComputeDevice = (selected_transcription_compute_device) => {
- pendingSelectedTranscriptionComputeDevice();
- asyncStdoutToPython("/set/data/selected_transcription_compute_device", selected_transcription_compute_device);
- };
-
- const setSuccessSelectedTranscriptionComputeDevice = (dev) => {
- updateSelectedTranscriptionComputeDevice(dev);
- showNotification_SaveSuccess();
- };
-
- // Advanced (Mic Avg Logprob)
- const getMicAvgLogprob = () => {
- pendingMicAvgLogprob();
- asyncStdoutToPython("/get/data/mic_avg_logprob");
- };
-
- const setMicAvgLogprob = (selected_mic_avg_logprob) => {
- pendingMicAvgLogprob();
- asyncStdoutToPython("/set/data/mic_avg_logprob", selected_mic_avg_logprob);
- };
-
- const setSuccessMicAvgLogprob = (selected_mic_avg_logprob) => {
- updateMicAvgLogprob(selected_mic_avg_logprob);
- showNotification_SaveSuccess();
- };
- // Advanced (Mic No Speech Prob)
- const getMicNoSpeechProb = () => {
- pendingMicNoSpeechProb();
- asyncStdoutToPython("/get/data/mic_no_speech_prob");
- };
-
- const setMicNoSpeechProb = (selected_mic_no_speech_prob) => {
- pendingMicNoSpeechProb();
- asyncStdoutToPython("/set/data/mic_no_speech_prob", selected_mic_no_speech_prob);
- };
-
- const setSuccessMicNoSpeechProb = (selected_mic_no_speech_prob) => {
- updateMicNoSpeechProb(selected_mic_no_speech_prob);
- showNotification_SaveSuccess();
- };
- // Advanced (Speaker Avg Logprob)
- const getSpeakerAvgLogprob = () => {
- pendingSpeakerAvgLogprob();
- asyncStdoutToPython("/get/data/speaker_avg_logprob");
- };
-
- const setSpeakerAvgLogprob = (selected_speaker_avg_logprob) => {
- pendingSpeakerAvgLogprob();
- asyncStdoutToPython("/set/data/speaker_avg_logprob", selected_speaker_avg_logprob);
- };
-
- const setSuccessSpeakerAvgLogprob = (selected_speaker_avg_logprob) => {
- updateSpeakerAvgLogprob(selected_speaker_avg_logprob);
- showNotification_SaveSuccess();
- };
- // Advanced (Speaker No Speech Prob)
- const getSpeakerNoSpeechProb = () => {
- pendingSpeakerNoSpeechProb();
- asyncStdoutToPython("/get/data/speaker_no_speech_prob");
- };
-
- const setSpeakerNoSpeechProb = (selected_speaker_no_speech_prob) => {
- pendingSpeakerNoSpeechProb();
- asyncStdoutToPython("/set/data/speaker_no_speech_prob", selected_speaker_no_speech_prob);
- };
-
- const setSuccessSpeakerNoSpeechProb = (selected_speaker_no_speech_prob) => {
- updateSpeakerNoSpeechProb(selected_speaker_no_speech_prob);
- showNotification_SaveSuccess();
- };
-
- return {
- // Mic
- currentMicRecordTimeout,
- getMicRecordTimeout,
- updateMicRecordTimeout,
- setMicRecordTimeout,
- setSuccessMicRecordTimeout,
-
- currentMicPhraseTimeout,
- getMicPhraseTimeout,
- updateMicPhraseTimeout,
- setMicPhraseTimeout,
- setSuccessMicPhraseTimeout,
-
- currentMicMaxWords,
- getMicMaxWords,
- updateMicMaxWords,
- setMicMaxWords,
- setSuccessMicMaxWords,
-
- currentMicWordFilterList,
- getMicWordFilterList,
- getSuccessMicWordFilterList,
- updateMicWordFilterList,
- setMicWordFilterList,
- setSuccessMicWordFilterList,
-
- // Speaker
- currentSpeakerRecordTimeout,
- getSpeakerRecordTimeout,
- updateSpeakerRecordTimeout,
- setSpeakerRecordTimeout,
- setSuccessSpeakerRecordTimeout,
-
- currentSpeakerPhraseTimeout,
- getSpeakerPhraseTimeout,
- updateSpeakerPhraseTimeout,
- setSpeakerPhraseTimeout,
- setSuccessSpeakerPhraseTimeout,
-
- currentSpeakerMaxWords,
- getSpeakerMaxWords,
- updateSpeakerMaxWords,
- setSpeakerMaxWords,
- setSuccessSpeakerMaxWords,
-
- // Transcription Engines
- currentSelectedTranscriptionEngine,
- getSelectedTranscriptionEngine,
- updateSelectedTranscriptionEngine,
- setSelectedTranscriptionEngine,
- setSuccessSelectedTranscriptionEngine,
-
- currentWhisperWeightTypeStatus,
- updateWhisperWeightTypeStatus,
- updateDownloadedWhisperWeightTypeStatus,
- updateDownloadProgressWhisperWeightTypeStatus,
- pendingWhisperWeightType,
- downloadedWhisperWeightType,
- downloadWhisperWeight,
-
- currentSelectedWhisperWeightType,
- getSelectedWhisperWeightType,
- updateSelectedWhisperWeightType,
- setSelectedWhisperWeightType,
- setSuccessSelectedWhisperWeightType,
-
-
- currentSelectedTranscriptionComputeType,
- getSelectedTranscriptionComputeType,
- updateSelectedTranscriptionComputeType,
- setSelectedTranscriptionComputeType,
- setSuccessSelectedTranscriptionComputeType,
-
-
- currentSelectableTranscriptionComputeDeviceList,
- getSelectableTranscriptionComputeDeviceList,
- updateSelectableTranscriptionComputeDeviceList,
- updateSelectableTranscriptionComputeDeviceList_FromBackend,
-
- currentSelectedTranscriptionComputeDevice,
- getSelectedTranscriptionComputeDevice,
- updateSelectedTranscriptionComputeDevice,
- setSelectedTranscriptionComputeDevice,
- setSuccessSelectedTranscriptionComputeDevice,
-
- // Advanced
- // Mic Avg Logprob
- currentMicAvgLogprob,
- getMicAvgLogprob,
- updateMicAvgLogprob,
- setMicAvgLogprob,
- setSuccessMicAvgLogprob,
- // Mic No Speech Prob
- currentMicNoSpeechProb,
- getMicNoSpeechProb,
- updateMicNoSpeechProb,
- setMicNoSpeechProb,
- setSuccessMicNoSpeechProb,
- // Speaker Avg Logprob
- currentSpeakerAvgLogprob,
- getSpeakerAvgLogprob,
- updateSpeakerAvgLogprob,
- setSpeakerAvgLogprob,
- setSuccessSpeakerAvgLogprob,
- // Speaker No Speech Prob
- currentSpeakerNoSpeechProb,
- getSpeakerNoSpeechProb,
- updateSpeakerNoSpeechProb,
- setSpeakerNoSpeechProb,
- setSuccessSpeakerNoSpeechProb,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/translation/useTranslation.js b/src-ui/logics/configs/translation/useTranslation.js
deleted file mode 100644
index ea288a02..00000000
--- a/src-ui/logics/configs/translation/useTranslation.js
+++ /dev/null
@@ -1,198 +0,0 @@
-import {
- useStore_CTranslate2WeightTypeStatus,
- useStore_SelectedCTranslate2WeightType,
- useStore_SelectedTranslationComputeType,
- useStore_SelectableTranslationComputeDeviceList,
- useStore_SelectedTranslationComputeDevice,
- useStore_DeepLAuthKey,
-} from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-import { useI18n } from "@useI18n";
-import { transformToIndexedArray, arrayToObject } from "@utils";
-import { useNotificationStatus } from "@logics_common";
-
-export const useTranslation = () => {
- const { t } = useI18n();
- const { asyncStdoutToPython } = useStdoutToPython();
- const { showNotification_SaveSuccess } = useNotificationStatus();
-
- const { currentCTranslate2WeightTypeStatus, updateCTranslate2WeightTypeStatus, pendingCTranslate2WeightTypeStatus } = useStore_CTranslate2WeightTypeStatus();
- const { currentSelectedCTranslate2WeightType, updateSelectedCTranslate2WeightType, pendingSelectedCTranslate2WeightType } = useStore_SelectedCTranslate2WeightType();
-
- const { currentSelectedTranslationComputeType, updateSelectedTranslationComputeType, pendingSelectedTranslationComputeType } = useStore_SelectedTranslationComputeType();
-
- const { currentSelectableTranslationComputeDeviceList, updateSelectableTranslationComputeDeviceList, pendingSelectableTranslationComputeDeviceList } = useStore_SelectableTranslationComputeDeviceList();
- const { currentSelectedTranslationComputeDevice, updateSelectedTranslationComputeDevice, pendingSelectedTranslationComputeDevice } = useStore_SelectedTranslationComputeDevice();
-
- const { currentDeepLAuthKey, updateDeepLAuthKey, pendingDeepLAuthKey } = useStore_DeepLAuthKey();
-
-
- const updateDownloadedCTranslate2WeightTypeStatus = (downloaded_weight_type_status) => {
- updateCTranslate2WeightTypeStatus((old_status) =>
- old_status.data.map((item) => ({
- ...item,
- is_downloaded: downloaded_weight_type_status[item.id] ?? item.is_downloaded,
- }))
- );
- };
- const updateDownloadProgressCTranslate2WeightTypeStatus = (payload) => {
- if (payload === true) return console.error("fix me.");
-
- updateCTranslate2WeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- payload.weight_type === item.id
- ? { ...item, progress: payload.progress * 100 }
- : item
- )
- );
- };
- const pendingCTranslate2WeightType = (id) => {
- updateCTranslate2WeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- id === item.id
- ? { ...item, is_pending: true }
- : item
- )
- );
- };
- const downloadedCTranslate2WeightType = (id) => {
- updateCTranslate2WeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- id === item.id
- ? { ...item, is_downloaded: true, is_pending: false, progress: null }
- : item
- )
- );
- };
- const downloadCTranslate2Weight = (weight_type) => {
- asyncStdoutToPython("/run/download_ctranslate2_weight", weight_type);
- };
-
-
- const getSelectedCTranslate2WeightType = () => {
- pendingSelectedCTranslate2WeightType();
- asyncStdoutToPython("/get/data/ctranslate2_weight_type");
- };
-
- const setSelectedCTranslate2WeightType = (selected_ctranslate2_weight_type) => {
- pendingSelectedCTranslate2WeightType();
- asyncStdoutToPython("/set/data/ctranslate2_weight_type", selected_ctranslate2_weight_type);
- };
-
- const setSuccessSelectedCTranslate2WeightType = (selected_ctranslate2_weight_type) => {
- updateSelectedCTranslate2WeightType(selected_ctranslate2_weight_type);
- showNotification_SaveSuccess();
- };
-
-
- const getSelectedTranslationComputeType = () => {
- pendingSelectedTranslationComputeType();
- asyncStdoutToPython("/get/data/selected_translation_compute_type");
- };
-
- const setSelectedTranslationComputeType = (selected_translation_compute_type) => {
- pendingSelectedTranslationComputeType();
- asyncStdoutToPython("/set/data/selected_translation_compute_type", selected_translation_compute_type);
- };
-
- const setSuccessSelectedTranslationComputeType = (selected_translation_compute_type) => {
- updateSelectedTranslationComputeType(selected_translation_compute_type);
- showNotification_SaveSuccess();
- };
-
-
-
- const getSelectableTranslationComputeDeviceList = () => {
- pendingSelectableTranslationComputeDeviceList();
- asyncStdoutToPython("/get/data/translation_compute_device_list");
- };
-
- const updateSelectableTranslationComputeDeviceList_FromBackend = (payload) => {
- updateSelectableTranslationComputeDeviceList(transformToIndexedArray(payload));
- };
-
-
- const getSelectedTranslationComputeDevice = () => {
- pendingSelectedTranslationComputeDevice();
- asyncStdoutToPython("/get/data/selected_translation_compute_device");
- };
-
- const setSelectedTranslationComputeDevice = (selected_translation_compute_device) => {
- pendingSelectedTranslationComputeDevice();
- asyncStdoutToPython("/set/data/selected_translation_compute_device", selected_translation_compute_device);
- };
-
- const setSuccessSelectedTranslationComputeDevice = (selected_translation_compute_device) => {
- updateSelectedTranslationComputeDevice(selected_translation_compute_device);
- showNotification_SaveSuccess();
- };
-
-
- const getDeepLAuthKey = () => {
- pendingDeepLAuthKey();
- asyncStdoutToPython("/get/data/deepl_auth_key");
- };
-
- const setDeepLAuthKey = (selected_deepl_auth_key) => {
- pendingDeepLAuthKey();
- asyncStdoutToPython("/set/data/deepl_auth_key", selected_deepl_auth_key);
- };
-
- const setSuccessDeepLAuthKey = (data) => {
- updateDeepLAuthKey(data);
- showNotification_SaveSuccess(t("config_page.translation.deepl_auth_key.auth_key_success"), { category_id: "deepl_auth_key" });
- };
-
- const deleteDeepLAuthKey = () => {
- pendingDeepLAuthKey();
- asyncStdoutToPython("/delete/data/deepl_auth_key");
- };
-
- const deleteSuccessDeepLAuthKey = () => {
- updateDeepLAuthKey("");
- };
-
-
- return {
- currentCTranslate2WeightTypeStatus,
- updateCTranslate2WeightTypeStatus,
- updateDownloadedCTranslate2WeightTypeStatus,
- updateDownloadProgressCTranslate2WeightTypeStatus,
- pendingCTranslate2WeightType,
- downloadedCTranslate2WeightType,
- downloadCTranslate2Weight,
-
- currentSelectedCTranslate2WeightType,
- getSelectedCTranslate2WeightType,
- updateSelectedCTranslate2WeightType,
- setSelectedCTranslate2WeightType,
- setSuccessSelectedCTranslate2WeightType,
-
-
- currentSelectedTranslationComputeType,
- getSelectedTranslationComputeType,
- updateSelectedTranslationComputeType,
- setSelectedTranslationComputeType,
- setSuccessSelectedTranslationComputeType,
-
-
- currentSelectableTranslationComputeDeviceList,
- getSelectableTranslationComputeDeviceList,
- updateSelectableTranslationComputeDeviceList,
- updateSelectableTranslationComputeDeviceList_FromBackend,
-
- currentSelectedTranslationComputeDevice,
- getSelectedTranslationComputeDevice,
- updateSelectedTranslationComputeDevice,
- setSelectedTranslationComputeDevice,
- setSuccessSelectedTranslationComputeDevice,
-
- currentDeepLAuthKey,
- getDeepLAuthKey,
- updateDeepLAuthKey,
- setDeepLAuthKey,
- deleteDeepLAuthKey,
- deleteSuccessDeepLAuthKey,
- setSuccessDeepLAuthKey,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/vr/useVr.js b/src-ui/logics/configs/vr/useVr.js
deleted file mode 100644
index ee65c538..00000000
--- a/src-ui/logics/configs/vr/useVr.js
+++ /dev/null
@@ -1,145 +0,0 @@
-import {
- useStore_IsEnabledOverlaySmallLog,
- useStore_IsEnabledOverlayLargeLog,
- useStore_OverlaySmallLogSettings,
- useStore_OverlayLargeLogSettings,
- useStore_OverlayShowOnlyTranslatedMessages,
-} from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-import { useNotificationStatus } from "@logics_common";
-
-export const useVr = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { showNotification_SaveSuccess } = useNotificationStatus();
-
- const { currentIsEnabledOverlaySmallLog, updateIsEnabledOverlaySmallLog, pendingIsEnabledOverlaySmallLog } = useStore_IsEnabledOverlaySmallLog();
- const { currentIsEnabledOverlayLargeLog, updateIsEnabledOverlayLargeLog, pendingIsEnabledOverlayLargeLog } = useStore_IsEnabledOverlayLargeLog();
- const { currentOverlaySmallLogSettings, updateOverlaySmallLogSettings, pendingOverlaySmallLogSettings } = useStore_OverlaySmallLogSettings();
- const { currentOverlayLargeLogSettings, updateOverlayLargeLogSettings, pendingOverlayLargeLogSettings } = useStore_OverlayLargeLogSettings();
- const { currentOverlayShowOnlyTranslatedMessages, updateOverlayShowOnlyTranslatedMessages, pendingOverlayShowOnlyTranslatedMessages } = useStore_OverlayShowOnlyTranslatedMessages();
-
- const getIsEnabledOverlaySmallLog = () => {
- pendingIsEnabledOverlaySmallLog();
- asyncStdoutToPython("/get/data/overlay_small_log");
- };
-
- const toggleIsEnabledOverlaySmallLog = () => {
- pendingIsEnabledOverlaySmallLog();
- if (currentIsEnabledOverlaySmallLog.data) {
- asyncStdoutToPython("/set/disable/overlay_small_log");
- } else {
- asyncStdoutToPython("/set/enable/overlay_small_log");
- }
- };
-
- const setSuccessIsEnabledOverlaySmallLog = (enabled) => {
- updateIsEnabledOverlaySmallLog(enabled);
- showNotification_SaveSuccess();
- };
-
- const getIsEnabledOverlayLargeLog = () => {
- pendingIsEnabledOverlayLargeLog();
- asyncStdoutToPython("/get/data/overlay_large_log");
- };
-
- const toggleIsEnabledOverlayLargeLog = () => {
- pendingIsEnabledOverlayLargeLog();
- if (currentIsEnabledOverlayLargeLog.data) {
- asyncStdoutToPython("/set/disable/overlay_large_log");
- } else {
- asyncStdoutToPython("/set/enable/overlay_large_log");
- }
- };
-
- const setSuccessIsEnabledOverlayLargeLog = (enabled) => {
- updateIsEnabledOverlayLargeLog(enabled);
- showNotification_SaveSuccess();
- };
-
- const getOverlaySmallLogSettings = () => {
- // pendingOverlaySmallLogSettings();
- asyncStdoutToPython("/get/data/overlay_small_log_settings");
- };
-
- const setOverlaySmallLogSettings = (overlay_small_log_settings) => {
- // pendingOverlaySmallLogSettings();
- asyncStdoutToPython("/set/data/overlay_small_log_settings", overlay_small_log_settings);
- };
-
- const setSuccessOverlaySmallLogSettings = (settings) => {
- updateOverlaySmallLogSettings(settings);
- showNotification_SaveSuccess();
- };
-
- const getOverlayLargeLogSettings = () => {
- // pendingOverlayLargeLogSettings();
- asyncStdoutToPython("/get/data/overlay_large_log_settings");
- };
-
- const setOverlayLargeLogSettings = (overlay_large_log_settings) => {
- // pendingOverlayLargeLogSettings();
- asyncStdoutToPython("/set/data/overlay_large_log_settings", overlay_large_log_settings);
- };
-
- const setSuccessOverlayLargeLogSettings = (settings) => {
- updateOverlayLargeLogSettings(settings);
- showNotification_SaveSuccess();
- };
-
- const getOverlayShowOnlyTranslatedMessages = () => {
- pendingOverlayShowOnlyTranslatedMessages();
- asyncStdoutToPython("/get/data/overlay_show_only_translated_messages");
- };
-
- const toggleOverlayShowOnlyTranslatedMessages = () => {
- pendingOverlayShowOnlyTranslatedMessages();
- if (currentOverlayShowOnlyTranslatedMessages.data) {
- asyncStdoutToPython("/set/disable/overlay_show_only_translated_messages");
- } else {
- asyncStdoutToPython("/set/enable/overlay_show_only_translated_messages");
- }
- };
-
- const setSuccessOverlayShowOnlyTranslatedMessages = (enabled) => {
- updateOverlayShowOnlyTranslatedMessages(enabled);
- showNotification_SaveSuccess();
- };
-
- const sendTextToOverlay = (text) => {
- asyncStdoutToPython("/run/send_text_overlay", text);
- };
-
- return {
- currentIsEnabledOverlaySmallLog,
- getIsEnabledOverlaySmallLog,
- toggleIsEnabledOverlaySmallLog,
- updateIsEnabledOverlaySmallLog,
- setSuccessIsEnabledOverlaySmallLog,
-
- currentIsEnabledOverlayLargeLog,
- getIsEnabledOverlayLargeLog,
- toggleIsEnabledOverlayLargeLog,
- updateIsEnabledOverlayLargeLog,
- setSuccessIsEnabledOverlayLargeLog,
-
- currentOverlaySmallLogSettings,
- getOverlaySmallLogSettings,
- updateOverlaySmallLogSettings,
- setOverlaySmallLogSettings,
- setSuccessOverlaySmallLogSettings,
-
- currentOverlayLargeLogSettings,
- getOverlayLargeLogSettings,
- updateOverlayLargeLogSettings,
- setOverlayLargeLogSettings,
- setSuccessOverlayLargeLogSettings,
-
- currentOverlayShowOnlyTranslatedMessages,
- getOverlayShowOnlyTranslatedMessages,
- toggleOverlayShowOnlyTranslatedMessages,
- updateOverlayShowOnlyTranslatedMessages,
- setSuccessOverlayShowOnlyTranslatedMessages,
-
- sendTextToOverlay,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/useReceiveRoutes.js b/src-ui/logics/useReceiveRoutes.js
index a658fb85..239c0e13 100644
--- a/src-ui/logics/useReceiveRoutes.js
+++ b/src-ui/logics/useReceiveRoutes.js
@@ -92,222 +92,7 @@ export const STATIC_ROUTE_META_LIST = [
{ endpoint: "/set/data/message_box_ratio", ns: main, hook_name: "useMessageInputBoxRatio", method_name: "updateMessageInputBoxRatio" },
-
// // Config Page
- // // Device
- // // { endpoint: "/get/data/auto_mic_select", ns: configs, hook_name: "useDevice", method_name: "updateEnableAutoMicSelect" },
- // // { endpoint: "/set/enable/auto_mic_select", ns: configs, hook_name: "useDevice", method_name: "setSuccessEnableAutoMicSelect" },
- // // { endpoint: "/set/disable/auto_mic_select", ns: configs, hook_name: "useDevice", method_name: "setSuccessEnableAutoMicSelect" },
- // // { endpoint: "/get/data/auto_speaker_select", ns: configs, hook_name: "useDevice", method_name: "updateEnableAutoSpeakerSelect" },
- // // { endpoint: "/set/enable/auto_speaker_select", ns: configs, hook_name: "useDevice", method_name: "setSuccessEnableAutoSpeakerSelect" },
- // // { endpoint: "/set/disable/auto_speaker_select", ns: configs, hook_name: "useDevice", method_name: "setSuccessEnableAutoSpeakerSelect" },
-
- // // // Device (Mic)
- // // { endpoint: "/get/data/mic_host_list", ns: configs, hook_name: "useDevice", method_name: "updateMicHostList_FromBackend" },
- // // { endpoint: "/run/mic_host_list", ns: configs, hook_name: "useDevice", method_name: "updateMicHostList_FromBackend" },
-
- // // { endpoint: "/get/data/selected_mic_host", ns: configs, hook_name: "useDevice", method_name: "updateSelectedMicHost" },
- // // { endpoint: "/set/data/selected_mic_host", ns: configs, hook_name: "useDevice", method_name: "setSuccessSelectedMicHost" },
-
-
- // // { endpoint: "/get/data/mic_device_list", ns: configs, hook_name: "useDevice", method_name: "updateMicDeviceList_FromBackend" },
- // // { endpoint: "/run/mic_device_list", ns: configs, hook_name: "useDevice", method_name: "updateMicDeviceList_FromBackend" },
-
- // // { endpoint: "/get/data/selected_mic_device", ns: configs, hook_name: "useDevice", method_name: "updateSelectedMicDevice" },
- // // { endpoint: "/set/data/selected_mic_device", ns: configs, hook_name: "useDevice", method_name: "setSuccessSelectedMicDevice" },
-
- // // { endpoint: "/run/selected_mic_device", ns: configs, hook_name: "useDevice", method_name: "updateSelectedMicHostAndDevice" },
-
- // // // Device (Speaker)
- // // { endpoint: "/get/data/speaker_device_list", ns: configs, hook_name: "useDevice", method_name: "updateSpeakerDeviceList_FromBackend" },
- // // { endpoint: "/run/speaker_device_list", ns: configs, hook_name: "useDevice", method_name: "updateSpeakerDeviceList_FromBackend" },
-
- // // { endpoint: "/get/data/selected_speaker_device", ns: configs, hook_name: "useDevice", method_name: "updateSelectedSpeakerDevice" },
- // // { endpoint: "/set/data/selected_speaker_device", ns: configs, hook_name: "useDevice", method_name: "setSuccessSelectedSpeakerDevice" },
- // // { endpoint: "/run/selected_speaker_device", ns: configs, hook_name: "useDevice", method_name: "updateSelectedSpeakerDevice" },
-
- // // // Device (Threshold)
- // // { endpoint: "/get/data/mic_threshold", ns: configs, hook_name: "useDevice", method_name: "updateMicThreshold" },
- // // { endpoint: "/set/data/mic_threshold", ns: configs, hook_name: "useDevice", method_name: "setSuccessMicThreshold" },
- // // { endpoint: "/get/data/speaker_threshold", ns: configs, hook_name: "useDevice", method_name: "updateSpeakerThreshold" },
- // // { endpoint: "/set/data/speaker_threshold", ns: configs, hook_name: "useDevice", method_name: "setSuccessSpeakerThreshold" },
-
- // // { endpoint: "/get/data/mic_automatic_threshold", ns: configs, hook_name: "useDevice", method_name: "updateEnableAutomaticMicThreshold" },
- // // { endpoint: "/set/enable/mic_automatic_threshold", ns: configs, hook_name: "useDevice", method_name: "setSuccessEnableAutomaticMicThreshold" },
- // // { endpoint: "/set/disable/mic_automatic_threshold", ns: configs, hook_name: "useDevice", method_name: "setSuccessEnableAutomaticMicThreshold" },
- // // { endpoint: "/get/data/speaker_automatic_threshold", ns: configs, hook_name: "useDevice", method_name: "updateEnableAutomaticSpeakerThreshold" },
- // // { endpoint: "/set/enable/speaker_automatic_threshold", ns: configs, hook_name: "useDevice", method_name: "setSuccessEnableAutomaticSpeakerThreshold" },
- // // { endpoint: "/set/disable/speaker_automatic_threshold", ns: configs, hook_name: "useDevice", method_name: "setSuccessEnableAutomaticSpeakerThreshold" },
-
-
- // // Appearance
- // // { endpoint: "/get/data/ui_language", ns: configs, hook_name: "useAppearance", method_name: "updateUiLanguage" },
- // // { endpoint: "/set/data/ui_language", ns: configs, hook_name: "useAppearance", method_name: "setSuccessUiLanguage" },
-
- // // { endpoint: "/get/data/ui_scaling", ns: configs, hook_name: "useAppearance", method_name: "updateUiScaling" },
- // // { endpoint: "/set/data/ui_scaling", ns: configs, hook_name: "useAppearance", method_name: "setSuccessUiScaling" },
-
- // // { endpoint: "/get/data/textbox_ui_scaling", ns: configs, hook_name: "useAppearance", method_name: "updateMessageLogUiScaling" },
- // // { endpoint: "/set/data/textbox_ui_scaling", ns: configs, hook_name: "useAppearance", method_name: "setSuccessMessageLogUiScaling" },
-
- // // { endpoint: "/get/data/send_message_button_type", ns: configs, hook_name: "useAppearance", method_name: "updateSendMessageButtonType" },
- // // { endpoint: "/set/data/send_message_button_type", ns: configs, hook_name: "useAppearance", method_name: "setSuccessSendMessageButtonType" },
-
- // // { endpoint: "/get/data/show_resend_button", ns: configs, hook_name: "useAppearance", method_name: "updateShowResendButton" },
- // // { endpoint: "/set/enable/show_resend_button", ns: configs, hook_name: "useAppearance", method_name: "setSuccessShowResendButton" },
- // // { endpoint: "/set/disable/show_resend_button", ns: configs, hook_name: "useAppearance", method_name: "setSuccessShowResendButton" },
-
- // // { endpoint: "/get/data/font_family", ns: configs, hook_name: "useAppearance", method_name: "updateSelectedFontFamily" },
- // // { endpoint: "/set/data/font_family", ns: configs, hook_name: "useAppearance", method_name: "setSuccessSelectedFontFamily" },
-
- // // { endpoint: "/get/data/transparency", ns: configs, hook_name: "useAppearance", method_name: "updateTransparency" },
- // // { endpoint: "/set/data/transparency", ns: configs, hook_name: "useAppearance", method_name: "setSuccessTransparency" },
-
- // // Translation
- // { endpoint: "/get/data/deepl_auth_key", ns: configs, hook_name: "useTranslation", method_name: "updateDeepLAuthKey" },
- // { endpoint: "/set/data/deepl_auth_key", ns: configs, hook_name: "useTranslation", method_name: "setSuccessDeepLAuthKey" },
- // { endpoint: "/delete/data/deepl_auth_key", ns: configs, hook_name: "useTranslation", method_name: "deleteSuccessDeepLAuthKey" },
-
- // // Translation (AI Models)
- // { endpoint: "/get/data/selectable_ctranslate2_weight_type_dict", ns: configs, hook_name: "useTranslation", method_name: "updateDownloadedCTranslate2WeightTypeStatus" },
- // { endpoint: "/get/data/ctranslate2_weight_type", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedCTranslate2WeightType" },
- // { endpoint: "/set/data/ctranslate2_weight_type", ns: configs, hook_name: "useTranslation", method_name: "setSuccessSelectedCTranslate2WeightType" },
-
- // { endpoint: "/run/selected_translation_compute_type", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedTranslationComputeType" },
- // { endpoint: "/get/data/selected_translation_compute_type", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedTranslationComputeType" },
- // { endpoint: "/set/data/selected_translation_compute_type", ns: configs, hook_name: "useTranslation", method_name: "setSuccessSelectedTranslationComputeType" },
-
- // { endpoint: "/run/downloaded_ctranslate2_weight", ns: configs, hook_name: "useTranslation", method_name: "downloadedCTranslate2WeightType" },
- // { endpoint: "/run/download_ctranslate2_weight", ns: null, hook_name: null, method_name: null },
- // { endpoint: "/run/download_progress_ctranslate2_weight", ns: configs, hook_name: "useTranslation", method_name: "updateDownloadProgressCTranslate2WeightTypeStatus" },
-
- // { endpoint: "/get/data/translation_compute_device_list", ns: configs, hook_name: "useTranslation", method_name: "updateSelectableTranslationComputeDeviceList_FromBackend" },
-
- // { endpoint: "/get/data/selected_translation_compute_device", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedTranslationComputeDevice" },
- // { endpoint: "/set/data/selected_translation_compute_device", ns: configs, hook_name: "useTranslation", method_name: "setSuccessSelectedTranslationComputeDevice" },
-
-
- // // Transcription
- // // Transcription (Mic)
- // { endpoint: "/get/data/mic_record_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateMicRecordTimeout" },
- // { endpoint: "/set/data/mic_record_timeout", ns: configs, hook_name: "useTranscription", method_name: "setSuccessMicRecordTimeout" },
-
- // { endpoint: "/get/data/mic_phrase_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateMicPhraseTimeout" },
- // { endpoint: "/set/data/mic_phrase_timeout", ns: configs, hook_name: "useTranscription", method_name: "setSuccessMicPhraseTimeout" },
-
- // { endpoint: "/get/data/mic_max_phrases", ns: configs, hook_name: "useTranscription", method_name: "updateMicMaxWords" },
- // { endpoint: "/set/data/mic_max_phrases", ns: configs, hook_name: "useTranscription", method_name: "setSuccessMicMaxWords" },
-
- // { endpoint: "/get/data/mic_word_filter", ns: configs, hook_name: "useTranscription", method_name: "getSuccessMicWordFilterList" },
- // { endpoint: "/set/data/mic_word_filter", ns: configs, hook_name: "useTranscription", method_name: "setSuccessMicWordFilterList" },
-
- // // Transcription (Speaker)
- // { endpoint: "/get/data/speaker_record_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerRecordTimeout" },
- // { endpoint: "/set/data/speaker_record_timeout", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSpeakerRecordTimeout" },
-
- // { endpoint: "/get/data/speaker_phrase_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerPhraseTimeout" },
- // { endpoint: "/set/data/speaker_phrase_timeout", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSpeakerPhraseTimeout" },
-
- // { endpoint: "/get/data/speaker_max_phrases", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerMaxWords" },
- // { endpoint: "/set/data/speaker_max_phrases", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSpeakerMaxWords" },
-
- // // Transcription (AI Models)
- // { endpoint: "/get/data/selected_transcription_engine", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedTranscriptionEngine" },
- // { endpoint: "/set/data/selected_transcription_engine", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSelectedTranscriptionEngine" },
-
- // { endpoint: "/get/data/selectable_whisper_weight_type_dict", ns: configs, hook_name: "useTranscription", method_name: "updateDownloadedWhisperWeightTypeStatus" },
- // { endpoint: "/get/data/whisper_weight_type", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedWhisperWeightType" },
- // { endpoint: "/set/data/whisper_weight_type", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSelectedWhisperWeightType" },
-
- // { endpoint: "/run/selected_transcription_compute_type", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedTranscriptionComputeType" },
- // { endpoint: "/get/data/selected_transcription_compute_type", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedTranscriptionComputeType" },
- // { endpoint: "/set/data/selected_transcription_compute_type", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSelectedTranscriptionComputeType" },
-
-
- // { endpoint: "/run/downloaded_whisper_weight", ns: configs, hook_name: "useTranscription", method_name: "downloadedWhisperWeightType" },
- // { endpoint: "/run/download_whisper_weight", ns: null, hook_name: null, method_name: null },
- // { endpoint: "/run/download_progress_whisper_weight", ns: configs, hook_name: "useTranscription", method_name: "updateDownloadProgressWhisperWeightTypeStatus" },
-
- // { endpoint: "/get/data/transcription_compute_device_list", ns: configs, hook_name: "useTranscription", method_name: "updateSelectableTranscriptionComputeDeviceList_FromBackend" },
- // { endpoint: "/get/data/selected_transcription_compute_device", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedTranscriptionComputeDevice" },
- // { endpoint: "/set/data/selected_transcription_compute_device", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSelectedTranscriptionComputeDevice" },
-
- // // Transcription (Advanced)
- // { endpoint: "/get/data/mic_avg_logprob", ns: configs, hook_name: "useTranscription", method_name: "updateMicAvgLogprob" },
- // { endpoint: "/set/data/mic_avg_logprob", ns: configs, hook_name: "useTranscription", method_name: "setSuccessMicAvgLogprob" },
- // { endpoint: "/get/data/mic_no_speech_prob", ns: configs, hook_name: "useTranscription", method_name: "updateMicNoSpeechProb" },
- // { endpoint: "/set/data/mic_no_speech_prob", ns: configs, hook_name: "useTranscription", method_name: "setSuccessMicNoSpeechProb" },
- // { endpoint: "/get/data/speaker_avg_logprob", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerAvgLogprob" },
- // { endpoint: "/set/data/speaker_avg_logprob", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSpeakerAvgLogprob" },
- // { endpoint: "/get/data/speaker_no_speech_prob", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerNoSpeechProb" },
- // { endpoint: "/set/data/speaker_no_speech_prob", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSpeakerNoSpeechProb" },
-
- // VR
- { endpoint: "/get/data/overlay_small_log", ns: configs, hook_name: "useVr", method_name: "updateIsEnabledOverlaySmallLog" },
- { endpoint: "/set/enable/overlay_small_log", ns: configs, hook_name: "useVr", method_name: "setSuccessIsEnabledOverlaySmallLog" },
- { endpoint: "/set/disable/overlay_small_log", ns: configs, hook_name: "useVr", method_name: "setSuccessIsEnabledOverlaySmallLog" },
-
- { endpoint: "/get/data/overlay_small_log_settings", ns: configs, hook_name: "useVr", method_name: "updateOverlaySmallLogSettings" },
- { endpoint: "/set/data/overlay_small_log_settings", ns: configs, hook_name: "useVr", method_name: "setSuccessOverlaySmallLogSettings" },
-
- { endpoint: "/get/data/overlay_large_log", ns: configs, hook_name: "useVr", method_name: "updateIsEnabledOverlayLargeLog" },
- { endpoint: "/set/enable/overlay_large_log", ns: configs, hook_name: "useVr", method_name: "setSuccessIsEnabledOverlayLargeLog" },
- { endpoint: "/set/disable/overlay_large_log", ns: configs, hook_name: "useVr", method_name: "setSuccessIsEnabledOverlayLargeLog" },
-
- { endpoint: "/get/data/overlay_large_log_settings", ns: configs, hook_name: "useVr", method_name: "updateOverlayLargeLogSettings" },
- { endpoint: "/set/data/overlay_large_log_settings", ns: configs, hook_name: "useVr", method_name: "setSuccessOverlayLargeLogSettings" },
-
- { endpoint: "/get/data/overlay_show_only_translated_messages", ns: configs, hook_name: "useVr", method_name: "updateOverlayShowOnlyTranslatedMessages" },
- { endpoint: "/set/enable/overlay_show_only_translated_messages", ns: configs, hook_name: "useVr", method_name: "setSuccessOverlayShowOnlyTranslatedMessages" },
- { endpoint: "/set/disable/overlay_show_only_translated_messages", ns: configs, hook_name: "useVr", method_name: "setSuccessOverlayShowOnlyTranslatedMessages" },
-
- { endpoint: "/run/send_text_overlay", ns: null, hook_name: null, method_name: null },
-
-
- // // Others
- // { endpoint: "/get/data/auto_clear_message_box", ns: configs, hook_name: "useOthers", method_name: "updateEnableAutoClearMessageInputBox" },
- // { endpoint: "/set/enable/auto_clear_message_box", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableAutoClearMessageInputBox" },
- // { endpoint: "/set/disable/auto_clear_message_box", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableAutoClearMessageInputBox" },
-
- // { endpoint: "/get/data/send_only_translated_messages", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendOnlyTranslatedMessages" },
- // { endpoint: "/set/enable/send_only_translated_messages", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableSendOnlyTranslatedMessages" },
- // { endpoint: "/set/disable/send_only_translated_messages", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableSendOnlyTranslatedMessages" },
-
- // { endpoint: "/get/data/logger_feature", ns: configs, hook_name: "useOthers", method_name: "updateEnableAutoExportMessageLogs" },
- // { endpoint: "/set/enable/logger_feature", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableAutoExportMessageLogs" },
- // { endpoint: "/set/disable/logger_feature", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableAutoExportMessageLogs" },
-
- // { endpoint: "/get/data/vrc_mic_mute_sync", ns: configs, hook_name: "useOthers", method_name: "getSuccessEnableVrcMicMuteSync" },
- // { endpoint: "/set/enable/vrc_mic_mute_sync", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableVrcMicMuteSync" },
- // { endpoint: "/set/disable/vrc_mic_mute_sync", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableVrcMicMuteSync" },
-
-
- // { endpoint: "/get/data/send_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendMessageToVrc" },
- // { endpoint: "/set/enable/send_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableSendMessageToVrc" },
- // { endpoint: "/set/disable/send_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableSendMessageToVrc" },
-
- // { endpoint: "/get/data/send_received_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendReceivedMessageToVrc" },
- // { endpoint: "/set/enable/send_received_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableSendReceivedMessageToVrc" },
- // { endpoint: "/set/disable/send_received_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableSendReceivedMessageToVrc" },
-
- // { endpoint: "/get/data/notification_vrc_sfx", ns: configs, hook_name: "useOthers", method_name: "updateEnableNotificationVrcSfx" },
- // { endpoint: "/set/enable/notification_vrc_sfx", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableNotificationVrcSfx" },
- // { endpoint: "/set/disable/notification_vrc_sfx", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableNotificationVrcSfx" },
- // { endpoint: "/set/disable/notification_vrc_sfx", ns: configs, hook_name: "useOthers", method_name: "setSuccessEnableNotificationVrcSfx" },
-
- // { endpoint: "/get/data/send_message_format_parts", ns: configs, hook_name: "useOthers", method_name: "updateSendMessageFormatParts" },
- // { endpoint: "/set/data/send_message_format_parts", ns: configs, hook_name: "useOthers", method_name: "setSuccessSendMessageFormatParts" },
- // { endpoint: "/get/data/received_message_format_parts", ns: configs, hook_name: "useOthers", method_name: "updateReceivedMessageFormatParts" },
- // { endpoint: "/set/data/received_message_format_parts", ns: configs, hook_name: "useOthers", method_name: "setSuccessReceivedMessageFormatParts" },
-
- // { endpoint: "/get/data/convert_message_to_romaji", ns: configs, hook_name: "useOthers", method_name: "updateConvertMessageToRomaji" },
- // { endpoint: "/set/enable/convert_message_to_romaji", ns: configs, hook_name: "useOthers", method_name: "setSuccessConvertMessageToRomaji" },
- // { endpoint: "/set/disable/convert_message_to_romaji", ns: configs, hook_name: "useOthers", method_name: "setSuccessConvertMessageToRomaji" },
-
- // { endpoint: "/get/data/convert_message_to_hiragana", ns: configs, hook_name: "useOthers", method_name: "updateConvertMessageToHiragana" },
- // { endpoint: "/set/enable/convert_message_to_hiragana", ns: configs, hook_name: "useOthers", method_name: "setSuccessConvertMessageToHiragana" },
- // { endpoint: "/set/disable/convert_message_to_hiragana", ns: configs, hook_name: "useOthers", method_name: "setSuccessConvertMessageToHiragana" },
-
// Hotkeys
{ endpoint: "/get/data/hotkeys", ns: configs, hook_name: "useHotkeys", method_name: "updateHotkeys" },
{ endpoint: "/set/data/hotkeys", ns: configs, hook_name: "useHotkeys", method_name: "setSuccessHotkeys" },
@@ -316,24 +101,6 @@ export const STATIC_ROUTE_META_LIST = [
{ endpoint: "/get/data/plugins_status", ns: configs, hook_name: "usePlugins", method_name: "updateSavedPluginsStatus" },
{ endpoint: "/set/data/plugins_status", ns: configs, hook_name: "usePlugins", method_name: "setSuccessSavedPluginsStatus" },
- // // Advanced Settings
- // { endpoint: "/get/data/osc_ip_address", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateOscIpAddress" },
- // { endpoint: "/set/data/osc_ip_address", ns: configs, hook_name: "useAdvancedSettings", method_name: "setSuccessOscIpAddress" },
-
- // { endpoint: "/get/data/osc_port", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateOscPort" },
- // { endpoint: "/set/data/osc_port", ns: configs, hook_name: "useAdvancedSettings", method_name: "setSuccessOscPort" },
-
- // { endpoint: "/get/data/websocket_server", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateEnableWebsocket" },
- // { endpoint: "/set/enable/websocket_server", ns: configs, hook_name: "useAdvancedSettings", method_name: "setSuccessEnableWebsocket" },
- // { endpoint: "/set/disable/websocket_server", ns: configs, hook_name: "useAdvancedSettings", method_name: "setSuccessEnableWebsocket" },
-
- // { endpoint: "/get/data/websocket_host", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateWebsocketHost" },
- // { endpoint: "/set/data/websocket_host", ns: configs, hook_name: "useAdvancedSettings", method_name: "setSuccessWebsocketHost" },
-
- // { endpoint: "/get/data/websocket_port", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateWebsocketPort" },
- // { endpoint: "/set/data/websocket_port", ns: configs, hook_name: "useAdvancedSettings", method_name: "setSuccessWebsocketPort" },
-
-
// // Not Implemented Yet...
{ endpoint: "/get/data/transcription_engines", ns: null, hook_name: null, method_name: null }, // Not implemented on UI yet. (if ai_models has not been detected, this will be blank array[]. if the ai_models are ok but just network has not connected, it'l be only ["Whisper"])
];
diff --git a/src-ui/store.js b/src-ui/store.js
index 4eb3f56b..74e8f6da 100644
--- a/src-ui/store.js
+++ b/src-ui/store.js
@@ -10,8 +10,6 @@ import {
import {
translator_status,
- ctranslate2_weight_type_status,
- whisper_weight_type_status,
} from "@ui_configs";
export const store = {
@@ -110,52 +108,35 @@ export const createAtomWithHook = (initialValue, base_name, options) => {
};
};
- // dynamic registry に登録(キー名は既存の命名規約に合わせる)
try {
const hookName = `useStore_${base_name}`;
const atomName = `Atom_${base_name}`;
dynamicStoreRegistry[hookName] = useHook;
dynamicStoreRegistry[atomName] = atomInstance;
} catch (e) {
- // 登録失敗でも処理中断しない(開発用に console.warn してもよい)
- // console.warn("dynamic registration failed for", base_name, e);
+ console.warn("dynamic registration failed for", base_name, e);
}
return { atomInstance, useHook };
};
-/**
- * getStoreHook(baseName)
- * dynamicStoreRegistry から useStore_ を返すヘルパー。
- * 存在しなければ undefined を返す。
- */
export const getStoreHook = (baseName) => {
const hookName = `useStore_${baseName}`;
return dynamicStoreRegistry[hookName];
};
-/**
- * registerMany(settingsArray)
- * settingsArray を走査して createAtomWithHook を呼び出し、
- * dynamicStoreRegistry に登録します。
- *
- * settingsArray の各要素は少なくとも Base_Name と default_value を持つことを期待します。
- */
export const registerMany = (settingsArray = []) => {
for (const s of settingsArray) {
try {
- // 既に同名の atom が registry にあればスキップ(上書き防止)
const hookName = `useStore_${s.Base_Name}`;
if (dynamicStoreRegistry[hookName]) {
continue;
}
- // createAtomWithHook が registry に登録してくれる
createAtomWithHook(s.default_value, s.Base_Name, s.options || {});
} catch (e) {
- // 個別エラーは無視して続行
- // console.warn("registerMany failed for", s.Base_Name, e);
+ console.warn("registerMany failed for", s.Base_Name, e);
}
}
};
@@ -227,143 +208,21 @@ export const { atomInstance: Atom_SettingBoxScrollPosition, useHook: useStore_Se
export const { atomInstance: Atom_IsOpenedDropdownMenu, useHook: useStore_IsOpenedDropdownMenu } = createAtomWithHook("", "IsOpenedDropdownMenu");
// Device
-// export const { atomInstance: Atom_EnableAutoMicSelect, useHook: useStore_EnableAutoMicSelect } = createAtomWithHook(true, "EnableAutoMicSelect");
-// export const { atomInstance: Atom_EnableAutoSpeakerSelect, useHook: useStore_EnableAutoSpeakerSelect } = createAtomWithHook(true, "EnableAutoSpeakerSelect");
-
-// export const { atomInstance: Atom_MicHostList, useHook: useStore_MicHostList } = createAtomWithHook({}, "MicHostList");
-// export const { atomInstance: Atom_SelectedMicHost, useHook: useStore_SelectedMicHost } = createAtomWithHook("Nothing Selected", "SelectedMicHost");
-// export const { atomInstance: Atom_MicDeviceList, useHook: useStore_MicDeviceList } = createAtomWithHook({}, "MicDeviceList");
-// export const { atomInstance: Atom_SelectedMicDevice, useHook: useStore_SelectedMicDevice } = createAtomWithHook("Nothing Selected", "SelectedMicDevice");
-
-// export const { atomInstance: Atom_SpeakerDeviceList, useHook: useStore_SpeakerDeviceList } = createAtomWithHook({}, "SpeakerDeviceList");
-// export const { atomInstance: Atom_SelectedSpeakerDevice, useHook: useStore_SelectedSpeakerDevice } = createAtomWithHook("Nothing Selected", "SelectedSpeakerDevice");
-
export const { atomInstance: Atom_MicVolume, useHook: useStore_MicVolume } = createAtomWithHook(0, "MicVolume");
export const { atomInstance: Atom_SpeakerVolume, useHook: useStore_SpeakerVolume } = createAtomWithHook(0, "SpeakerVolume");
export const { atomInstance: Atom_MicThresholdCheckStatus, useHook: useStore_MicThresholdCheckStatus } = createAtomWithHook(false, "MicThresholdCheckStatus", {is_state_ok: true});
export const { atomInstance: Atom_SpeakerThresholdCheckStatus, useHook: useStore_SpeakerThresholdCheckStatus } = createAtomWithHook(false, "SpeakerThresholdCheckStatus", {is_state_ok: true});
-// export const { atomInstance: Atom_MicThreshold, useHook: useStore_MicThreshold } = createAtomWithHook(0, "MicThreshold");
-// export const { atomInstance: Atom_SpeakerThreshold, useHook: useStore_SpeakerThreshold } = createAtomWithHook(0, "SpeakerThreshold");
-
-// export const { atomInstance: Atom_EnableAutomaticMicThreshold, useHook: useStore_EnableAutomaticMicThreshold } = createAtomWithHook(false, "EnableAutomaticMicThreshold");
-// export const { atomInstance: Atom_EnableAutomaticSpeakerThreshold, useHook: useStore_EnableAutomaticSpeakerThreshold } = createAtomWithHook(false, "EnableAutomaticSpeakerThreshold");
-
-
-// Appearance
-// export const { atomInstance: Atom_UiLanguage, useHook: useStore_UiLanguage } = createAtomWithHook("en", "UiLanguage");
-// export const { atomInstance: Atom_UiScaling, useHook: useStore_UiScaling } = createAtomWithHook(100, "UiScaling");
-// export const { atomInstance: Atom_MessageLogUiScaling, useHook: useStore_MessageLogUiScaling } = createAtomWithHook(100, "MessageLogUiScaling");
-// export const { atomInstance: Atom_SendMessageButtonType, useHook: useStore_SendMessageButtonType } = createAtomWithHook("show", "SendMessageButtonType");
-// export const { atomInstance: Atom_ShowResendButton, useHook: useStore_ShowResendButton } = createAtomWithHook(false, "ShowResendButton");
-// export const { atomInstance: Atom_SelectedFontFamily, useHook: useStore_SelectedFontFamily } = createAtomWithHook("Yu Gothic UI", "SelectedFontFamily");
export const { atomInstance: Atom_SelectableFontFamilyList, useHook: useStore_SelectableFontFamilyList } = createAtomWithHook({}, "SelectableFontFamilyList");
-// export const { atomInstance: Atom_Transparency, useHook: useStore_Transparency } = createAtomWithHook(100, "Transparency");
export const { atomInstance: Atom_IsOpenedMicWordFilterList, useHook: useStore_IsOpenedMicWordFilterList } = createAtomWithHook(false, "IsOpenedMicWordFilterList");
-// export const { atomInstance: Atom_MicWordFilterList, useHook: useStore_MicWordFilterList } = createAtomWithHook([], "MicWordFilterList");
-// Translation
-// export const { atomInstance: Atom_DeepLAuthKey, useHook: useStore_DeepLAuthKey } = createAtomWithHook(null, "DeepLAuthKey");
-// export const { atomInstance: Atom_SelectedCTranslate2WeightType, useHook: useStore_SelectedCTranslate2WeightType } = createAtomWithHook("", "SelectedCTranslate2WeightType");
-// export const { atomInstance: Atom_CTranslate2WeightTypeStatus, useHook: useStore_CTranslate2WeightTypeStatus } = createAtomWithHook(ctranslate2_weight_type_status, "CTranslate2WeightTypeStatus");
-
-// export const { atomInstance: Atom_SelectableTranslationComputeDeviceList, useHook: useStore_SelectableTranslationComputeDeviceList } = createAtomWithHook({}, "SelectableTranslationComputeDeviceList");
-// export const { atomInstance: Atom_SelectedTranslationComputeDevice, useHook: useStore_SelectedTranslationComputeDevice } = createAtomWithHook("", "SelectedTranslationComputeDevice");
-// export const { atomInstance: Atom_SelectedTranslationComputeType, useHook: useStore_SelectedTranslationComputeType } = createAtomWithHook("", "SelectedTranslationComputeType");
-
-// Transcription
-// export const { atomInstance: Atom_MicRecordTimeout, useHook: useStore_MicRecordTimeout } = createAtomWithHook(0, "MicRecordTimeout");
-// export const { atomInstance: Atom_MicPhraseTimeout, useHook: useStore_MicPhraseTimeout } = createAtomWithHook(0, "MicPhraseTimeout");
-// export const { atomInstance: Atom_MicMaxWords, useHook: useStore_MicMaxWords } = createAtomWithHook(0, "MicMaxWords");
-
-// export const { atomInstance: Atom_SpeakerRecordTimeout, useHook: useStore_SpeakerRecordTimeout } = createAtomWithHook(0, "SpeakerRecordTimeout");
-// export const { atomInstance: Atom_SpeakerPhraseTimeout, useHook: useStore_SpeakerPhraseTimeout } = createAtomWithHook(0, "SpeakerPhraseTimeout");
-// export const { atomInstance: Atom_SpeakerMaxWords, useHook: useStore_SpeakerMaxWords } = createAtomWithHook(0, "SpeakerMaxWords");
-
-// export const { atomInstance: Atom_SelectedWhisperWeightType, useHook: useStore_SelectedWhisperWeightType } = createAtomWithHook("", "SelectedWhisperWeightType");
-// export const { atomInstance: Atom_WhisperWeightTypeStatus, useHook: useStore_WhisperWeightTypeStatus } = createAtomWithHook(whisper_weight_type_status, "WhisperWeightTypeStatus");
-// export const { atomInstance: Atom_SelectedTranscriptionEngine, useHook: useStore_SelectedTranscriptionEngine } = createAtomWithHook(whisper_weight_type_status, "SelectedTranscriptionEngine");
-
-// export const { atomInstance: Atom_SelectableTranscriptionComputeDeviceList, useHook: useStore_SelectableTranscriptionComputeDeviceList } = createAtomWithHook({}, "SelectableTranscriptionComputeDeviceList");
-// export const { atomInstance: Atom_SelectedTranscriptionComputeDevice, useHook: useStore_SelectedTranscriptionComputeDevice } = createAtomWithHook("", "SelectedTranscriptionComputeDevice");
-// export const { atomInstance: Atom_SelectedTranscriptionComputeType, useHook: useStore_SelectedTranscriptionComputeType } = createAtomWithHook("", "SelectedTranscriptionComputeType");
-
-// export const { atomInstance: Atom_MicAvgLogprob, useHook: useStore_MicAvgLogprob } = createAtomWithHook(-0.8, "MicAvgLogprob");
-// export const { atomInstance: Atom_MicNoSpeechProb, useHook: useStore_MicNoSpeechProb } = createAtomWithHook(0.6, "MicNoSpeechProb");
-// export const { atomInstance: Atom_SpeakerAvgLogprob, useHook: useStore_SpeakerAvgLogprob } = createAtomWithHook(-0.8, "SpeakerAvgLogprob");
-// export const { atomInstance: Atom_SpeakerNoSpeechProb, useHook: useStore_SpeakerNoSpeechProb } = createAtomWithHook(0.6, "SpeakerNoSpeechProb");
-
-
-// VR
-// export const { atomInstance: Atom_OverlaySmallLogSettings, useHook: useStore_OverlaySmallLogSettings } = createAtomWithHook({
-// x_pos: 0.0,
-// y_pos: 0.0,
-// z_pos: 0.0,
-// x_rotation: 0.0,
-// y_rotation: 0.0,
-// z_rotation: 0.0,
-// display_duration: 5,
-// fadeout_duration: 2,
-// tracker: "HMD",
-// }, "OverlaySmallLogSettings");
-// export const { atomInstance: Atom_IsEnabledOverlaySmallLog, useHook: useStore_IsEnabledOverlaySmallLog } = createAtomWithHook(false, "IsEnabledOverlaySmallLog");
-// export const { atomInstance: Atom_OverlayLargeLogSettings, useHook: useStore_OverlayLargeLogSettings } = createAtomWithHook({
-// x_pos: 0.0,
-// y_pos: 0.0,
-// z_pos: 0.0,
-// x_rotation: 0.0,
-// y_rotation: 0.0,
-// z_rotation: 0.0,
-// display_duration: 5,
-// fadeout_duration: 2,
-// tracker: "HMD",
-// }, "OverlayLargeLogSettings");
-// export const { atomInstance: Atom_IsEnabledOverlayLargeLog, useHook: useStore_IsEnabledOverlayLargeLog } = createAtomWithHook(false, "IsEnabledOverlayLargeLog");
-// export const { atomInstance: Atom_OverlayShowOnlyTranslatedMessages, useHook: useStore_OverlayShowOnlyTranslatedMessages } = createAtomWithHook(false, "OverlayShowOnlyTranslatedMessages");
-
-// Others
-// export const { atomInstance: Atom_EnableAutoClearMessageInputBox, useHook: useStore_EnableAutoClearMessageInputBox } = createAtomWithHook(true, "EnableAutoClearMessageInputBox");
-// export const { atomInstance: Atom_EnableSendOnlyTranslatedMessages, useHook: useStore_EnableSendOnlyTranslatedMessages } = createAtomWithHook(false, "EnableSendOnlyTranslatedMessages");
-// export const { atomInstance: Atom_EnableAutoExportMessageLogs, useHook: useStore_EnableAutoExportMessageLogs } = createAtomWithHook(false, "EnableAutoExportMessageLogs");
-// export const { atomInstance: Atom_EnableVrcMicMuteSync, useHook: useStore_EnableVrcMicMuteSync } = createAtomWithHook(false, "EnableVrcMicMuteSync");
-// export const { atomInstance: Atom_EnableSendMessageToVrc, useHook: useStore_EnableSendMessageToVrc } = createAtomWithHook(true, "EnableSendMessageToVrc");
-// export const { atomInstance: Atom_EnableSendReceivedMessageToVrc, useHook: useStore_EnableSendReceivedMessageToVrc } = createAtomWithHook(false, "EnableSendReceivedMessageToVrc");
-// export const { atomInstance: Atom_EnableNotificationVrcSfx, useHook: useStore_EnableNotificationVrcSfx } = createAtomWithHook(true, "EnableNotificationVrcSfx");
export const { atomInstance: Atom_MessageFormat_ExampleViewFilter, useHook: useStore_MessageFormat_ExampleViewFilter } = createAtomWithHook({
send: "Simplified",
received: "Simplified",
}, "MessageFormat_ExampleViewFilter");
-// export const { atomInstance: Atom_SendMessageFormatParts, useHook: useStore_SendMessageFormatParts } = createAtomWithHook({
-// message: {
-// prefix: "",
-// suffix: ""
-// },
-// separator: "\n",
-// translation: {
-// prefix: "",
-// separator: "\n",
-// suffix: ""
-// },
-// translation_first: false,
-// }, "SendMessageFormatParts");
-// export const { atomInstance: Atom_ReceivedMessageFormatParts, useHook: useStore_ReceivedMessageFormatParts } = createAtomWithHook({
-// message: {
-// prefix: "",
-// suffix: ""
-// },
-// separator: "\n",
-// translation: {
-// prefix: "",
-// separator: "\n",
-// suffix: ""
-// },
-// translation_first: false,
-// }, "ReceivedMessageFormatParts");
-// export const { atomInstance: Atom_ConvertMessageToRomaji, useHook: useStore_ConvertMessageToRomaji } = createAtomWithHook(false, "ConvertMessageToRomaji");
-// export const { atomInstance: Atom_ConvertMessageToHiragana, useHook: useStore_ConvertMessageToHiragana } = createAtomWithHook(false, "ConvertMessageToHiragana");
// Hotkeys
@@ -380,16 +239,6 @@ export const { atomInstance: Atom_LoadedPlugins, useHook: useStore_LoadedPlugins
export const { atomInstance: Atom_SavedPluginsStatus, useHook: useStore_SavedPluginsStatus } = createAtomWithHook([], "SavedPluginsStatus");
export const { atomInstance: Atom_PluginsData, useHook: useStore_PluginsData } = createAtomWithHook([], "PluginsData");
-// Advanced Settings
-// export const { atomInstance: Atom_OscIpAddress, useHook: useStore_OscIpAddress } = createAtomWithHook("127.0.0.1", "OscIpAddress");
-// export const { atomInstance: Atom_OscPort, useHook: useStore_OscPort } = createAtomWithHook("9000", "OscPort");
-
-// export const { atomInstance: Atom_EnableWebsocket, useHook: useStore_EnableWebsocket } = createAtomWithHook(true, "EnableWebsocket");
-// export const { atomInstance: Atom_WebsocketHost, useHook: useStore_WebsocketHost } = createAtomWithHook("127.0.0.1", "WebsocketHost");
-// export const { atomInstance: Atom_WebsocketPort, useHook: useStore_WebsocketPort } = createAtomWithHook("2231", "WebsocketPort");
-
-
-
// Supporters
export const { atomInstance: Atom_SupportersData, useHook: useStore_SupportersData } = createAtomWithHook(null, "SupportersData", {is_state_ok: true});