@@ -44,8 +44,6 @@ def _run_kaldi(command, input_type, input_value):
4444
4545
4646class Kaldi (common_utils .TestBaseMixin ):
47- backend = 'sox'
48-
4947 def assert_equal (self , output , * , expected , rtol = None , atol = None ):
5048 expected = expected .to (dtype = self .dtype , device = self .device )
5149 self .assertEqual (output , expected , rtol = rtol , atol = atol )
@@ -71,7 +69,7 @@ def test_sliding_window_cmn(self):
7169 def test_fbank (self , kwargs ):
7270 """fbank should be numerically compatible with compute-fbank-feats"""
7371 wave_file = common_utils .get_asset_path ('kaldi_file.wav' )
74- waveform = torchaudio .load_wav (wave_file )[0 ].to (dtype = self .dtype , device = self .device )
72+ waveform = common_utils .load_wav (wave_file )[0 ].to (dtype = self .dtype , device = self .device )
7573 result = torchaudio .compliance .kaldi .fbank (waveform , ** kwargs )
7674 command = ['compute-fbank-feats' ] + _convert_args (** kwargs ) + ['scp:-' , 'ark:-' ]
7775 kaldi_result = _run_kaldi (command , 'scp' , wave_file )
@@ -82,7 +80,7 @@ def test_fbank(self, kwargs):
8280 def test_spectrogram (self , kwargs ):
8381 """spectrogram should be numerically compatible with compute-spectrogram-feats"""
8482 wave_file = common_utils .get_asset_path ('kaldi_file.wav' )
85- waveform = torchaudio .load_wav (wave_file )[0 ].to (dtype = self .dtype , device = self .device )
83+ waveform = common_utils .load_wav (wave_file )[0 ].to (dtype = self .dtype , device = self .device )
8684 result = torchaudio .compliance .kaldi .spectrogram (waveform , ** kwargs )
8785 command = ['compute-spectrogram-feats' ] + _convert_args (** kwargs ) + ['scp:-' , 'ark:-' ]
8886 kaldi_result = _run_kaldi (command , 'scp' , wave_file )
@@ -93,7 +91,7 @@ def test_spectrogram(self, kwargs):
9391 def test_mfcc (self , kwargs ):
9492 """mfcc should be numerically compatible with compute-mfcc-feats"""
9593 wave_file = common_utils .get_asset_path ('kaldi_file.wav' )
96- waveform = torchaudio .load_wav (wave_file )[0 ].to (dtype = self .dtype , device = self .device )
94+ waveform = common_utils .load_wav (wave_file )[0 ].to (dtype = self .dtype , device = self .device )
9795 result = torchaudio .compliance .kaldi .mfcc (waveform , ** kwargs )
9896 command = ['compute-mfcc-feats' ] + _convert_args (** kwargs ) + ['scp:-' , 'ark:-' ]
9997 kaldi_result = _run_kaldi (command , 'scp' , wave_file )
0 commit comments