class_docstr: Spectum extraction test.
code: def test_spectrum(self):
      wav_path = str(Path(PACKAGE_OPS_DIR).joinpath("data/sm1_cln.wav"))
  
      with self.cached_session(use_gpu=False, force_gpu=False):
          read_wav = ReadWav.params().instantiate()
          input_data, sample_rate = read_wav(wav_path)
  
          spectrum = Spectrum.params(
              {
                  "window_length": 0.025,
                  "snip_edges": True,
                  "dither": 0.0,
              }
          ).instantiate()
          spectrum_test = spectrum(input_data, sample_rate)
  
          output_true = np.array(
              [
                  [9.819611, 2.84503, 3.660894, 2.7779, 1.212233],
                  [9.328745, 2.553949, 3.276319, 3.000918, 2.499342],
              ]
          )
  
          self.assertEqual(tf.rank(spectrum_test).eval(), 2)
          self.assertAllClose(
              spectrum_test.eval()[0:2, 0:5],
              output_true,
              rtol=1e-05,
              atol=1e-05,
          )
  
file_path: delta/delta/data/frontend/spectrum_test.py
imports: import os
  import numpy
  from pathlib import Path
  import delta.compat
  from core.ops import PACKAGE_OPS_DIR
  from delta.data.frontend.read_wav import ReadWav
  from delta.data.frontend.spectrum import Spectrum
label_desc: Use image node_id 1 for calling the SpectrumTest obj's underlying member method code with example usage: obj.test_spectrum() without return types