Skip to content

Commit

Permalink
don't use compression_ratio to blacklist result
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Apr 28, 2024
1 parent 282a615 commit 1ff79b7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions voice2text_deltabot/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,7 @@ def on_newmsg(bot: Bot, accid: int, event: NewMsgEvent) -> None:
segments, info = MODEL.transcribe(msg.file)
lines = []
for seg in segments:
if (
seg.avg_logprob < -0.7
or seg.no_speech_prob > 0.5
or seg.compression_ratio < 0.9
):
if seg.avg_logprob < -0.7 or seg.no_speech_prob > 0.5:
continue
text = seg.text.strip()
if text.strip("."):
Expand Down

0 comments on commit 1ff79b7

Please sign in to comment.