Unverified Commit 32cd700a authored by moto's avatar moto Committed by GitHub
Browse files

Fix JSON Lines file extension (#1392)

parent 2a3d52ff
......@@ -43,7 +43,7 @@ class KaldiCPUOnly(TempDirMixin, TestBaseMixin):
expected = expected.to(dtype=self.dtype, device=self.device)
self.assertEqual(output, expected, rtol=rtol, atol=atol)
@parameterized.expand(load_params('kaldi_test_pitch_args.json'))
@parameterized.expand(load_params('kaldi_test_pitch_args.jsonl'))
@skipIfNoExec('compute-kaldi-pitch-feats')
def test_pitch_feats(self, kwargs):
"""compute_kaldi_pitch produces numerically compatible result with compute-kaldi-pitch-feats"""
......
......@@ -25,7 +25,7 @@ class SmokeTest(TempDirMixin, TorchaudioTestCase):
however without such tools, the correctness of each function cannot be verified.
"""
@parameterized.expand(
load_params("sox_effect_test_args.json"),
load_params("sox_effect_test_args.jsonl"),
name_func=lambda f, i, p: f'{f.__name__}_{i}_{p.args[0]["effects"][0][0]}',
)
def test_apply_effects_tensor(self, args):
......@@ -39,7 +39,7 @@ class SmokeTest(TempDirMixin, TorchaudioTestCase):
_found, _sr = sox_effects.apply_effects_tensor(original, input_sr, effects)
@parameterized.expand(
load_params("sox_effect_test_args.json"),
load_params("sox_effect_test_args.jsonl"),
name_func=lambda f, i, p: f'{f.__name__}_{i}_{p.args[0]["effects"][0][0]}',
)
def test_apply_effects_file(self, args):
......@@ -58,7 +58,7 @@ class SmokeTest(TempDirMixin, TorchaudioTestCase):
input_path, effects, normalize=False, channels_first=channels_first)
@parameterized.expand(
load_params("sox_effect_test_args.json"),
load_params("sox_effect_test_args.jsonl"),
name_func=lambda f, i, p: f'{f.__name__}_{i}_{p.args[0]["effects"][0][0]}',
)
def test_apply_effects_fileobj(self, args):
......
......@@ -64,7 +64,7 @@ class TestSoxEffectsTensor(TempDirMixin, PytorchTestCase):
self.assertEqual(expected, found)
@parameterized.expand(
load_params("sox_effect_test_args.json"),
load_params("sox_effect_test_args.jsonl"),
name_func=lambda f, i, p: f'{f.__name__}_{i}_{p.args[0]["effects"][0][0]}',
)
def test_apply_effects(self, args):
......@@ -113,7 +113,7 @@ class TestSoxEffectsFile(TempDirMixin, PytorchTestCase):
self.assertEqual(expected, found)
@parameterized.expand(
load_params("sox_effect_test_args.json"),
load_params("sox_effect_test_args.jsonl"),
name_func=lambda f, i, p: f'{f.__name__}_{i}_{p.args[0]["effects"][0][0]}',
)
def test_apply_effects_str(self, args):
......
......@@ -46,7 +46,7 @@ class SoxEffectFileTransform(torch.nn.Module):
@skipIfNoSox
class TestTorchScript(TempDirMixin, PytorchTestCase):
@parameterized.expand(
load_params("sox_effect_test_args.json"),
load_params("sox_effect_test_args.jsonl"),
name_func=lambda f, i, p: f'{f.__name__}_{i}_{p.args[0]["effects"][0][0]}',
)
def test_apply_effects_tensor(self, args):
......@@ -72,7 +72,7 @@ class TestTorchScript(TempDirMixin, PytorchTestCase):
self.assertEqual(expected, found)
@parameterized.expand(
load_params("sox_effect_test_args.json"),
load_params("sox_effect_test_args.jsonl"),
name_func=lambda f, i, p: f'{f.__name__}_{i}_{p.args[0]["effects"][0][0]}',
)
def test_apply_effects_file(self, args):
......
......@@ -21,7 +21,7 @@ class Kaldi(TempDirMixin, TestBaseMixin):
expected = expected.to(dtype=self.dtype, device=self.device)
self.assertEqual(output, expected, rtol=rtol, atol=atol)
@parameterized.expand(load_params('kaldi_test_fbank_args.json'))
@parameterized.expand(load_params('kaldi_test_fbank_args.jsonl'))
@skipIfNoExec('compute-fbank-feats')
def test_fbank(self, kwargs):
"""fbank should be numerically compatible with compute-fbank-feats"""
......@@ -32,7 +32,7 @@ class Kaldi(TempDirMixin, TestBaseMixin):
kaldi_result = run_kaldi(command, 'scp', wave_file)
self.assert_equal(result, expected=kaldi_result, rtol=1e-4, atol=1e-8)
@parameterized.expand(load_params('kaldi_test_spectrogram_args.json'))
@parameterized.expand(load_params('kaldi_test_spectrogram_args.jsonl'))
@skipIfNoExec('compute-spectrogram-feats')
def test_spectrogram(self, kwargs):
"""spectrogram should be numerically compatible with compute-spectrogram-feats"""
......@@ -43,7 +43,7 @@ class Kaldi(TempDirMixin, TestBaseMixin):
kaldi_result = run_kaldi(command, 'scp', wave_file)
self.assert_equal(result, expected=kaldi_result, rtol=1e-4, atol=1e-8)
@parameterized.expand(load_params('kaldi_test_mfcc_args.json'))
@parameterized.expand(load_params('kaldi_test_mfcc_args.jsonl'))
@skipIfNoExec('compute-mfcc-feats')
def test_mfcc(self, kwargs):
"""mfcc should be numerically compatible with compute-mfcc-feats"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment