code: def preview_word(
      waveform,
      spans,
      num_frames,
      transcript,
      sample_rate=bundle.sample_rate,
  ):
      ratio = waveform.size(1) / num_frames
      x0 = int(ratio * spans[0].start)
      x1 = int(ratio * spans[-1].end)
      print(
          f"{transcript} ({_score(spans):.2f}): {x0 / sample_rate:.3f} - {x1 / sample_rate:.3f} sec"
      )
      segment = waveform[:, x0:x1]
      return IPython.display.Audio(segment.numpy(), rate=sample_rate)
  
file_path: audio/examples/tutorials/forced_alignment_for_multilingual_data_tutorial.py
imports: import torch
  import torchaudio
  from typing import List
  import IPython
  import matplotlib.pyplot
  from torchaudio.pipelines import MMS_FA
label_desc: Use image node_id 4 for calling a global function with example usage: preview_word(waveform, spans, num_frames, transcript, sample_rate) and returns: IPython