Merge branch 'overlay_only_translation' into for_webui
This commit is contained in:
@@ -9,7 +9,7 @@ deepl == 1.15.0
|
|||||||
flashtext ==2.7
|
flashtext ==2.7
|
||||||
pyinstaller==6.10.0
|
pyinstaller==6.10.0
|
||||||
numpy==1.26.4
|
numpy==1.26.4
|
||||||
sentencepiece==0.1.99
|
sentencepiece==0.2.0
|
||||||
openvr==1.26.701
|
openvr==1.26.701
|
||||||
pydub==0.25.1
|
pydub==0.25.1
|
||||||
psutil==5.9.8
|
psutil==5.9.8
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ deepl == 1.15.0
|
|||||||
flashtext ==2.7
|
flashtext ==2.7
|
||||||
pyinstaller==6.10.0
|
pyinstaller==6.10.0
|
||||||
numpy==1.26.4
|
numpy==1.26.4
|
||||||
sentencepiece==0.1.99
|
sentencepiece==0.2.0
|
||||||
openvr==1.26.701
|
openvr==1.26.701
|
||||||
pydub==0.25.1
|
pydub==0.25.1
|
||||||
psutil==5.9.8
|
psutil==5.9.8
|
||||||
|
|||||||
@@ -810,6 +810,17 @@ class Config:
|
|||||||
self._OVERLAY_LARGE_LOG_SETTINGS[key] = float(value)
|
self._OVERLAY_LARGE_LOG_SETTINGS[key] = float(value)
|
||||||
self.saveConfig(inspect.currentframe().f_code.co_name, self.OVERLAY_LARGE_LOG_SETTINGS)
|
self.saveConfig(inspect.currentframe().f_code.co_name, self.OVERLAY_LARGE_LOG_SETTINGS)
|
||||||
|
|
||||||
|
@property
|
||||||
|
@json_serializable('OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE')
|
||||||
|
def OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE(self):
|
||||||
|
return self._OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE
|
||||||
|
|
||||||
|
@OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE.setter
|
||||||
|
def OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE(self, value):
|
||||||
|
if isinstance(value, bool):
|
||||||
|
self._OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE = value
|
||||||
|
self.saveConfig(inspect.currentframe().f_code.co_name, value)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@json_serializable('SEND_MESSAGE_TO_VRC')
|
@json_serializable('SEND_MESSAGE_TO_VRC')
|
||||||
def SEND_MESSAGE_TO_VRC(self):
|
def SEND_MESSAGE_TO_VRC(self):
|
||||||
@@ -1108,6 +1119,7 @@ class Config:
|
|||||||
"ui_scaling": 1.0,
|
"ui_scaling": 1.0,
|
||||||
"tracker": "LeftHand",
|
"tracker": "LeftHand",
|
||||||
}
|
}
|
||||||
|
self._OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE = False
|
||||||
self._SEND_MESSAGE_TO_VRC = True
|
self._SEND_MESSAGE_TO_VRC = True
|
||||||
self._SEND_RECEIVED_MESSAGE_TO_VRC = False
|
self._SEND_RECEIVED_MESSAGE_TO_VRC = False
|
||||||
self._LOGGER_FEATURE = False
|
self._LOGGER_FEATURE = False
|
||||||
|
|||||||
@@ -251,7 +251,10 @@ class Controller:
|
|||||||
model.logger.info(f"[SENT] {message}{translation}")
|
model.logger.info(f"[SENT] {message}{translation}")
|
||||||
|
|
||||||
if config.OVERLAY_LARGE_LOG is True and model.overlay.initialized is True:
|
if config.OVERLAY_LARGE_LOG is True and model.overlay.initialized is True:
|
||||||
overlay_image = model.createOverlayImageLargeLog("send", message, translation[0] if len(translation) > 0 else "")
|
if config.OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE is True and len(translation) > 0:
|
||||||
|
overlay_image = model.createOverlayImageLargeLog("send", translation[0], "")
|
||||||
|
else:
|
||||||
|
overlay_image = model.createOverlayImageLargeLog("send", message, translation[0] if len(translation) > 0 else "")
|
||||||
model.updateOverlayLargeLog(overlay_image)
|
model.updateOverlayLargeLog(overlay_image)
|
||||||
|
|
||||||
def speakerMessage(self, message) -> None:
|
def speakerMessage(self, message) -> None:
|
||||||
@@ -290,12 +293,18 @@ class Controller:
|
|||||||
|
|
||||||
if config.ENABLE_TRANSCRIPTION_RECEIVE is True:
|
if config.ENABLE_TRANSCRIPTION_RECEIVE is True:
|
||||||
if config.OVERLAY_SMALL_LOG is True and model.overlay.initialized is True:
|
if config.OVERLAY_SMALL_LOG is True and model.overlay.initialized is True:
|
||||||
|
if config.OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE is True and len(translation) > 0:
|
||||||
|
overlay_image = model.createOverlayImageSmallLog(translation[0], "")
|
||||||
|
else:
|
||||||
overlay_image = model.createOverlayImageSmallLog(message, translation[0] if len(translation) > 0 else "")
|
overlay_image = model.createOverlayImageSmallLog(message, translation[0] if len(translation) > 0 else "")
|
||||||
model.updateOverlaySmallLog(overlay_image)
|
model.updateOverlaySmallLog(overlay_image)
|
||||||
|
|
||||||
if config.OVERLAY_LARGE_LOG is True and model.overlay.initialized is True:
|
if config.OVERLAY_LARGE_LOG is True and model.overlay.initialized is True:
|
||||||
|
if config.OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE is True and len(translation) > 0:
|
||||||
|
overlay_image = model.createOverlayImageLargeLog("receive", translation[0], "")
|
||||||
|
else:
|
||||||
overlay_image = model.createOverlayImageLargeLog("receive", message, translation[0] if len(translation) > 0 else "")
|
overlay_image = model.createOverlayImageLargeLog("receive", message, translation[0] if len(translation) > 0 else "")
|
||||||
model.updateOverlayLargeLog(overlay_image)
|
model.updateOverlayLargeLog(overlay_image)
|
||||||
|
|
||||||
if config.SEND_RECEIVED_MESSAGE_TO_VRC is True:
|
if config.SEND_RECEIVED_MESSAGE_TO_VRC is True:
|
||||||
osc_message = self.messageFormatter("RECEIVED", translation, [message])
|
osc_message = self.messageFormatter("RECEIVED", translation, [message])
|
||||||
@@ -361,7 +370,10 @@ class Controller:
|
|||||||
model.oscSendMessage(osc_message)
|
model.oscSendMessage(osc_message)
|
||||||
|
|
||||||
if config.OVERLAY_LARGE_LOG is True:
|
if config.OVERLAY_LARGE_LOG is True:
|
||||||
overlay_image = model.createOverlayImageLargeLog("send", message, translation[0] if len(translation) > 0 else "")
|
if config.OVERLAY_SHOW_ONLY_TRANSLATED_MESSAGE is True and len(translation) > 0:
|
||||||
|
overlay_image = model.createOverlayImageLargeLog("send", translation[0], "")
|
||||||
|
else:
|
||||||
|
overlay_image = model.createOverlayImageLargeLog("send", message, translation[0] if len(translation) > 0 else "")
|
||||||
model.updateOverlayLargeLog(overlay_image)
|
model.updateOverlayLargeLog(overlay_image)
|
||||||
|
|
||||||
# update textbox message log (Sent)
|
# update textbox message log (Sent)
|
||||||
|
|||||||
Reference in New Issue
Block a user