👍️[Update] Model : add detect repeat message function

- detectRepeatSendMessage
- detectRepeatReceiveMessage
This commit is contained in:
misyaguziya
2024-04-15 22:06:00 +09:00
parent 0a80ba4e0d
commit 46fae4da0c
2 changed files with 21 additions and 1 deletions

View File

@@ -69,6 +69,8 @@ def sendMicMessage(message):
if model.checkKeywords(message):
view.printToTextbox_DetectedByWordFilter(detected_message=message)
return
elif model.detectRepeatSendMessage(message):
return
elif config.ENABLE_TRANSLATION is False:
pass
else:
@@ -134,7 +136,9 @@ def stopThreadingTranscriptionSendMessageOnOpenConfigWindow():
def receiveSpeakerMessage(message):
if len(message) > 0:
translation = ""
if config.ENABLE_TRANSLATION is False:
if model.detectRepeatReceiveMessage(message):
return
elif config.ENABLE_TRANSLATION is False:
pass
else:
translation, success = model.getOutputTranslate(message)