espnet2.asr_transducer.utils.TooShortUttError
Less than 1 minute
espnet2.asr_transducer.utils.TooShortUttError
class espnet2.asr_transducer.utils.TooShortUttError(message: str, actual_size: int, limit: int)
Bases: Exception
Raised when the utterance is too short for subsampling.
This exception is thrown to indicate that the size of the input utterance does not meet the minimum requirement for the specified subsampling factor.
actual_size
The size of the input that failed the subsampling check.
- Type: int
limit
The minimum size limit required for the subsampling.
Type: int
Parameters:
- message (str) – Error message to display.
- actual_size (int) – The size that cannot pass the subsampling.
- limit (int) – The size limit for subsampling.
Examples
>>> raise TooShortUttError("Input size too short", 2, 3)
Traceback (most recent call last):
...
TooShortUttError: Input size too short
Construct a TooShortUttError module.