Skip to content

Commit

Permalink
Update filtering to remove "Calling on..."
Browse files Browse the repository at this point in the history
  • Loading branch information
McCloudS authored Nov 18, 2024
1 parent d10908c commit da41f82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def transcription_worker():
for _ in range(concurrent_transcriptions):
threading.Thread(target=transcription_worker, daemon=True).start()

# Define a filter class
# Define a filter class to hide common logging we don't want to see
class MultiplePatternsFilter(logging.Filter):
def filter(self, record):
# Define the patterns to search for
Expand All @@ -127,6 +127,7 @@ def filter(self, record):
"misdetection possible",
"srt was added",
"doesn't have any audio to transcribe",
"Calling on_"
]
# Return False if any of the patterns are found, True otherwise
return not any(pattern in record.getMessage() for pattern in patterns)
Expand Down

0 comments on commit da41f82

Please sign in to comment.