class_docstr: CER and WER computation for Transducer model.
  
  Args:
      decoder: Decoder module.
      joint_network: Joint network module.
      token_list: Set of unique labels.
      sym_space: Space symbol.
      sym_blank: Blank symbol.
      report_cer: Whether to compute CER.
      report_wer: Whether to compute WER.
class_docstr_tok: ["CER","and","WER","computation","for","Transducer","model",".","Args",":","decoder",":","Decoder","module",".","joint_network",":","Joint","network","module",".","token_list",":","Set","of","unique","labels",".","sym_space",":","Space","symbol",".","sym_blank",":","Blank","symbol",".","report_cer",":","Whether","to","compute","CER",".","report_wer",":","Whether","to","compute","WER","."]
docstr: Convert label ID sequences to character.
  
  Args:
      hyps: Hypotheses sequences. (B, L)
      refs: References sequences. (B, L)
  
  Returns:
      char_hyps: Character list of hypotheses.
      char_hyps: Character list of references.
docstr_tok: ["Convert","label","ID","sequences","to","character",".","Args",":","hyps",":","Hypotheses","sequences",".","(","B",",","L",")","refs",":","References","sequences",".","(","B",",","L",")","Returns",":","char_hyps",":","Character","list","of","hypotheses",".","char_hyps",":","Character","list","of","references","."]
code: def convert_to_char(
      self, hyps: torch.Tensor, refs: torch.Tensor
  ) -> Tuple[List, List]:
      """Convert label ID sequences to character.
  
      Args:
          hyps: Hypotheses sequences. (B, L)
          refs: References sequences. (B, L)
  
      Returns:
          char_hyps: Character list of hypotheses.
          char_hyps: Character list of references.
  
      """
      char_hyps, char_refs = [], []
  
      for i, hyp in enumerate(hyps):
          hyp_i = [self.token_list[int(h)] for h in hyp]
          ref_i = [self.token_list[int(r)] for r in refs[i]]
  
          char_hyp = "".join(hyp_i).replace(self.space, " ")
          char_hyp = char_hyp.replace(self.blank, "")
          char_ref = "".join(ref_i).replace(self.space, " ")
  
          char_hyps.append(char_hyp)
          char_refs.append(char_ref)
  
      return char_hyps, char_refs
  
file_path: espnet/espnet/nets/pytorch_backend/transducer/error_calculator.py
imports: from typing import List, Tuple, Union
  import torch
  from espnet.nets.beam_search_transducer import BeamSearchTransducer
  from espnet.nets.pytorch_backend.transducer.custom_decoder import CustomDecoder
  from espnet.nets.pytorch_backend.transducer.joint_network import JointNetwork
  from espnet.nets.pytorch_backend.transducer.rnn_decoder import RNNDecoder
label_desc: Use image node_id 3 for calling the ErrorCalculator obj's underlying member method code with example usage: obj.convert_to_char(hyps, refs) and returns: char_hyps,  char_refs