more accuracy decoding somthing

pull/2128/head
Hui Zhang 2 years ago
parent 0cf62b9f91
commit 98eed53e6d

@ -86,7 +86,6 @@ class OnlineCTCEndpoint:
Args: Args:
ctc_log_probs (np.ndarray): (T, D) ctc_log_probs (np.ndarray): (T, D)
decoding_something (bool): contain nonsilince.
Returns: Returns:
bool: whether endpoint detected. bool: whether endpoint detected.
@ -103,6 +102,7 @@ class OnlineCTCEndpoint:
assert self.num_frames_decoded >= self.trailing_silence_frames assert self.num_frames_decoded >= self.trailing_silence_frames
assert self.frame_shift_in_ms > 0 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 utterance_length = self.num_frames_decoded * self.frame_shift_in_ms
trailing_silence = self.trailing_silence_frames * self.frame_shift_in_ms trailing_silence = self.trailing_silence_frames * self.frame_shift_in_ms

Loading…
Cancel
Save