espnet.nets.st_interface.STInterface
Less than 1 minute
espnet.nets.st_interface.STInterface
class espnet.nets.st_interface.STInterface
Bases: ASRInterface
ST Interface for ESPnet model implementation.
NOTE: This class is inherited from ASRInterface to enable joint translation and recognition when performing multi-task learning with the ASR task.
translate(x, trans_args, char_list=None, rnnlm=None, ensemble_models=[])
Recognize x for evaluation.
- Parameters:
- x (ndarray) – input acouctic feature (B, T, D) or (T, D)
- trans_args (namespace) – argment namespace contraining options
- char_list (list) – list of characters
- rnnlm (torch.nn.Module) – language model module
- Returns: N-best decoding results
- Return type: list
translate_batch(x, trans_args, char_list=None, rnnlm=None)
Beam search implementation for batch.
- Parameters:
- x (torch.Tensor) – encoder hidden state sequences (B, Tmax, Henc)
- trans_args (namespace) – argument namespace containing options
- char_list (list) – list of characters
- rnnlm (torch.nn.Module) – language model module
- Returns: N-best decoding results
- Return type: list