Loading scripts/prepare_combined_format_inputs.py +92 −88 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import numpy as np from pyaudio3dtools import audiofile, audioarray def main(): FS = [48, 32, 16] # scripts/testv/ path Loading Loading @@ -137,3 +138,6 @@ for fs in FS: # info print. helps setting up .gitignore if len(wrote_files) > 0: print('New files written: {}'.format('\n'.join(wrote_files))) if __name__ == "__main__": main() No newline at end of file scripts/self_test.py +15 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,8 @@ import multiprocessing import tempfile import urllib.parse import shutil import prepare_combined_format_inputs import errno BW_TO_SR = {"nb": 8, "wb": 16, "swb": 32, "fb": 48} Loading Loading @@ -993,6 +995,18 @@ class SelfTest(IvasScriptsCommon.IvasScript): {oc: list(map(self.test_for_file, dec_cmd))} ) # check if we need to produce missing combined formats if not os.path.exists(in_file): if is_osba_or_omasa: self.logger.info("Creating missing combined formats test vectors...") prepare_combined_format_inputs.main() if not os.path.exists(in_file): self.logger.error(f"Test vector {in_file} does not exist!") raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), in_file) else: self.logger.error(f"Test vector {in_file} does not exist!") raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), in_file) # handle intermediate processing steps, e.g. networksimulator, eid-xor, ... in_file = bs_enc_file proc_cmds = [] Loading @@ -1008,7 +1022,7 @@ class SelfTest(IvasScriptsCommon.IvasScript): proc_cmd[0] = os.path.join(TOOLS_DIR, proc_cmd[0]) proc_cmd = [ "{in_file}" if x == in_file else self.test_for_file(x) for x in proc_cmd "{in_file}" if x == in_file else x for x in proc_cmd ] if mode[1]: for cmdline_arg in proc_cmd[1:]: Loading Loading
scripts/prepare_combined_format_inputs.py +92 −88 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import numpy as np from pyaudio3dtools import audiofile, audioarray def main(): FS = [48, 32, 16] # scripts/testv/ path Loading Loading @@ -137,3 +138,6 @@ for fs in FS: # info print. helps setting up .gitignore if len(wrote_files) > 0: print('New files written: {}'.format('\n'.join(wrote_files))) if __name__ == "__main__": main() No newline at end of file
scripts/self_test.py +15 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,8 @@ import multiprocessing import tempfile import urllib.parse import shutil import prepare_combined_format_inputs import errno BW_TO_SR = {"nb": 8, "wb": 16, "swb": 32, "fb": 48} Loading Loading @@ -993,6 +995,18 @@ class SelfTest(IvasScriptsCommon.IvasScript): {oc: list(map(self.test_for_file, dec_cmd))} ) # check if we need to produce missing combined formats if not os.path.exists(in_file): if is_osba_or_omasa: self.logger.info("Creating missing combined formats test vectors...") prepare_combined_format_inputs.main() if not os.path.exists(in_file): self.logger.error(f"Test vector {in_file} does not exist!") raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), in_file) else: self.logger.error(f"Test vector {in_file} does not exist!") raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), in_file) # handle intermediate processing steps, e.g. networksimulator, eid-xor, ... in_file = bs_enc_file proc_cmds = [] Loading @@ -1008,7 +1022,7 @@ class SelfTest(IvasScriptsCommon.IvasScript): proc_cmd[0] = os.path.join(TOOLS_DIR, proc_cmd[0]) proc_cmd = [ "{in_file}" if x == in_file else self.test_for_file(x) for x in proc_cmd "{in_file}" if x == in_file else x for x in proc_cmd ] if mode[1]: for cmdline_arg in proc_cmd[1:]: Loading