🚧 [WIP/TEST] Model : Overlayの処理を逐次処理から定期処理に変更

This commit is contained in:
misyaguziya
2024-05-02 14:57:45 +09:00
parent 3aa39bd1ee
commit ee8c25dea9
4 changed files with 259 additions and 41 deletions

View File

@@ -164,11 +164,10 @@ def receiveSpeakerMessage(message):
if config.ENABLE_OVERLAY_SMALL_LOG is True:
if model.overlay.initialized is False:
model.startOverlay()
if model.overlay.initialized is True:
overlay_image = model.createOverlayImageShort(message, translation)
model.updateOverlay(overlay_image)
# overlay_image = model.createOverlayImageLong("receive", message, translation)
# model.updateOverlay(overlay_image)
overlay_image = model.createOverlayImageShort(message, translation)
model.updateOverlay(overlay_image)
# overlay_image = model.createOverlayImageLong("receive", message, translation)
# model.updateOverlay(overlay_image)
# ------------Speaker2Chatbox------------
if config.ENABLE_SPEAKER2CHATBOX is True:
@@ -191,6 +190,7 @@ def startTranscriptionReceiveMessage():
def stopTranscriptionReceiveMessage():
model.stopSpeakerTranscript()
model.shutdownOverlay()
view.setMainWindowAllWidgetsStatusToNormal()
def startThreadingTranscriptionReceiveMessage():
@@ -874,11 +874,8 @@ def callbackSetEnableOverlaySmallLog(value):
print("callbackSetEnableOverlaySmallLog", value)
config.ENABLE_OVERLAY_SMALL_LOG = value
if config.ENABLE_OVERLAY_SMALL_LOG is True:
pass
else:
if model.overlay.initialized is True:
model.clearOverlayImage()
if config.ENABLE_OVERLAY_SMALL_LOG is False:
model.clearOverlayImage()
def callbackSetOverlaySmallLogSettings(value, set_type:str):
print("callbackSetOverlaySmallLogSettings", value, set_type)