From 98eed53e6d0a110a0677bb60137f65ab6b9b49b8 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Mon, 11 Jul 2022 02:29:22 +0000 Subject: [PATCH] more accuracy decoding somthing --- paddlespeech/server/engine/asr/online/ctc_endpoint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddlespeech/server/engine/asr/online/ctc_endpoint.py b/paddlespeech/server/engine/asr/online/ctc_endpoint.py index 2dba3641..06c1567d 100644 --- a/paddlespeech/server/engine/asr/online/ctc_endpoint.py +++ b/paddlespeech/server/engine/asr/online/ctc_endpoint.py @@ -86,7 +86,6 @@ class OnlineCTCEndpoint: Args: ctc_log_probs (np.ndarray): (T, D) - decoding_something (bool): contain nonsilince. Returns: bool: whether endpoint detected. @@ -102,7 +101,8 @@ class OnlineCTCEndpoint: assert self.num_frames_decoded >= self.trailing_silence_frames assert self.frame_shift_in_ms > 0 - + + decoding_something = (self.num_frames_decoded > self.trailing_silence_frames) and decoding_something utterance_length = self.num_frames_decoded * self.frame_shift_in_ms trailing_silence = self.trailing_silence_frames * self.frame_shift_in_ms -- GitLab