espnet.nets.pytorch_backend.transducer.utils.is_prefix
Less than 1 minute
espnet.nets.pytorch_backend.transducer.utils.is_prefix
espnet.nets.pytorch_backend.transducer.utils.is_prefix(x: List[int], pref: List[int]) → bool
Check if pref is a prefix of x.
- Parameters:
- x – Label ID sequence.
- pref – Prefix label ID sequence.
- Returns: Whether pref is a prefix of x.