From fbbf3189fc9f7e1cb34f00e0f4ccd2885bf3c8a4 Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Thu, 12 Sep 2024 13:20:37 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=91=8D=EF=B8=8F[Update]=20translators?= =?UTF-8?q?=20update=205.9.2=20->=205.9.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4f4a6213..ed147a66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,6 +14,6 @@ ctranslate2==4.1.0 faster-whisper==1.0.1 openvr==1.26.701 pydub==0.25.1 -translators @ git+https://github.com/misyaguziya/translators@5.9.2 +translators @ git+https://github.com/misyaguziya/translators@5.9.2.1 SpeechRecognition @ git+https://github.com/misyaguziya/custom_speech_recognition@3.10.4 tinyoscquery @ git+https://github.com/cyberkitsune/tinyoscquery@0.1.2 \ No newline at end of file From 437d9eb64497af3e64de4d657e0893fbe5484ee7 Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Thu, 12 Sep 2024 13:29:13 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F[remove]=20Model=20:?= =?UTF-8?q?=20XSOverlay=20=E3=81=AE=E6=A9=9F=E8=83=BD=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 12 ------ controller.py | 7 +-- model.py | 4 -- models/xsoverlay/notification.py | 73 -------------------------------- 4 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 models/xsoverlay/notification.py diff --git a/config.py b/config.py index 30964d58..687307a9 100644 --- a/config.py +++ b/config.py @@ -769,17 +769,6 @@ class Config: self._SEND_MESSAGE_BUTTON_TYPE = value saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value) - @property - @json_serializable('ENABLE_NOTICE_XSOVERLAY') - def ENABLE_NOTICE_XSOVERLAY(self): - return self._ENABLE_NOTICE_XSOVERLAY - - @ENABLE_NOTICE_XSOVERLAY.setter - def ENABLE_NOTICE_XSOVERLAY(self, value): - if isinstance(value, bool): - self._ENABLE_NOTICE_XSOVERLAY = value - saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value) - @property @json_serializable('OVERLAY_SETTINGS') def OVERLAY_SETTINGS(self): @@ -1113,7 +1102,6 @@ class Config: self._ENABLE_AUTO_CLEAR_MESSAGE_BOX = True self._ENABLE_SEND_ONLY_TRANSLATED_MESSAGES = False self._SEND_MESSAGE_BUTTON_TYPE = "show" - self._ENABLE_NOTICE_XSOVERLAY = False self._OVERLAY_SETTINGS = { "opacity": 1.0, "ui_scaling": 1.0, diff --git a/controller.py b/controller.py index ec46dbbe..c68e24be 100644 --- a/controller.py +++ b/controller.py @@ -158,10 +158,6 @@ def receiveSpeakerMessage(message): changeToCTranslate2Process() if config.ENABLE_TRANSCRIPTION_RECEIVE is True: - if config.ENABLE_NOTICE_XSOVERLAY is True: - xsoverlay_message = messageFormatter("RECEIVED", translation, message) - model.notificationXSOverlay(xsoverlay_message) - if config.ENABLE_OVERLAY_SMALL_LOG is True: if model.overlay.initialized is True: overlay_image = model.createOverlayImageShort(message, translation) @@ -917,8 +913,7 @@ def callbackSetSendMessageButtonType(value): view.changeMainWindowSendMessageButton(config.SEND_MESSAGE_BUTTON_TYPE) def callbackSetEnableNoticeXsoverlay(value): - print("callbackSetEnableNoticeXsoverlay", value) - config.ENABLE_NOTICE_XSOVERLAY = value + pass def callbackSetEnableAutoExportMessageLogs(value): print("callbackSetEnableAutoExportMessageLogs", value) diff --git a/model.py b/model.py index dddb056f..b49db777 100644 --- a/model.py +++ b/model.py @@ -21,7 +21,6 @@ from models.osc.osc_tools import sendTyping, sendMessage, receiveOscParameters, from models.transcription.transcription_recorder import SelectedMicEnergyAndAudioRecorder, SelectedSpeakerEnergyAndAudioRecorder from models.transcription.transcription_recorder import SelectedMicEnergyRecorder, SelectedSpeakerEnergyRecorder from models.transcription.transcription_transcriber import AudioTranscriber -from models.xsoverlay.notification import xsoverlayForVRCT from models.translation.translation_languages import translation_lang from models.transcription.transcription_languages import transcription_lang from models.translation.translation_utils import checkCTranslate2Weight @@ -671,9 +670,6 @@ class Model: self.speaker_energy_recorder.stop() self.speaker_energy_recorder = None - def notificationXSOverlay(self, message): - xsoverlayForVRCT(content=f"{message}") - def createOverlayImageShort(self, message, translation): your_language = config.TARGET_LANGUAGE target_language = config.SOURCE_LANGUAGE diff --git a/models/xsoverlay/notification.py b/models/xsoverlay/notification.py deleted file mode 100644 index cb2c03b5..00000000 --- a/models/xsoverlay/notification.py +++ /dev/null @@ -1,73 +0,0 @@ -# ########################################################################################################################### -# DOCUMENT:https://xiexe.github.io/XSOverlayDocumentation/#/NotificationsAPI -# SOURCE:https://zenn.dev/eeharumt/scraps/95f49a62dd809a -# messageType: int = 0 # 1: ポップアップ通知, 2: メディアプレーヤー情報 -# index: int = 0 # メディアプレーヤーでのみ使用され、手首のアイコンを変更する -# timeout: float = 0.5 # 通知インジケータが表示され続ける時間[秒] -# height: float = 175 # 通知インジケータの高さ -# opacity: float = 1 # 通知インジケータの透明度。0.0-1.0の範囲で低いほど透明に -# volume: float = 0.7 # 通知音の大きさ -# audioPath: str = "" # 通知音ファイルのパス。規定音として"default", "error", "warning"を指定可能。空文字列で通知音なしにできる。 -# title: str = "" # 通知タイトル、リッチテキストフォーマットをサポート。 -# content: str = "" # 通知内容、リッチテキストフォーマットをサポート。省略することで小サイズ通知となる。 -# useBase64Icon: bool = False # TrueにすることでBase64の画像を表示する -# icon: str = "" # Base64画像イメージまたは画像ファイルパス。規定アイコンとして"default", "error", or "warning"を指定可能 -# sourceApp: str = "" # 通知したアプリ名(デバック用) -# ########################################################################################################################## - -import socket -import json -import base64 -from os import path as os_path - -def XSOverlay( - endpoint:tuple=("127.0.0.1", 42069), messageType:int=1, index:int=0, timeout:float=2, - height:float=120.0, opacity:float=1.0, volume:float=0.0, audioPath:str="", - title:str="", content:str="", useBase64Icon:bool=False, icon:str="default", sourceApp:str="" -) -> int: - - if icon in ["default", "error", "warning"]: - icon_data = icon - elif useBase64Icon: - try: - with open(icon, "rb") as f: - icon_data_bytes = f.read() - icon_data = base64.b64encode(icon_data_bytes).decode("utf-8") - except Exception: - icon_data = "default" - else: - icon_data = icon - - sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - - data_msg = { - "messageType": messageType, - "index": index, - "timeout":timeout, - "height": height, - "opacity": opacity, - "volume": volume, - "audioPath": audioPath, - "title": title, - "content": content, - "useBase64Icon": useBase64Icon, - "icon": icon_data, - "sourceApp": sourceApp, - } - msg_str = json.dumps(data_msg) - response = sock.sendto(msg_str.encode("utf-8"), endpoint) - sock.close() - return response - -def xsoverlayForVRCT(content:str="") -> int: - response = XSOverlay( - title="VRCT", - content=content, - useBase64Icon=True, - icon=os_path.join(os_path.dirname(__file__), "img", "xsoverlay2.png"), - sourceApp="VRCT" - ) - return response - -if __name__ == "__main__": - xsoverlayForVRCT(content="notification test") \ No newline at end of file From 72ed1963297238d3089bfd8de4551b540fe0f352 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:41:22 +0900 Subject: [PATCH 3/6] =?UTF-8?q?[Remove]=20XSOverlay=E5=BB=83=E6=AD=A2?= =?UTF-8?q?=E3=81=AB=E4=BC=B4=E3=81=84UI=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller.py | 4 ---- view.py | 6 ------ .../setting_box_vr/createSettingBox_Vr.py | 19 +------------------ 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/controller.py b/controller.py index c68e24be..57ee6779 100644 --- a/controller.py +++ b/controller.py @@ -912,9 +912,6 @@ def callbackSetSendMessageButtonType(value): config.SEND_MESSAGE_BUTTON_TYPE = value view.changeMainWindowSendMessageButton(config.SEND_MESSAGE_BUTTON_TYPE) -def callbackSetEnableNoticeXsoverlay(value): - pass - def callbackSetEnableAutoExportMessageLogs(value): print("callbackSetEnableAutoExportMessageLogs", value) config.ENABLE_LOGGER = value @@ -1162,7 +1159,6 @@ def createMainWindow(splash): "callback_set_enable_auto_clear_chatbox": callbackSetEnableAutoClearMessageBox, "callback_set_send_only_translated_messages": callbackSetEnableSendOnlyTranslatedMessages, "callback_set_send_message_button_type": callbackSetSendMessageButtonType, - "callback_set_enable_notice_xsoverlay": callbackSetEnableNoticeXsoverlay, "callback_set_enable_auto_export_message_logs": callbackSetEnableAutoExportMessageLogs, "callback_set_enable_vrc_mic_mute_sync": callbackSetEnableVrcMicMuteSync, "callback_set_enable_send_message_to_vrc": callbackSetEnableSendMessageToVrc, diff --git a/view.py b/view.py index 73332775..3c81c5fb 100644 --- a/view.py +++ b/view.py @@ -539,11 +539,6 @@ class View(): "show_and_disable_enter_key": StringVar(value=i18n.t("config_window.send_message_button_type.show_and_disable_enter_key")), }, - VAR_LABEL_ENABLE_NOTICE_XSOVERLAY=StringVar(value=i18n.t("config_window.notice_xsoverlay.label")), - VAR_DESC_ENABLE_NOTICE_XSOVERLAY=StringVar(value=i18n.t("config_window.notice_xsoverlay.desc")), - CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY=None, - VAR_ENABLE_NOTICE_XSOVERLAY=BooleanVar(value=config.ENABLE_NOTICE_XSOVERLAY), - VAR_LABEL_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=StringVar(value=i18n.t("config_window.auto_export_message_logs.label")), VAR_DESC_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=StringVar(value=i18n.t("config_window.auto_export_message_logs.desc")), CALLBACK_SET_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=None, @@ -804,7 +799,6 @@ class View(): self.view_variable.CALLBACK_SET_ENABLE_AUTO_CLEAR_MESSAGE_BOX=config_window_registers.get("callback_set_enable_auto_clear_chatbox", None) self.view_variable.CALLBACK_SET_ENABLE_SEND_ONLY_TRANSLATED_MESSAGES=config_window_registers.get("callback_set_send_only_translated_messages", None) self.view_variable.CALLBACK_SET_SEND_MESSAGE_BUTTON_TYPE=config_window_registers.get("callback_set_send_message_button_type", None) - self.view_variable.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY=config_window_registers.get("callback_set_enable_notice_xsoverlay", None) self.view_variable.CALLBACK_SET_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=config_window_registers.get("callback_set_enable_auto_export_message_logs", None) self.view_variable.CALLBACK_SET_ENABLE_VRC_MIC_MUTE_SYNC=config_window_registers.get("callback_set_enable_vrc_mic_mute_sync", None) diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_vr/createSettingBox_Vr.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_vr/createSettingBox_Vr.py index 8bb78264..d2902cec 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_vr/createSettingBox_Vr.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_vr/createSettingBox_Vr.py @@ -5,7 +5,6 @@ from .._SettingBoxGenerator import _SettingBoxGenerator def createSettingBox_Vr(setting_box_wrapper, config_window, settings, view_variable): sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable) createSettingBox_Overlay = sbg.createSettingBox_Overlay - createSettingBoxCheckbox = sbg.createSettingBoxCheckbox def switchEnableOverlayUiCallback(switch_widget): callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_OVERLAY_SMALL_LOG, switch_widget.get()) @@ -14,10 +13,6 @@ def createSettingBox_Vr(setting_box_wrapper, config_window, settings, view_varia callFunctionIfCallable(view_variable.CALLBACK_SET_OPEN_OVERLAY_SETTINGS_WINDOW) - def checkboxNoticeXsoverlayCallback(checkbox_box_widget): - callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY, checkbox_box_widget.get()) - - row=0 config_window.sb__enable_overlay_small_log = createSettingBox_Overlay( for_var_label_text=view_variable.VAR_LABEL_ENABLE_OVERLAY_SMALL_LOG, @@ -28,16 +23,4 @@ def createSettingBox_Vr(setting_box_wrapper, config_window, settings, view_varia for_var_button_label=view_variable.VAR_OPEN_OVERLAY_SETTINGS_BUTTON, label_button_clicked_command=buttonOpenOverlaySettingsWindow, ) - config_window.sb__enable_overlay_small_log.grid(row=row) - row+=1 - - - config_window.sb__notice_xsoverlay = createSettingBoxCheckbox( - for_var_label_text=view_variable.VAR_LABEL_ENABLE_NOTICE_XSOVERLAY, - for_var_desc_text=view_variable.VAR_DESC_ENABLE_NOTICE_XSOVERLAY, - checkbox_attr_name="sb__checkbox_notice_xsoverlay", - command=lambda: checkboxNoticeXsoverlayCallback(config_window.sb__checkbox_notice_xsoverlay), - variable=view_variable.VAR_ENABLE_NOTICE_XSOVERLAY, - ) - config_window.sb__notice_xsoverlay.grid(row=row, pady=0) - row+=1 \ No newline at end of file + config_window.sb__enable_overlay_small_log.grid(row=row, pady=0) \ No newline at end of file From 7d8ffaa15b6f0ff6fc82967b318713c664917883 Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Thu, 12 Sep 2024 14:00:20 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=91=8D=EF=B8=8F[Update]=20torch?= =?UTF-8?q?=E5=91=A8=E3=82=8A=E3=81=A7=E5=95=8F=E9=A1=8C=E3=81=8C=E7=99=BA?= =?UTF-8?q?=E7=94=9F=E3=81=97=E3=81=9F=E3=81=9F=E3=82=81=E3=80=81requireme?= =?UTF-8?q?nts=E3=82=92=E6=9C=80=E6=96=B0=E3=81=AE=E3=82=82=E3=81=AE?= =?UTF-8?q?=E3=81=AB=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index ed147a66..ba638258 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,12 +8,14 @@ pyyaml == 6.0.1 python-i18n == 0.3.9 CTkToolTip == 0.8 pyinstaller==6.2.0 -transformers[torch]==4.37.2 +torch==2.2.2 +transformers==4.37.2 sentencepiece==0.1.99 ctranslate2==4.1.0 -faster-whisper==1.0.1 +faster-whisper==1.0.3 openvr==1.26.701 pydub==0.25.1 +psutil==5.9.8 translators @ git+https://github.com/misyaguziya/translators@5.9.2.1 SpeechRecognition @ git+https://github.com/misyaguziya/custom_speech_recognition@3.10.4 tinyoscquery @ git+https://github.com/cyberkitsune/tinyoscquery@0.1.2 \ No newline at end of file From d47fcda6790463ac822c34961572a80cb2a2a24a Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Thu, 12 Sep 2024 14:13:21 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=91=8D=EF=B8=8F[Update]=20numpy=20?= =?UTF-8?q?=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index ba638258..e5b4bc5a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ pyyaml == 6.0.1 python-i18n == 0.3.9 CTkToolTip == 0.8 pyinstaller==6.2.0 +numpy==1.26.4 torch==2.2.2 transformers==4.37.2 sentencepiece==0.1.99 From c0029e7e624175dbbd144949c5d01fe4d22e62f2 Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Thu, 12 Sep 2024 14:14:43 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=91=8D=EF=B8=8F[Update]Version=202.2.?= =?UTF-8?q?6=20->=202.2.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index 687307a9..72470e3f 100644 --- a/config.py +++ b/config.py @@ -949,7 +949,7 @@ class Config: def init_config(self): # Read Only - self._VERSION = "2.2.6" + self._VERSION = "2.2.7" self._ENABLE_SPEAKER2CHATBOX = False # Speaker2Chatbox self._ENABLE_SPEAKER2CHATBOX_PASS_CONFIRMATION = "VRCT=0YEN" self._PATH_LOCAL = os_path.dirname(sys.argv[0])