|
|
@ -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
|
|
|
|
|
|
|
|
|
|
|
|