class_docstr: Test suite for `apply_effects_file` function
class_docstr_tok: ["Test","suite","for","`","apply_effects_file","`","function"]
docstr: `apply_effects_file` should return identical data as sox command
docstr_tok: ["`","apply_effects_file","`","should","return","identical","data","as","sox","command"]
code: def test_apply_effects_str(self, args):
      """`apply_effects_file` should return identical data as sox command"""
      dtype = "int32"
      channels_first = True
      effects = args["effects"]
      num_channels = args.get("num_channels", 2)
      input_sr = args.get("input_sample_rate", 8000)
      output_sr = args.get("output_sample_rate")
  
      input_path = self.get_temp_path("input.wav")
      reference_path = self.get_temp_path("reference.wav")
      data = get_wav_data(
          dtype, num_channels, channels_first=channels_first
      )
      save_wav(
          input_path, data, input_sr, channels_first=channels_first
      )
      sox_utils.run_sox_effect(
          input_path,
          reference_path,
          effects,
          output_sample_rate=output_sr,
      )
  
      expected, expected_sr = load_wav(reference_path)
      found, sr = sox_effects.apply_effects_file(
          input_path,
          effects,
          normalize=False,
          channels_first=channels_first,
      )
  
      assert sr == expected_sr
      self.assertEqual(found, expected)
  
imports: import itertools
  from pathlib import Path
  from parameterized import parameterized
  from torchaudio import sox_effects
  from torchaudio_unittest.common_utils import get_sinusoid, get_wav_data, load_wav, PytorchTestCase, save_wav, skipIfNoSox, sox_utils, TempDirMixin
  from .common import load_params, name_func
label_desc: Use image node_id 2 for calling the TestSoxEffectsFile obj's underlying member method code with example usage: obj.test_apply_effects_str(args) without return types