code: def print_alignments(
      details_by_utterance,
      file=sys.stdout,
      empty_symbol="<eps>",
      separator=" ; ",
      print_header=True,
      sample_separator=None,
  ):
      """Print WER summary and alignments.
  
      Arguments
      ---------
      details_by_utterance : list
          List of wer details by utterance,
          see ``speechbrain.utils.edit_distance.wer_details_by_utterance``
          for format. Has to have alignments included.
      file : stream
          Where to write. (default: sys.stdout)
      empty_symbol : str
          Symbol to use when aligning to nothing.
      separator : str
          String that separates each token in the output. Note the spaces in the
          default.
      print_header: bool
          Whether to print headers
      sample_separator: str
          A separator to put between samples (optional)
      """
      if print_header:
          _print_alignments_global_header(
              file=file, empty_symbol=empty_symbol, separator=separator
          )
      for dets in details_by_utterance:
          if dets["scored"]:
              if print_header:
                  _print_alignment_header(dets, file=file)
              _print_alignment(
                  dets["alignment"],
                  dets["ref_tokens"],
                  dets["hyp_tokens"],
                  file=file,
                  empty_symbol=empty_symbol,
                  separator=separator,
              )
              if sample_separator:
                  print(sample_separator, file=file)
  
file_path: speechbrain/speechbrain/dataio/wer.py
imports: import sys
  from speechbrain.utils import edit_distance
label_desc: Use image node_id 2 for calling a global function with example usage: print_alignments(details_by_utterance, file, empty_symbol, separator, print_header, sample_separator) without return types