docstr: Ensure that compute_(loudness/power) can work on a batch.
docstr_tok: ["Ensure","that","compute_","(","loudness\/power",")","can","work","on","a","batch","."]
code: def test_batch_compute_db(self):
      """Ensure that compute_(loudness/power) can work on a batch."""
      batch_size = 2
      sample_rate = 16000
      audio_len_sec = 0.21
      padding = "same"
      audio_sin = gen_np_sinusoid(
          self.frequency, self.amp, sample_rate, audio_len_sec
      )
      expected_len = self.expected_db_length(
          audio_sin, sample_rate, padding
      )
      audio_batch = tf.tile(audio_sin[None, :], [batch_size, 1])
      loudness = spectral_ops.compute_loudness(
          audio_batch,
          sample_rate,
          self.frame_rate,
          self.frame_size,
          padding=padding,
      )
      power = spectral_ops.compute_power(
          audio_batch,
          sample_rate,
          self.frame_rate,
          self.frame_size,
          padding=padding,
      )
      self.assertLen(loudness.shape, 2)
      self.assertLen(power.shape, 2)
      self.assertEqual(batch_size, loudness.shape[0])
      self.assertEqual(batch_size, power.shape[0])
      self.assertEqual(expected_len, loudness.shape[1])
      self.assertEqual(expected_len, power.shape[1])
  
imports: from absl.testing import parameterized
  from ddsp import spectral_ops
  from ddsp.test_util import gen_np_sinusoid
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 5 for calling the ComputeFeaturesTest obj's underlying member method code with example usage: obj.test_batch_compute_db() without return types