docstr: Tests that no freqencies above nyquist (sample_rate/2) are created.
docstr_tok: ["Tests","that","no","freqencies","above","nyquist","(","sample_rate\/2",")","are","created","."]
code: def test_silent_above_nyquist(self, sample_rate):
      """Tests that no freqencies above nyquist (sample_rate/2) are created."""
      nyquist = sample_rate / 2
      frequencies = np.array([1.1, 1.5, 2.0]) * nyquist
      amplitudes = np.ones_like(frequencies)
  
      # Create tensors of frequencies and amplitudes for tf function.
      ones = np.ones([self.batch_size, self.n_samples, 3])
      frequency_envelopes = (
          ones * frequencies[np.newaxis, np.newaxis, :]
      )
      amplitude_envelopes = ones * amplitudes[np.newaxis, np.newaxis, :]
  
      wav_tf = core.oscillator_bank(
          frequency_envelopes,
          amplitude_envelopes,
          sample_rate=sample_rate,
      )
      wav_np = np.zeros_like(wav_tf)
      self.assertAllClose(wav_np, wav_tf)
  
imports: from absl.testing import parameterized
  from ddsp import core
  import librosa
  import numpy
  from scipy import signal
  import tensorflow.compat.v2
label_desc: Use image node_id 4 for calling the HarmonicSynthTest obj's underlying member method code with example usage: obj.test_silent_above_nyquist(sample_rate) without return types