"vscode:/vscode.git/clone" did not exist on "3e9f991d6acd7efd90f04f1f530b837a40c93442"
Unverified Commit 0bd91484 authored by Bhargav Kathivarapu's avatar Bhargav Kathivarapu Committed by GitHub
Browse files

Clean up migrated Kaldi compliance test files (#703)



* kaldi compliance files cleanup for spec, fbank, mfcc

* kaldi compliance tests removal for spec, fbank, mfcc
Signed-off-by: default avatarBhargav Kathivarapu <bhargavkathivarapu31@gmail.com>
parent f1ed19ad
{"blackman_coeff": 0.0063, "energy_floor": 3.0323, "frame_length": 0.625, "frame_shift": 0.0625, "high_freq": 5842, "htk_compat": false, "low_freq": 3240, "num_mel_bins": 4, "preemphasis_coefficient": 0.29, "raw_energy": true, "remove_dc_offset": false, "round_to_power_of_two": true, "snip_edges": true, "subtract_mean": true, "use_energy": true, "num_ceps": 2, "cepstral_lifter": 73.5792, "vtln_high": 5749, "vtln_low": 4449, "vtln_warp": 1.0, "window_type": "blackman", "dither": 0.0}
{"blackman_coeff": 0.013, "energy_floor": 1.8509, "frame_length": 1.1875, "frame_shift": 0.625, "high_freq": 7999, "htk_compat": false, "low_freq": 4330, "num_mel_bins": 5, "preemphasis_coefficient": 0.38, "raw_energy": true, "remove_dc_offset": false, "round_to_power_of_two": true, "snip_edges": false, "subtract_mean": false, "use_energy": true, "num_ceps": 3, "cepstral_lifter": 8.1048, "vtln_high": 7497, "vtln_low": 7397, "vtln_warp": 1.0, "window_type": "blackman", "dither": 0.0}
{"blackman_coeff": 0.0487, "energy_floor": 1.3641, "frame_length": 1.0, "frame_shift": 0.8125, "high_freq": 7892, "htk_compat": true, "low_freq": 1904, "num_mel_bins": 8, "preemphasis_coefficient": 0.26, "raw_energy": true, "remove_dc_offset": true, "round_to_power_of_two": true, "snip_edges": false, "subtract_mean": false, "use_energy": false, "num_ceps": 5, "cepstral_lifter": 34.0918, "vtln_high": 4400, "vtln_low": 2737, "vtln_warp": 1.0, "window_type": "rectangular", "dither": 0.0}
{"blackman_coeff": 0.0577, "energy_floor": 2.4313, "frame_length": 1.0625, "frame_shift": 0.875, "high_freq": 2922, "htk_compat": true, "low_freq": 274, "num_mel_bins": 6, "preemphasis_coefficient": 0.48, "raw_energy": false, "remove_dc_offset": false, "round_to_power_of_two": true, "snip_edges": true, "subtract_mean": false, "use_energy": true, "num_ceps": 5, "cepstral_lifter": 21.3007, "vtln_high": 1352, "vtln_low": 280, "vtln_warp": 1.0, "window_type": "hanning", "dither": 0.0}
......@@ -69,13 +68,11 @@
{"blackman_coeff": 2.9211, "energy_floor": 4.144, "frame_length": 0.75, "frame_shift": 0.375, "high_freq": 7210, "htk_compat": true, "low_freq": 3666, "num_mel_bins": 4, "preemphasis_coefficient": 0.93, "raw_energy": false, "remove_dc_offset": false, "round_to_power_of_two": true, "snip_edges": true, "subtract_mean": false, "use_energy": false, "num_ceps": 4, "cepstral_lifter": 94.5907, "vtln_high": 6682, "vtln_low": 4979, "vtln_warp": 1.0, "window_type": "hamming", "dither": 0.0}
{"blackman_coeff": 2.9464, "energy_floor": 0.6798, "frame_length": 1.125, "frame_shift": 0.0625, "high_freq": 4445, "htk_compat": true, "low_freq": 323, "num_mel_bins": 6, "preemphasis_coefficient": 0.46, "raw_energy": false, "remove_dc_offset": true, "round_to_power_of_two": true, "snip_edges": false, "subtract_mean": true, "use_energy": false, "num_ceps": 6, "cepstral_lifter": 7.8133, "vtln_high": 3755, "vtln_low": 1137, "vtln_warp": 1.0, "window_type": "hanning", "dither": 0.0}
{"blackman_coeff": 2.9633, "energy_floor": 1.9565, "frame_length": 0.875, "frame_shift": 0.0625, "high_freq": 6835, "htk_compat": false, "low_freq": 649, "num_mel_bins": 5, "preemphasis_coefficient": 0.77, "raw_energy": false, "remove_dc_offset": false, "round_to_power_of_two": false, "snip_edges": true, "subtract_mean": false, "use_energy": false, "num_ceps": 2, "cepstral_lifter": 80.8871, "vtln_high": 6691, "vtln_low": 6581, "vtln_warp": 1.0, "window_type": "povey", "dither": 0.0}
{"blackman_coeff": 2.9643, "energy_floor": 3.8883, "frame_length": 0.75, "frame_shift": 0.25, "high_freq": 7373, "htk_compat": false, "low_freq": 1698, "num_mel_bins": 4, "preemphasis_coefficient": 0.92, "raw_energy": false, "remove_dc_offset": false, "round_to_power_of_two": true, "snip_edges": false, "subtract_mean": true, "use_energy": true, "num_ceps": 4, "cepstral_lifter": 63.3036, "vtln_high": 6650, "vtln_low": 5500, "vtln_warp": 1.0, "window_type": "povey", "dither": 0.0}
{"blackman_coeff": 2.9697, "energy_floor": 2.0241, "frame_length": 1.125, "frame_shift": 0.6875, "high_freq": 2170, "htk_compat": false, "low_freq": 180, "num_mel_bins": 5, "preemphasis_coefficient": 0.28, "raw_energy": false, "remove_dc_offset": true, "round_to_power_of_two": true, "snip_edges": true, "subtract_mean": true, "use_energy": true, "num_ceps": 3, "cepstral_lifter": 95.8111, "vtln_high": 1266, "vtln_low": 521, "vtln_warp": 1.0, "window_type": "blackman", "dither": 0.0}
{"blackman_coeff": 3.0358, "energy_floor": 1.7295, "frame_length": 1.1875, "frame_shift": 1.0, "high_freq": 7222, "htk_compat": true, "low_freq": 858, "num_mel_bins": 4, "preemphasis_coefficient": 0.16, "raw_energy": false, "remove_dc_offset": true, "round_to_power_of_two": true, "snip_edges": false, "subtract_mean": false, "use_energy": true, "num_ceps": 4, "cepstral_lifter": 64.7537, "vtln_high": 6220, "vtln_low": 5229, "vtln_warp": 1.0, "window_type": "povey", "dither": 0.0}
{"blackman_coeff": 3.0421, "energy_floor": 3.3343, "frame_length": 1.0, "frame_shift": 0.9375, "high_freq": 6477, "htk_compat": false, "low_freq": 1402, "num_mel_bins": 5, "preemphasis_coefficient": 0.99, "raw_energy": false, "remove_dc_offset": true, "round_to_power_of_two": true, "snip_edges": true, "subtract_mean": true, "use_energy": true, "num_ceps": 4, "cepstral_lifter": 26.1743, "vtln_high": 6381, "vtln_low": 5017, "vtln_warp": 1.0, "window_type": "hamming", "dither": 0.0}
{"blackman_coeff": 3.0919, "energy_floor": 4.5103, "frame_length": 0.625, "frame_shift": 1.0, "high_freq": 5323, "htk_compat": true, "low_freq": 937, "num_mel_bins": 5, "preemphasis_coefficient": 0.95, "raw_energy": false, "remove_dc_offset": false, "round_to_power_of_two": true, "snip_edges": true, "subtract_mean": true, "use_energy": false, "num_ceps": 5, "cepstral_lifter": 82.2405, "vtln_high": 5130, "vtln_low": 5086, "vtln_warp": 1.0, "window_type": "hanning", "dither": 0.0}
{"blackman_coeff": 3.1463, "energy_floor": 4.5068, "frame_length": 0.6875, "frame_shift": 0.3125, "high_freq": 7587, "htk_compat": true, "low_freq": 3542, "num_mel_bins": 7, "preemphasis_coefficient": 0.78, "raw_energy": true, "remove_dc_offset": false, "round_to_power_of_two": true, "snip_edges": true, "subtract_mean": true, "use_energy": true, "num_ceps": 4, "cepstral_lifter": 28.5808, "vtln_high": 7478, "vtln_low": 7326, "vtln_warp": 1.0, "window_type": "blackman", "dither": 0.0}
{"blackman_coeff": 3.2007, "energy_floor": 1.3677, "frame_length": 1.125, "frame_shift": 0.1875, "high_freq": 4726, "htk_compat": true, "low_freq": 2027, "num_mel_bins": 4, "preemphasis_coefficient": 0.74, "raw_energy": false, "remove_dc_offset": true, "round_to_power_of_two": false, "snip_edges": false, "subtract_mean": true, "use_energy": false, "num_ceps": 4, "cepstral_lifter": 3.5732, "vtln_high": 4583, "vtln_low": 3742, "vtln_warp": 1.0, "window_type": "povey", "dither": 0.0}
{"blackman_coeff": 3.2416, "energy_floor": 1.0604, "frame_length": 0.875, "frame_shift": 0.5, "high_freq": 4730, "htk_compat": false, "low_freq": 968, "num_mel_bins": 4, "preemphasis_coefficient": 0.11, "raw_energy": true, "remove_dc_offset": true, "round_to_power_of_two": true, "snip_edges": false, "subtract_mean": true, "use_energy": true, "num_ceps": 3, "cepstral_lifter": 60.5751, "vtln_high": 3542, "vtln_low": 1943, "vtln_warp": 1.0, "window_type": "blackman", "dither": 0.0}
{"blackman_coeff": 3.2698, "energy_floor": 3.0361, "frame_length": 1.0625, "frame_shift": 0.75, "high_freq": 4870, "htk_compat": true, "low_freq": 1281, "num_mel_bins": 7, "preemphasis_coefficient": 0.64, "raw_energy": false, "remove_dc_offset": true, "round_to_power_of_two": true, "snip_edges": false, "subtract_mean": true, "use_energy": true, "num_ceps": 3, "cepstral_lifter": 28.536, "vtln_high": 4401, "vtln_low": 3315, "vtln_warp": 1.0, "window_type": "blackman", "dither": 0.0}
{"blackman_coeff": 3.3078, "energy_floor": 4.9217, "frame_length": 1.0, "frame_shift": 0.3125, "high_freq": 6758, "htk_compat": true, "low_freq": 760, "num_mel_bins": 5, "preemphasis_coefficient": 0.98, "raw_energy": true, "remove_dc_offset": true, "round_to_power_of_two": true, "snip_edges": true, "subtract_mean": false, "use_energy": true, "num_ceps": 3, "cepstral_lifter": 97.4694, "vtln_high": 6022, "vtln_low": 5650, "vtln_warp": 1.0, "window_type": "rectangular", "dither": 0.0}
......
......@@ -158,92 +158,6 @@ class Test_Kaldi(unittest.TestCase):
self._print_diagnostic(output, kaldi_output)
torch.testing.assert_allclose(output, kaldi_output, atol=atol, rtol=rtol)
@unittest.skipIf("sox" not in BACKENDS, "sox not available")
@AudioBackendScope("sox")
def test_spectrogram(self):
def get_output_fn(sound, args):
output = kaldi.spectrogram(
sound,
blackman_coeff=args[1],
dither=args[2],
energy_floor=args[3],
frame_length=args[4],
frame_shift=args[5],
preemphasis_coefficient=args[6],
raw_energy=args[7],
remove_dc_offset=args[8],
round_to_power_of_two=args[9],
snip_edges=args[10],
subtract_mean=args[11],
window_type=args[12])
return output
self._compliance_test_helper(self.test_filepath, 'spec', 131, 13, get_output_fn, atol=1e-3, rtol=0)
@unittest.skipIf("sox" not in BACKENDS, "sox not available")
@AudioBackendScope("sox")
def test_fbank(self):
def get_output_fn(sound, args):
output = kaldi.fbank(
sound,
blackman_coeff=args[1],
dither=0.0,
energy_floor=args[2],
frame_length=args[3],
frame_shift=args[4],
high_freq=args[5],
htk_compat=args[6],
low_freq=args[7],
num_mel_bins=args[8],
preemphasis_coefficient=args[9],
raw_energy=args[10],
remove_dc_offset=args[11],
round_to_power_of_two=args[12],
snip_edges=args[13],
subtract_mean=args[14],
use_energy=args[15],
use_log_fbank=args[16],
use_power=args[17],
vtln_high=args[18],
vtln_low=args[19],
vtln_warp=args[20],
window_type=args[21])
return output
self._compliance_test_helper(self.test_filepath, 'fbank', 97, 22, get_output_fn, atol=1e-3, rtol=1e-1)
@unittest.skipIf("sox" not in BACKENDS, "sox not available")
@AudioBackendScope("sox")
def test_mfcc(self):
def get_output_fn(sound, args):
output = kaldi.mfcc(
sound,
blackman_coeff=args[1],
dither=0.0,
energy_floor=args[2],
frame_length=args[3],
frame_shift=args[4],
high_freq=args[5],
htk_compat=args[6],
low_freq=args[7],
num_mel_bins=args[8],
preemphasis_coefficient=args[9],
raw_energy=args[10],
remove_dc_offset=args[11],
round_to_power_of_two=args[12],
snip_edges=args[13],
subtract_mean=args[14],
use_energy=args[15],
num_ceps=args[16],
cepstral_lifter=args[17],
vtln_high=args[18],
vtln_low=args[19],
vtln_warp=args[20],
window_type=args[21])
return output
self._compliance_test_helper(self.test_filepath, 'mfcc', 145, 22, get_output_fn, atol=1e-3)
def test_mfcc_empty(self):
# Passing in an empty tensor should result in an error
self.assertRaises(AssertionError, kaldi.mfcc, torch.empty(0))
......
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