Loading experiments/selection/P800-3/config/P800-3.yml 0 → 100644 +365 −0 Original line number Diff line number Diff line --- ################################################ # General configuration ################################################ name: P800-3 master_seed: 5 input_path: "experiments/selection/P800-3/proc_input" output_path: "experiments/selection/P800-3/proc_output" ################################################ ### Input configuration ################################################ input: fmt: "STEREO" ################################################ ### Pre-processing on individual items ################################################ preprocessing: mask: "20KBP" loudness: -26 window: 100 ################################################ ### Pre-processing on whole signal(s) ################################################ preprocessing_2: concatenate_input: true preamble: 10000 preamble_noise: true ################################################# ### Bitstream processing ################################################# ################################################ ### Configuration for conditions under test ################################################ conditions_to_generate: ### Reference and anchor conditions ########################## c01: type: ref c02: type: mnru q: 28 c03: type: mnru q: 23 c04: type: mnru q: 17 c05: type: mnru q: 12 c06: type: esdru alpha: 0.7 c07: type: esdru alpha: 0.4 c08: type: esdru alpha: 0.1 ### EVS condition ################################ c09: type: evs bitrates: - 7200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c10: type: evs bitrates: - 8000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c11: type: evs bitrates: - 9600 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c12: type: evs bitrates: - 13200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c13: type: evs bitrates: - 16400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c14: type: evs bitrates: - 24400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c15: type: evs bitrates: - 32000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c16: type: evs bitrates: - 7200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c17: type: evs bitrates: - 8000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c18: type: evs bitrates: - 9600 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c19: type: evs bitrates: - 13200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c20: type: evs bitrates: - 16400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c21: type: evs bitrates: - 24400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c22: type: evs bitrates: - 32000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 ### IVAS condition ############################### c23: type: ivas bitrates: - 13200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c24: type: ivas bitrates: - 16400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c25: type: ivas bitrates: - 24400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c26: type: ivas bitrates: - 32000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c27: type: ivas bitrates: - 48000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c28: type: ivas bitrates: - 13200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 c29: type: ivas bitrates: - 16400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 c30: type: ivas bitrates: - 24400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 c31: type: ivas bitrates: - 32000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 c32: type: ivas bitrates: - 48000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 c33: type: ivas bitrates: - 24400 cod: bin: ivas_processing_scripts/bin/IVAS_cod opts: ["-dtx"] dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c34: type: ivas bitrates: - 13200 cod: bin: ivas_processing_scripts/bin/IVAS_cod opts: ["-dtx"] dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 ################################################ ### Post-processing ################################################ postprocessing: fmt: "STEREO" fs: 48000 tests/constants.py +5 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ from pathlib import PurePath """ Set up paths """ TESTS_DIR = PurePath(__file__).parent TEST_VECTOR_DIR = TESTS_DIR.joinpath("data") EXPERIMENTS_DIR = "../experiments/selection" ISM_METADATA_DIR = TEST_VECTOR_DIR.joinpath("ism_metadata") MASA_METADATA_DIR = TEST_VECTOR_DIR.joinpath("masa") Loading Loading @@ -200,3 +201,7 @@ INPUT_CONFIG_FILES = [ str(TEST_VECTOR_DIR.joinpath("test_MC.yml")), str(TEST_VECTOR_DIR.joinpath("test_SBA.yml")), ] INPUT_EXPERIMENT_NAMES = [ "P800-3", ] tests/test_experiments.py 0 → 100644 +83 −0 Original line number Diff line number Diff line #!/usr/bin/env python3 # # (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other # contributors to this repository. All Rights Reserved. # # This software is protected by copyright law and by international treaties. # The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other # contributors to this repository retain full ownership rights in their respective contributions in # the software. This notice grants no license of any kind, including but not limited to patent # license, nor is any license granted by implication, estoppel or otherwise. # # Contributors are required to enter into the IVAS codec Public Collaboration agreement before making # contributions. # # This software is provided "AS IS", without any express or implied warranties. The software is in the # development stage. It is intended exclusively for experts who have experience with such software and # solely for the purpose of inspection. All implied warranties of non-infringement, merchantability # and fitness for a particular purpose are hereby disclaimed and excluded. # # Any dispute, controversy or claim arising under or in relation to providing this software shall be # submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. # import shutil from pathlib import Path import pytest from ivas_processing_scripts import main as generate_test from ivas_processing_scripts.processing.config import TestConfig from tests.constants import INPUT_EXPERIMENT_NAMES, EXPERIMENTS_DIR, TESTS_DIR from ivas_processing_scripts.audiotools import audio class Arguments: def __init__(self, config): self.config = config self.debug = True @pytest.mark.parametrize("exp_name", INPUT_EXPERIMENT_NAMES) def test_generate_test_items(exp_name): Dir = Path(TESTS_DIR).joinpath(EXPERIMENTS_DIR) cfg = Path(Dir).joinpath(Path(exp_name)).resolve().absolute() cfg = cfg.joinpath(f"config/{exp_name}.yml") args = Arguments(cfg) # read out input path config = TestConfig(cfg) input_path = Path(config.input_path).resolve().absolute() # deduce number of channels based on input format input_object = audio.fromtype(config.input["fmt"]) num_channels = input_object.num_channels # check if folder exists if not input_path.exists(): raise ValueError("Input path from experiments config does not exist") # copy items to folder -> pink noise and spectral test pink_noise = ( Path(f"./tests/data/pinknoise/pink_noise_{num_channels}ch_48kHz.wav") .resolve() .absolute() ) shutil.copy(pink_noise, input_path.joinpath(pink_noise.name)) spectral = ( Path(f"./tests/data/spectral/spectral_test_{num_channels}ch_48kHz.wav") .resolve() .absolute() ) shutil.copy(spectral, input_path.joinpath(spectral.name)) generate_test(args) Loading
experiments/selection/P800-3/config/P800-3.yml 0 → 100644 +365 −0 Original line number Diff line number Diff line --- ################################################ # General configuration ################################################ name: P800-3 master_seed: 5 input_path: "experiments/selection/P800-3/proc_input" output_path: "experiments/selection/P800-3/proc_output" ################################################ ### Input configuration ################################################ input: fmt: "STEREO" ################################################ ### Pre-processing on individual items ################################################ preprocessing: mask: "20KBP" loudness: -26 window: 100 ################################################ ### Pre-processing on whole signal(s) ################################################ preprocessing_2: concatenate_input: true preamble: 10000 preamble_noise: true ################################################# ### Bitstream processing ################################################# ################################################ ### Configuration for conditions under test ################################################ conditions_to_generate: ### Reference and anchor conditions ########################## c01: type: ref c02: type: mnru q: 28 c03: type: mnru q: 23 c04: type: mnru q: 17 c05: type: mnru q: 12 c06: type: esdru alpha: 0.7 c07: type: esdru alpha: 0.4 c08: type: esdru alpha: 0.1 ### EVS condition ################################ c09: type: evs bitrates: - 7200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c10: type: evs bitrates: - 8000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c11: type: evs bitrates: - 9600 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c12: type: evs bitrates: - 13200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c13: type: evs bitrates: - 16400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c14: type: evs bitrates: - 24400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c15: type: evs bitrates: - 32000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod c16: type: evs bitrates: - 7200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c17: type: evs bitrates: - 8000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c18: type: evs bitrates: - 9600 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c19: type: evs bitrates: - 13200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c20: type: evs bitrates: - 16400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c21: type: evs bitrates: - 24400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 c22: type: evs bitrates: - 32000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_cod tx: type: "FER" error_rate: 5 prerun_seed: 2 ### IVAS condition ############################### c23: type: ivas bitrates: - 13200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c24: type: ivas bitrates: - 16400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c25: type: ivas bitrates: - 24400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c26: type: ivas bitrates: - 32000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c27: type: ivas bitrates: - 48000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c28: type: ivas bitrates: - 13200 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 c29: type: ivas bitrates: - 16400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 c30: type: ivas bitrates: - 24400 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 c31: type: ivas bitrates: - 32000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 c32: type: ivas bitrates: - 48000 cod: bin: ivas_processing_scripts/bin/IVAS_cod dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 c33: type: ivas bitrates: - 24400 cod: bin: ivas_processing_scripts/bin/IVAS_cod opts: ["-dtx"] dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" c34: type: ivas bitrates: - 13200 cod: bin: ivas_processing_scripts/bin/IVAS_cod opts: ["-dtx"] dec: bin: ivas_processing_scripts/bin/IVAS_dec fmt: "STEREO" tx: type: "FER" error_rate: 5 prerun_seed: 2 ################################################ ### Post-processing ################################################ postprocessing: fmt: "STEREO" fs: 48000
tests/constants.py +5 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ from pathlib import PurePath """ Set up paths """ TESTS_DIR = PurePath(__file__).parent TEST_VECTOR_DIR = TESTS_DIR.joinpath("data") EXPERIMENTS_DIR = "../experiments/selection" ISM_METADATA_DIR = TEST_VECTOR_DIR.joinpath("ism_metadata") MASA_METADATA_DIR = TEST_VECTOR_DIR.joinpath("masa") Loading Loading @@ -200,3 +201,7 @@ INPUT_CONFIG_FILES = [ str(TEST_VECTOR_DIR.joinpath("test_MC.yml")), str(TEST_VECTOR_DIR.joinpath("test_SBA.yml")), ] INPUT_EXPERIMENT_NAMES = [ "P800-3", ]
tests/test_experiments.py 0 → 100644 +83 −0 Original line number Diff line number Diff line #!/usr/bin/env python3 # # (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other # contributors to this repository. All Rights Reserved. # # This software is protected by copyright law and by international treaties. # The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, # Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., # Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, # Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other # contributors to this repository retain full ownership rights in their respective contributions in # the software. This notice grants no license of any kind, including but not limited to patent # license, nor is any license granted by implication, estoppel or otherwise. # # Contributors are required to enter into the IVAS codec Public Collaboration agreement before making # contributions. # # This software is provided "AS IS", without any express or implied warranties. The software is in the # development stage. It is intended exclusively for experts who have experience with such software and # solely for the purpose of inspection. All implied warranties of non-infringement, merchantability # and fitness for a particular purpose are hereby disclaimed and excluded. # # Any dispute, controversy or claim arising under or in relation to providing this software shall be # submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. # import shutil from pathlib import Path import pytest from ivas_processing_scripts import main as generate_test from ivas_processing_scripts.processing.config import TestConfig from tests.constants import INPUT_EXPERIMENT_NAMES, EXPERIMENTS_DIR, TESTS_DIR from ivas_processing_scripts.audiotools import audio class Arguments: def __init__(self, config): self.config = config self.debug = True @pytest.mark.parametrize("exp_name", INPUT_EXPERIMENT_NAMES) def test_generate_test_items(exp_name): Dir = Path(TESTS_DIR).joinpath(EXPERIMENTS_DIR) cfg = Path(Dir).joinpath(Path(exp_name)).resolve().absolute() cfg = cfg.joinpath(f"config/{exp_name}.yml") args = Arguments(cfg) # read out input path config = TestConfig(cfg) input_path = Path(config.input_path).resolve().absolute() # deduce number of channels based on input format input_object = audio.fromtype(config.input["fmt"]) num_channels = input_object.num_channels # check if folder exists if not input_path.exists(): raise ValueError("Input path from experiments config does not exist") # copy items to folder -> pink noise and spectral test pink_noise = ( Path(f"./tests/data/pinknoise/pink_noise_{num_channels}ch_48kHz.wav") .resolve() .absolute() ) shutil.copy(pink_noise, input_path.joinpath(pink_noise.name)) spectral = ( Path(f"./tests/data/spectral/spectral_test_{num_channels}ch_48kHz.wav") .resolve() .absolute() ) shutil.copy(spectral, input_path.joinpath(spectral.name)) generate_test(args)