class_docstr: Computes audio samples and losses.
class_docstr_tok: ["Computes","audio","samples","and","losses","."]
code: def sample(self, batch, outputs, step):
      audio = batch["audio"]
      audio_gen = outputs["audio_gen"]
  
      audio_gen = np.array(audio_gen)
  
      # Add audio.
      summaries.audio_summary(
          audio_gen, step, self._sample_rate, name="audio_generated"
      )
      summaries.audio_summary(
          audio, step, self._sample_rate, name="audio_original"
      )
  
      # Add plots.
      summaries.waveform_summary(audio, audio_gen, step)
      summaries.spectrogram_summary(audio, audio_gen, step)
  
imports: import ddsp
  from ddsp.training import heuristics
  from ddsp.training import metrics
  from ddsp.training import summaries
  import gin
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 3 for calling the BasicEvaluator obj's underlying member method code with example usage: obj.sample(batch, outputs, step) without return types