CUCTCDecoder¶
- class torchaudio.models.decoder.CUCTCDecoder[source]¶
DEPRECATED
Warning
This class is deprecated from version 2.8. It will be removed in the 2.9 release. This deprecation is part of a large refactoring effort to transition TorchAudio into a maintenance phase. Please see https://github.com/pytorch/audio/issues/3902 for more information.
CUDA CTC beam search decoder.
- Note:
To build the decoder, please use the factory function
cuda_ctc_decoder()
.
- Tutorials using
CUCTCDecoder
:
Methods¶
__call__¶
- CUCTCDecoder.__call__(log_prob: Tensor, encoder_out_lens: Tensor)[source]¶
- Parameters
log_prob (torch.FloatTensor) – GPU tensor of shape (batch, frame, num_tokens) storing sequences of probability distribution over labels; log_softmax(output of acoustic model).
lengths (dpython:type torch.python:int32) – GPU tensor of shape (batch, ) storing the valid length of in time axis of the output Tensor in each batch.
- Returns
List of sorted best hypotheses for each audio sequence in the batch.
- Return type
List[List[CUCTCHypothesis]]
Support Structures¶
CUCTCHypothesis¶
- class torchaudio.models.decoder.CUCTCHypothesis(tokens: List[int], words: List[str], score: float)[source]¶
DEPRECATED
Warning
This class is deprecated from version 2.8. It will be removed in the 2.9 release. This deprecation is part of a large refactoring effort to transition TorchAudio into a maintenance phase. Please see https://github.com/pytorch/audio/issues/3902 for more information.
Represents hypothesis generated by CUCTC beam search decoder
CUCTCDecoder
.- Tutorials using
CUCTCHypothesis
:
- Tutorials using