docstr: Generate a 1 sec sweep waveform as a test input.
docstr_tok: ["Generate","a","1","sec","sweep","waveform","as","a","test","input","."]
code: def MakeTestWaveform(self):  # self is unused.
      """Generate a 1 sec sweep waveform as a test input."""
      sample_rate = 16000.0
      duration = 0.975  # Exactly 96 frames at 25 ms / 10 ms.
      start_freq = 400.0
      end_freq = 1600.0
  
      times = np.arange(0, duration, 1 / sample_rate)
      # Exponential frequency sweep.
      frequencies = start_freq * np.exp(
          times / duration * np.log(end_freq / start_freq)
      )
      delta_phases = frequencies * 1 / sample_rate * 2 * np.pi
      phases = np.cumsum(delta_phases)
      # Raised cosine envelope.
      envelope = 0.5 * (1.0 - np.cos(2 * np.pi * times / duration))
      # Final test waveform.
      return envelope * np.cos(phases)
  
imports: import tempfile
  from magenta.models.onsets_frames_transcription import melspec_input
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the MelspecInputTest obj's underlying member method code with example usage: obj.MakeTestWaveform() and returns: unknown