CUCTCDecoder¶
- class torchaudio.models.decoder.CUCTCDecoder[source]¶
CUDA CTC 束搜索解码器。
注意
要构建解码器,请使用工厂函数
cuda_ctc_decoder()
。- 使用
CUCTCDecoder
的教程
- 使用
方法¶
__call__¶
- CUCTCDecoder.__call__(log_prob: Tensor, encoder_out_lens: Tensor)[source]¶
- 参数:
log_prob (torch.FloatTensor) – 形状为 (batch, frame, num_tokens) 的 GPU tensor,存储标签概率分布序列;即 log_softmax(声学模型输出)。
lengths (dpython:type torch.python:int32) – 形状为 (batch, ) 的 GPU tensor,存储每个批次中输出 Tensor 在时间轴上的有效长度。
- 返回:
每个批次中各音频序列的排序最佳假设列表。
- 返回类型:
List[List[CUCTCHypothesis]]