docstr: Test waveforms generated from oscillator_bank.
  
  Generates harmonic waveforms with tensorflow and numpy and tests that they
  are the same. Test over a range of inputs provided by the parameterized
  inputs.
  
  Args:
    batch_size: Size of the batch to synthesize.
    fundamental_frequency: Base frequency of the oscillator in Hertz.
    n_harmonics: Number of harmonics to synthesize.
    sample_rate: Sample rate of synthesis in samples per a second.
    seconds: Length of the generated test sample in seconds.
docstr_tok: ["Test","waveforms","generated","from","oscillator_bank",".","Generates","harmonic","waveforms","with","tensorflow","and","numpy","and","tests","that","they","are","the","same",".","Test","over","a","range","of","inputs","provided","by","the","parameterized","inputs",".","Args",":","batch_size",":","Size","of","the","batch","to","synthesize",".","fundamental_frequency",":","Base","frequency","of","the","oscillator","in","Hertz",".","n_harmonics",":","Number","of","harmonics","to","synthesize",".","sample_rate",":","Sample","rate","of","synthesis","in","samples","per","a","second",".","seconds",":","Length","of","the","generated","test","sample","in","seconds","."]
code: def test_oscillator_bank_is_accurate(
      self,
      batch_size,
      fundamental_frequency,
      n_harmonics,
      sample_rate,
      seconds,
  ):
      """Test waveforms generated from oscillator_bank.
  
      Generates harmonic waveforms with tensorflow and numpy and tests that they
      are the same. Test over a range of inputs provided by the parameterized
      inputs.
  
      Args:
        batch_size: Size of the batch to synthesize.
        fundamental_frequency: Base frequency of the oscillator in Hertz.
        n_harmonics: Number of harmonics to synthesize.
        sample_rate: Sample rate of synthesis in samples per a second.
        seconds: Length of the generated test sample in seconds.
      """
      n_samples = int(sample_rate * seconds)
      seconds = float(n_samples) / sample_rate
      frequencies = fundamental_frequency * np.arange(
          1, n_harmonics + 1
      )
      amplitudes = 1.0 / n_harmonics * np.ones_like(frequencies)
  
      # Create tensors of frequencies and amplitudes for tf function.
      ones = np.ones([batch_size, n_samples, n_harmonics])
      frequency_envelopes = (
          ones * frequencies[np.newaxis, np.newaxis, :]
      )
      amplitude_envelopes = ones * amplitudes[np.newaxis, np.newaxis, :]
  
      # Create np test signal.
      wav_np = create_wave_np(
          batch_size,
          frequency_envelopes,
          amplitude_envelopes,
          seconds,
          n_samples,
      )
  
      wav_tf = core.oscillator_bank(
          frequency_envelopes,
          amplitude_envelopes,
          sample_rate=sample_rate,
      )
      pad = 10  # Ignore edge effects.
      self.assertAllClose(wav_np[pad:-pad], wav_tf[pad:-pad])
  
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 2 for calling the HarmonicSynthTest obj's underlying member method code with example usage: obj.test_oscillator_bank_is_accurate(batch_size, fundamental_frequency, n_harmonics, sample_rate, seconds) without return types