|
1 | 1 | import math |
2 | 2 | import os |
3 | | -import test.common_utils |
4 | | -import test.compliance.utils |
| 3 | +import common_utils |
| 4 | +import compliance.utils |
5 | 5 | import torch |
6 | 6 | import torchaudio |
7 | 7 | import torchaudio.compliance.kaldi as kaldi |
@@ -45,11 +45,11 @@ def first_sample_of_frame(frame, window_size, window_shift, snip_edges): |
45 | 45 |
|
46 | 46 |
|
47 | 47 | class Test_Kaldi(unittest.TestCase): |
48 | | - test_dirpath, test_dir = test.common_utils.create_temp_assets_dir() |
| 48 | + test_dirpath, test_dir = common_utils.create_temp_assets_dir() |
49 | 49 | test_filepath = os.path.join(test_dirpath, 'assets', 'kaldi_file.wav') |
50 | 50 | test_8000_filepath = os.path.join(test_dirpath, 'assets', 'kaldi_file_8000.wav') |
51 | 51 | kaldi_output_dir = os.path.join(test_dirpath, 'assets', 'kaldi') |
52 | | - test_filepaths = {prefix: [] for prefix in test.compliance.utils.TEST_PREFIX} |
| 52 | + test_filepaths = {prefix: [] for prefix in compliance.utils.TEST_PREFIX} |
53 | 53 |
|
54 | 54 | # separating test files by their types (e.g 'spec', 'fbank', etc.) |
55 | 55 | for f in os.listdir(kaldi_output_dir): |
@@ -151,7 +151,7 @@ def _compliance_test_helper(self, sound_filepath, filepath_key, expected_num_fil |
151 | 151 | args = f.split('-') |
152 | 152 | args[-1] = os.path.splitext(args[-1])[0] |
153 | 153 | assert len(args) == expected_num_args, 'invalid test kaldi file name' |
154 | | - args = [test.compliance.utils.parse(arg) for arg in args] |
| 154 | + args = [compliance.utils.parse(arg) for arg in args] |
155 | 155 |
|
156 | 156 | output = get_output_fn(sound, args) |
157 | 157 |
|
|
0 commit comments