CUCTCDecoder¶
- class torchaudio.models.decoder.CUCTCDecoder[source]¶
CUDA CTC beam search decoder.
Note
To build the decoder, please use the factory function
cuda_ctc_decoder()
.- Tutorials using
CUCTCDecoder
: ASR Inference with CUDA CTC Decoder
ASR Inference with CUDA CTC Decoder
- Tutorials using
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]¶
Represents hypothesis generated by CUCTC beam search decoder
CUCTCDecoder
.- Tutorials using
CUCTCHypothesis
: ASR Inference with CUDA CTC Decoder
ASR Inference with CUDA CTC Decoder
- Tutorials using