From 4a75fbba1cbd6c5d3a16790ee72f51f7b0c02dcd Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 15 May 2023 17:45:37 +0200 Subject: [PATCH 01/35] add wrapper for masaAnalyzer --- README.md | 2 +- .../audiotools/wrappers/masaAnalyzer.py | 114 ++++++++++++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py diff --git a/README.md b/README.md index 3a74688d..13638bfd 100755 --- a/README.md +++ b/README.md @@ -524,7 +524,7 @@ The following additional executables are needed for the different processing ste | Filtering, Resampling | filter | https://www.3gpp.org/ftp/tsg_sa/WG4_CODEC/TSGS4_76/docs/S4-131277.zip | | Random offset/seed generation (necessary for background noise and FER bitstream processing) | random | https://www.3gpp.org/ftp/tsg_sa/WG4_CODEC/TSGS4_76/docs/S4-131277.zip | | JBM network simulator | networkSimulator_g192 | https://www.3gpp.org/ftp/tsg_sa/WG4_CODEC/TSGS4_76/docs/S4-131277.zip | -| MASA rendering (also used in loudness measurement of MASA items) | masaRenderer | https://www.3gpp.org/ftp/TSG_SA/WG4_CODEC/TSGS4_122_Athens/Docs/S4-230221.zip | +| MASA rendering (also used in loudness measurement of MASA items) | masaRenderer, masaAnalyzer | https://www.3gpp.org/ftp/TSG_SA/WG4_CODEC/TSGS4_122_Athens/Docs/S4-230221.zip | | EVS reference conditions | EVS_cod, EVS_dec | https://www.3gpp.org/ftp/Specs/archive/26_series/26.443/26443-h00.zip | The necessary binaries have to be either placed in the [ivas_processing_scripts/bin](./ivas_processing_scripts/bin) folder or the path has to be specified in diff --git a/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py new file mode 100644 index 00000000..257b94df --- /dev/null +++ b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py @@ -0,0 +1,114 @@ + +#!/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. +# +from pathlib import Path +from tempfile import TemporaryDirectory + +from ivas_processing_scripts.audiotools import audio +from ivas_processing_scripts.audiotools.audiofile import read, write +from ivas_processing_scripts.audiotools.wrappers.filter import resample_itu +from ivas_processing_scripts.constants import DEFAULT_CONFIG_BINARIES +from ivas_processing_scripts.utils import find_binary, run + + +def masaAnalyzer( + sba: audio.SceneBasedAudio, + num_tcs: int, + num_dirs: int, + metadata_out_path: Path +) -> audio.MetadataAssistedSpatialAudio: + """ + Wrapper for masaAnalyzer (from MASA reference software) + + Parameters + ---------- + num_tcs: int + Number of MASA transport channels (1 - monoMASA, 2- stereoMASA) + num_dirs: int + Number of directions + metadata_out_path: + Path to output the Metadata file to + + Returns + ------- + masa: audio.MetadataAssistedSpatialAudio + generated MASA + """ + + if "masaAnalyzer" in DEFAULT_CONFIG_BINARIES["binary_paths"]: + binary = find_binary( + DEFAULT_CONFIG_BINARIES["binary_paths"]["masaAnalyzer"].name, + binary_path=DEFAULT_CONFIG_BINARIES["binary_paths"]["masaAnalyzer"].parent, + ) + else: + binary = find_binary("masaAnalyzer") + + if num_tcs not in [1, 2]: + raise ValueError(f"Only 1 or 2 TCs supported, but {num_tcs} was given.") + + if num_dirs not in [1, 2]: + raise ValueError(f"Only 1 or 2 directions supported, but {num_dirs} was given.") + + if sba.name not in ["FOA", "HOA2"]: + raise ValueError(f"Only FOA or HOA2 suported, but {sba.name} was given.") + + cmd = [ + str(binary), + "-mono" if num_tcs == 1 else "-stereo", + f"-{num_dirs}dir", + "-foa" if sba.name == "FOA" else "-hoa2", + "", # 4 -> inputPcm + "", # 5 -> outputPcm + "", # 6 -> output metadata file + ] + + with TemporaryDirectory() as tmp_dir: + tmp_dir = Path(tmp_dir) + tmp_in = tmp_dir.joinpath("tmp_masaAnaIn.pcm") + tmp_out_pcm = tmp_dir.joinpath("tmp_masaAnaOut.pcm") + + cmd[4] = str(tmp_in) + cmd[5] = str(tmp_out_pcm) + cmd[6] = str(metadata_out_path) + + tmp_audio = resample_itu(sba, 48000) + write(tmp_in, tmp_audio, 48000) + + # we need to run in the masaAnalyzer directory to use the .bin files it requires + print(cmd) + run(cmd, cwd=binary.resolve().parent) + + fmt = f"MASA{num_tcs}" + masa = audio.fromfile(fmt, tmp_out_pcm, 48000, [metadata_out_path]) + + return masa + -- GitLab From 9d2a29fc175cc7fd35c350a5a27b9ce10ed8c626 Mon Sep 17 00:00:00 2001 From: knj Date: Tue, 16 May 2023 13:43:50 +0200 Subject: [PATCH 02/35] make first minimal test config run for MASA P800-8 - only one IVAS condition tested currently --- .../selection/P800-8/config/P800-8.yml | 307 ++++++++++++++++++ .../audiotools/convert/__init__.py | 16 +- .../audiotools/convert/scenebased.py | 21 ++ .../audiotools/wrappers/masaRenderer.py | 2 +- ivas_processing_scripts/processing/chains.py | 15 + ivas_processing_scripts/processing/ivas.py | 2 +- 6 files changed, 359 insertions(+), 4 deletions(-) create mode 100644 experiments/selection/P800-8/config/P800-8.yml diff --git a/experiments/selection/P800-8/config/P800-8.yml b/experiments/selection/P800-8/config/P800-8.yml new file mode 100644 index 00000000..c6a8b986 --- /dev/null +++ b/experiments/selection/P800-8/config/P800-8.yml @@ -0,0 +1,307 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-8 +master_seed: 5 +prerun_seed: 2 +multiprocessing: false + +input_path: "experiments/selection/P800-8/proc_input" +output_path: "experiments/selection/P800-8/proc_output" + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + 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: 24 + # c04: + # type: mnru + # q: 20 + # c05: + # type: mnru + # q: 16 + # 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: + # opts: ["-max_band", "FB"] + # dec: + # c10: + # type: evs + # bitrates: + # - 8000 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # c11: + # type: evs + # bitrates: + # - 9600 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # c12: + # type: evs + # bitrates: + # - 13200 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # c13: + # type: evs + # bitrates: + # - 16400 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # c14: + # type: evs + # bitrates: + # - 24400 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # c15: + # type: evs + # bitrates: + # - 32000 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # c16: + # type: evs + # bitrates: + # - 7200 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # tx: + # type: "FER" + # error_rate: 5 + # c17: + # type: evs + # bitrates: + # - 8000 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # tx: + # type: "FER" + # error_rate: 5 + # c18: + # type: evs + # bitrates: + # - 9600 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # tx: + # type: "FER" + # error_rate: 5 + # c19: + # type: evs + # bitrates: + # - 13200 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # tx: + # type: "FER" + # error_rate: 5 + # c20: + # type: evs + # bitrates: + # - 16400 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # tx: + # type: "FER" + # error_rate: 5 + # c21: + # type: evs + # bitrates: + # - 24400 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # tx: + # type: "FER" + # error_rate: 5 + # c22: + # type: evs + # bitrates: + # - 32000 + # cod: + # opts: ["-max_band", "FB"] + # dec: + # tx: + # type: "FER" + # error_rate: 5 + + # ### IVAS condition ############################### + # c23: + # type: ivas + # bitrates: + # - 13200 + # cod: + # dec: + # fmt: "STEREO" + # c24: + # type: ivas + # bitrates: + # - 16400 + # cod: + # dec: + # fmt: "STEREO" + # c25: + # type: ivas + # bitrates: + # - 24400 + # cod: + # dec: + # fmt: "STEREO" + # c26: + # type: ivas + # bitrates: + # - 32000 + # cod: + # dec: + # fmt: "STEREO" + # c27: + # type: ivas + # bitrates: + # - 48000 + # cod: + # dec: + # fmt: "STEREO" + # c28: + # type: ivas + # bitrates: + # - 13200 + # cod: + # dec: + # fmt: "STEREO" + # tx: + # type: "FER" + # error_rate: 5 + # c29: + # type: ivas + # bitrates: + # - 16400 + # cod: + # dec: + # fmt: "STEREO" + # tx: + # type: "FER" + # error_rate: 5 + # c30: + # type: ivas + # bitrates: + # - 24400 + # cod: + # dec: + # fmt: "STEREO" + # tx: + # type: "FER" + # error_rate: 5 + # c31: + # type: ivas + # bitrates: + # - 32000 + # cod: + # dec: + # fmt: "STEREO" + # tx: + # type: "FER" + # error_rate: 5 + # c32: + # type: ivas + # bitrates: + # - 48000 + # cod: + # dec: + # fmt: "STEREO" + # tx: + # type: "FER" + # error_rate: 5 + + # c33: + # type: ivas + # bitrates: + # - 24400 + # cod: + # opts: ["-dtx"] + # dec: + # fmt: "STEREO" + + c34: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: "BINAURAL" + fs: 48000 + loudness: -26 diff --git a/ivas_processing_scripts/audiotools/convert/__init__.py b/ivas_processing_scripts/audiotools/convert/__init__.py index 2186f841..508acf2a 100755 --- a/ivas_processing_scripts/audiotools/convert/__init__.py +++ b/ivas_processing_scripts/audiotools/convert/__init__.py @@ -33,6 +33,7 @@ import logging from pathlib import Path, PurePath from typing import Optional, Union +from numpy import empty from ivas_processing_scripts.audiotools import audio, audioarray, metadata from ivas_processing_scripts.audiotools.audiofile import write @@ -72,6 +73,9 @@ def convert_file( if not isinstance(in_fmt, PurePath) and in_fmt.startswith("META"): input = metadata.Metadata(in_file) else: + if in_fmt.startswith("MASA") and in_meta is None: + # if no MD fileis provided, default to name (including .wav or .pcm!!!) + ".met" + in_meta = [in_file.parent / (in_file.name + ".met")] input = audio.fromfile(in_fmt, in_file, in_fs, in_meta) # try to set reasonable defaults if missing @@ -89,6 +93,14 @@ def convert_file( out_fmt = input.name output = audio.fromtype(out_fmt) + + if isinstance(output, audio.MetadataAssistedSpatialAudio): + # create dummy audio array to allow inference of MASA mode + num_tcs = int(output.name[-1]) + output.audio = empty((1, num_tcs)) + + # fabricate metadata file name + output.metadata_files = [Path(out_file).with_suffix(".met")] if isinstance(output, audio.ObjectBasedAudio): try: output.object_pos = input.object_pos @@ -291,8 +303,8 @@ def format_conversion( """Convert one audio format to another""" # validation - if isinstance(output, audio.MetadataAssistedSpatialAudio): - raise NotImplementedError("MASA is not supported as an output for rendering!") + if isinstance(output, audio.MetadataAssistedSpatialAudio) and not isinstance(input, audio.SceneBasedAudio): + raise NotImplementedError("Can only convert to MASA from SBA") if isinstance(output, audio.ObjectBasedAudio) and input.name != output.name: raise NotImplementedError( diff --git a/ivas_processing_scripts/audiotools/convert/scenebased.py b/ivas_processing_scripts/audiotools/convert/scenebased.py index ab22713d..e1fbe7cd 100755 --- a/ivas_processing_scripts/audiotools/convert/scenebased.py +++ b/ivas_processing_scripts/audiotools/convert/scenebased.py @@ -53,6 +53,7 @@ from ivas_processing_scripts.audiotools.convert.binaural import binaural_fftconv from ivas_processing_scripts.audiotools.EFAP import EFAP from ivas_processing_scripts.audiotools.rotation import Quat2RotMat, SHrotmatgen from ivas_processing_scripts.audiotools.wrappers.filter import resample_itu +from ivas_processing_scripts.audiotools.wrappers.masaAnalyzer import masaAnalyzer """ SceneBasedAudio functions """ @@ -75,6 +76,11 @@ def convert_scenebased( # SBA -> SBA elif isinstance(out, audio.SceneBasedAudio): render_sba_to_sba(sba, out) + + # SBA -> MASA + elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name == "FOA": + render_sba_to_masa(sba, out) + else: raise NotImplementedError( f"Conversion from {sba.name} to {out.name} is unsupported!" @@ -177,6 +183,21 @@ def render_sba_to_sba( zero_vert_channels(sba_out) +def render_sba_to_masa( + sba_in: audio.SceneBasedAudio, + masa_out: audio.MetadataAssistedSpatialAudio, +) -> None: + assert sba_in.name == "FOA" + + # two dir only possible from HOA2 + num_dirs = 1 + num_tcs = masa_out.audio.shape[1] + md_out_path = masa_out.metadata_files[0] + + masa = masaAnalyzer(sba_in, num_tcs, num_dirs, md_out_path) + masa_out.audio = masa.audio + + def rotate_sba( sba: audio.SceneBasedAudio, trajectory: str, diff --git a/ivas_processing_scripts/audiotools/wrappers/masaRenderer.py b/ivas_processing_scripts/audiotools/wrappers/masaRenderer.py index ed0c3013..f04bb9ae 100755 --- a/ivas_processing_scripts/audiotools/wrappers/masaRenderer.py +++ b/ivas_processing_scripts/audiotools/wrappers/masaRenderer.py @@ -87,7 +87,7 @@ def masaRenderer( str(binary), output_mode, "", # 2 -> inputPcm - str(masa.metadata_files.resolve()), + str(masa.metadata_file.resolve()), "", # 4 -> outputPcm ] diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 338b4e8e..7f8e9761 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -360,6 +360,21 @@ def get_processing_chain( else: preamble = 0 + # if the encoding format differs from the format after the preprocessing, add format conversion stuff + if tmp_in_fmt != cod_cfg["fmt"]: + chain["processes"].append( + Preprocessing( + { + "in_fs": tmp_in_fs, + "in_fmt": tmp_in_fmt, + "out_fs": tmp_in_fs, + "out_fmt": cod_cfg["fmt"], + "multiprocessing": cfg.multiprocessing, + } + ) + ) + tmp_in_fmt = cod_cfg["fmt"] + chain["processes"].append( IVAS( { diff --git a/ivas_processing_scripts/processing/ivas.py b/ivas_processing_scripts/processing/ivas.py index b2cae46b..72470bf6 100755 --- a/ivas_processing_scripts/processing/ivas.py +++ b/ivas_processing_scripts/processing/ivas.py @@ -278,7 +278,7 @@ class IVAS(Processing): if self.dec_opts: cmd.extend(self.dec_opts) - if self.out_fmt.name.startswith("ISM"): + if self.out_fmt.name.startswith("ISM") or self.out_fmt.name.startswith("MASA"): output_format = "EXT" elif self.in_fmt.name == "MONO": if self.out_fmt.name == "MONO": -- GitLab From 55afb266b9d69ca8ef8538207bc1460f1f7186ec Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 09:54:31 +0200 Subject: [PATCH 03/35] add multiple formats in postprocessing - allows pre-conversion to MASA for using masaRenderer --- .../selection/P800-8/config/P800-8.yml | 8 +++---- .../audiotools/convert/__init__.py | 16 +++++++++++--- .../audiotools/convert/scenebased.py | 2 +- ivas_processing_scripts/processing/chains.py | 21 ++++++++++++++++++- .../processing/processing.py | 20 +++++++++++++----- 5 files changed, 53 insertions(+), 14 deletions(-) diff --git a/experiments/selection/P800-8/config/P800-8.yml b/experiments/selection/P800-8/config/P800-8.yml index c6a8b986..3e94a8f8 100644 --- a/experiments/selection/P800-8/config/P800-8.yml +++ b/experiments/selection/P800-8/config/P800-8.yml @@ -185,9 +185,9 @@ conditions_to_generate: # cod: # opts: ["-max_band", "FB"] # dec: - # tx: - # type: "FER" - # error_rate: 5 + # tx: + # type: "FER" + # error_rate: 5 # ### IVAS condition ############################### # c23: @@ -302,6 +302,6 @@ conditions_to_generate: ### Post-processing ################################################ postprocessing: - fmt: "BINAURAL" + fmt: ["MASA2", "BINAURAL"] fs: 48000 loudness: -26 diff --git a/ivas_processing_scripts/audiotools/convert/__init__.py b/ivas_processing_scripts/audiotools/convert/__init__.py index 508acf2a..802f1acb 100755 --- a/ivas_processing_scripts/audiotools/convert/__init__.py +++ b/ivas_processing_scripts/audiotools/convert/__init__.py @@ -34,6 +34,7 @@ import logging from pathlib import Path, PurePath from typing import Optional, Union from numpy import empty +from shutil import copyfile from ivas_processing_scripts.audiotools import audio, audioarray, metadata from ivas_processing_scripts.audiotools.audiofile import write @@ -100,7 +101,7 @@ def convert_file( output.audio = empty((1, num_tcs)) # fabricate metadata file name - output.metadata_files = [Path(out_file).with_suffix(".met")] + output.metadata_file = Path(out_file).with_suffix(".met") if isinstance(output, audio.ObjectBasedAudio): try: output.object_pos = input.object_pos @@ -135,6 +136,11 @@ def convert_file( write(out_file, output.audio, output.fs) if isinstance(output, audio.ObjectBasedAudio): write_ISM_metadata_in_file(output.object_pos, [out_file], automatic_naming=True) + elif isinstance(output, audio.MetadataAssistedSpatialAudio) and in_fmt == out_fmt: + # audio objects point to same MD file, create new one with default naming for output + out_md_name = out_file.parent / (out_file.name + ".met") + copyfile(output.metadata_file, out_md_name) + output.metadata_file = out_md_name def convert( @@ -303,7 +309,7 @@ def format_conversion( """Convert one audio format to another""" # validation - if isinstance(output, audio.MetadataAssistedSpatialAudio) and not isinstance(input, audio.SceneBasedAudio): + if isinstance(output, audio.MetadataAssistedSpatialAudio) and not (isinstance(input, audio.SceneBasedAudio) or isinstance(input, audio.MetadataAssistedSpatialAudio )): raise NotImplementedError("Can only convert to MASA from SBA") if isinstance(output, audio.ObjectBasedAudio) and input.name != output.name: @@ -314,10 +320,14 @@ def format_conversion( if logger: logger.debug(f"Format conversion: {input.name} -> {output.name}") - if input.name == output.name or ( + if ( fmt := input.name ) == output.name or ( input.name.startswith("BINAURAL") and output.name.startswith("BINAURAL") ): output.audio = input.audio + if fmt.startswith("MASA"): + output.metadata_file = input.metadata_file + elif fmt.startswith("ISM"): + output.metadata_files = list(output.metadata_files) else: if isinstance(input, audio.BinauralAudio): raise NotImplementedError( diff --git a/ivas_processing_scripts/audiotools/convert/scenebased.py b/ivas_processing_scripts/audiotools/convert/scenebased.py index e1fbe7cd..732de76e 100755 --- a/ivas_processing_scripts/audiotools/convert/scenebased.py +++ b/ivas_processing_scripts/audiotools/convert/scenebased.py @@ -192,7 +192,7 @@ def render_sba_to_masa( # two dir only possible from HOA2 num_dirs = 1 num_tcs = masa_out.audio.shape[1] - md_out_path = masa_out.metadata_files[0] + md_out_path = masa_out.metadata_file masa = masaAnalyzer(sba_in, num_tcs, num_dirs, md_out_path) masa_out.audio = masa.audio diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 7f8e9761..433f4fa6 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -409,13 +409,32 @@ def get_processing_chain( loudness_postprocessing = post_cfg.get("loudness") loudness_fmt_postprocessing = post_cfg.get("loudness_fmt") + post_fmt = post_cfg.get("fmt") + if isinstance(post_fmt, list): + pre_fmts = post_fmt[:-1] + post_fmt = post_fmt[-1] + + # add Postprocessing with only format conversion for each format except the last + fmts = [tmp_in_fmt] + pre_fmts + for fmt_in, fmt_out in zip(fmts[:-1], fmts[1:]): + chain["processes"].append( + Postprocessing( + { + "in_fs": tmp_in_fs, + "in_fmt": fmt_in, + "out_fs": tmp_in_fs, + "out_fmt": fmt_out + } + ) + ) + chain["processes"].append( Postprocessing( { "in_fs": tmp_in_fs, "in_fmt": tmp_in_fmt, "out_fs": post_cfg.get("fs"), - "out_fmt": post_cfg.get("fmt"), + "out_fmt": post_fmt, "out_cutoff": tmp_lp_cutoff, "out_loudness": loudness_postprocessing, "out_loudness_fmt": loudness_fmt_postprocessing, diff --git a/ivas_processing_scripts/processing/processing.py b/ivas_processing_scripts/processing/processing.py index d7ed0393..807ddcc7 100755 --- a/ivas_processing_scripts/processing/processing.py +++ b/ivas_processing_scripts/processing/processing.py @@ -176,6 +176,8 @@ def concat_teardown(cfg: TestConfig, logger: logging.Logger): raise ValueError("Splitting not possible without split marker") output_format = cfg.postprocessing["fmt"] + if isinstance(output_format, list): + output_format = output_format[-1] out_files = [] out_meta = [] @@ -327,6 +329,10 @@ def reverse_process_2(cfg, logger): logger.info("Remove preamble") remove_preamble(cfg) + fmt = cfg.postprocessing["fmt"] + if isinstance(fmt, list): + fmt = fmt[-1] + # reverse concatenation if cfg.pre2.concatenate_input: # write out the splits, optionally remove file @@ -337,13 +343,13 @@ def reverse_process_2(cfg, logger): for out_dir in cfg.out_dirs: list_audio_dir = list_audio(out_dir) out_paths_splits.append(list_audio_dir) - if cfg.postprocessing["fmt"].startswith("ISM"): + if fmt.startswith("ISM"): out_meta_splits = [] for i, condition in enumerate(out_paths_splits): meta_condition = metadata_search( cfg.out_dirs[i], condition, - num_objects=int(cfg.postprocessing["fmt"][-1]), + num_objects=int(fmt[-1]), ) out_meta_splits.append(meta_condition) else: @@ -353,7 +359,7 @@ def reverse_process_2(cfg, logger): if cfg.postprocessing.get("loudness", False): scale_files( out_paths_splits, - cfg.postprocessing["fmt"], + fmt, cfg.postprocessing["loudness"], cfg.postprocessing.get("loudness_fmt", None), cfg.postprocessing["fs"], @@ -444,13 +450,17 @@ def process_item( def remove_preamble(cfg): # get number of channels from output format - num_channels = audio.fromtype(cfg.postprocessing["fmt"]).num_channels + fmt = cfg.postprocessing["fmt"] + if isinstance(cfg.postprocessing["fmt"], list): + fmt = fmt[-1] + + num_channels = audio.fromtype(fmt).num_channels for odir in cfg.out_dirs: for item in cfg.items_list: path_input = odir / item.name # remove preamble for ISM metadata - if cfg.postprocessing["fmt"].startswith("ISM"): + if fmt.startswith("ISM"): # search for metadata meta_item = metadata_search( odir, [Path(item.name)], num_objects=num_channels -- GitLab From b4101e5862ff120263930ef66abb5d25de71014b Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 11:34:20 +0200 Subject: [PATCH 04/35] fix multi-EVS FOA output to MASA to BINAURAL conversion --- .../selection/P800-8/config/P800-8.yml | 20 +++++++++---------- .../audiotools/convert/__init__.py | 2 +- ivas_processing_scripts/processing/chains.py | 1 + ivas_processing_scripts/processing/ivas.py | 5 +++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/experiments/selection/P800-8/config/P800-8.yml b/experiments/selection/P800-8/config/P800-8.yml index 3e94a8f8..9b149525 100644 --- a/experiments/selection/P800-8/config/P800-8.yml +++ b/experiments/selection/P800-8/config/P800-8.yml @@ -178,16 +178,16 @@ conditions_to_generate: # tx: # type: "FER" # error_rate: 5 - # c22: - # type: evs - # bitrates: - # - 32000 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # tx: - # type: "FER" - # error_rate: 5 + c22: + type: evs + bitrates: + - 32000 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 # ### IVAS condition ############################### # c23: diff --git a/ivas_processing_scripts/audiotools/convert/__init__.py b/ivas_processing_scripts/audiotools/convert/__init__.py index 802f1acb..742eb8eb 100755 --- a/ivas_processing_scripts/audiotools/convert/__init__.py +++ b/ivas_processing_scripts/audiotools/convert/__init__.py @@ -101,7 +101,7 @@ def convert_file( output.audio = empty((1, num_tcs)) # fabricate metadata file name - output.metadata_file = Path(out_file).with_suffix(".met") + output.metadata_file = Path(out_file).parent / ( Path(out_file).name + ".met" ) if isinstance(output, audio.ObjectBasedAudio): try: output.object_pos = input.object_pos diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 433f4fa6..b9395983 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -427,6 +427,7 @@ def get_processing_chain( } ) ) + tmp_in_fmt = fmt_out chain["processes"].append( Postprocessing( diff --git a/ivas_processing_scripts/processing/ivas.py b/ivas_processing_scripts/processing/ivas.py index 72470bf6..2a200900 100755 --- a/ivas_processing_scripts/processing/ivas.py +++ b/ivas_processing_scripts/processing/ivas.py @@ -140,9 +140,10 @@ class IVAS(Processing): # Only resample and convert if wav, otherwise supposed pcm to be sampled at self.in_fs metadata_files = [] - # for MASA suppose that metadata file as same basename and location as input file + # for MASA suppose that metadata file has same basename and location as input file if isinstance(self.in_fmt, audio.MetadataAssistedSpatialAudio): - metadata_files.append(in_file.with_suffix(".met")) + md_file = in_file.parent / (in_file.name + ".met") + metadata_files.append(md_file) if isinstance(self.in_fmt, audio.ObjectBasedAudio): if in_meta is None: -- GitLab From 3dd35ddc3c1680213b6bf51b5a217f0076e37bc5 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 11:48:15 +0200 Subject: [PATCH 05/35] add actual P800-8 conditions from test plan --- .../selection/P800-8/config/P800-8.yml | 502 ++++++++++-------- 1 file changed, 273 insertions(+), 229 deletions(-) diff --git a/experiments/selection/P800-8/config/P800-8.yml b/experiments/selection/P800-8/config/P800-8.yml index 9b149525..085dbef0 100644 --- a/experiments/selection/P800-8/config/P800-8.yml +++ b/experiments/selection/P800-8/config/P800-8.yml @@ -44,144 +44,186 @@ preprocessing_2: ################################################ conditions_to_generate: ### Reference and anchor conditions ########################## - # c01: - # type: ref - # c02: - # type: mnru - # q: 28 - # c03: - # type: mnru - # q: 24 - # c04: - # type: mnru - # q: 20 - # c05: - # type: mnru - # q: 16 - # c06: - # type: esdru - # alpha: 0.7 - # c07: - # type: esdru - # alpha: 0.4 - # c08: - # type: esdru - # alpha: 0.1 + c01: + type: ref + c02: + type: mnru + q: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 # ### EVS condition ################################ - # c09: - # type: evs - # bitrates: - # - 7200 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # c10: - # type: evs - # bitrates: - # - 8000 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # c11: - # type: evs - # bitrates: - # - 9600 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # c12: - # type: evs - # bitrates: - # - 13200 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # c13: - # type: evs - # bitrates: - # - 16400 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # c14: - # type: evs - # bitrates: - # - 24400 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # c15: - # type: evs - # bitrates: - # - 32000 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # c16: - # type: evs - # bitrates: - # - 7200 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # tx: - # type: "FER" - # error_rate: 5 - # c17: - # type: evs - # bitrates: - # - 8000 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # tx: - # type: "FER" - # error_rate: 5 - # c18: - # type: evs - # bitrates: - # - 9600 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # tx: - # type: "FER" - # error_rate: 5 - # c19: - # type: evs - # bitrates: - # - 13200 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # tx: - # type: "FER" - # error_rate: 5 - # c20: - # type: evs - # bitrates: - # - 16400 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # tx: - # type: "FER" - # error_rate: 5 - # c21: - # type: evs - # bitrates: - # - 24400 - # cod: - # opts: ["-max_band", "FB"] - # dec: - # tx: - # type: "FER" - # error_rate: 5 + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 8000 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c19: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + tx: + type: "FER" + error_rate: 5 c22: type: evs bitrates: - - 32000 + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c23: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c24: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c25: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c26: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c27: + type: evs + bitrates: + - 24400 cod: opts: ["-max_band", "FB"] dec: @@ -190,110 +232,112 @@ conditions_to_generate: error_rate: 5 # ### IVAS condition ############################### - # c23: - # type: ivas - # bitrates: - # - 13200 - # cod: - # dec: - # fmt: "STEREO" - # c24: - # type: ivas - # bitrates: - # - 16400 - # cod: - # dec: - # fmt: "STEREO" - # c25: - # type: ivas - # bitrates: - # - 24400 - # cod: - # dec: - # fmt: "STEREO" - # c26: - # type: ivas - # bitrates: - # - 32000 - # cod: - # dec: - # fmt: "STEREO" - # c27: - # type: ivas - # bitrates: - # - 48000 - # cod: - # dec: - # fmt: "STEREO" - # c28: - # type: ivas - # bitrates: - # - 13200 - # cod: - # dec: - # fmt: "STEREO" - # tx: - # type: "FER" - # error_rate: 5 - # c29: - # type: ivas - # bitrates: - # - 16400 - # cod: - # dec: - # fmt: "STEREO" - # tx: - # type: "FER" - # error_rate: 5 - # c30: - # type: ivas - # bitrates: - # - 24400 - # cod: - # dec: - # fmt: "STEREO" - # tx: - # type: "FER" - # error_rate: 5 - # c31: - # type: ivas - # bitrates: - # - 32000 - # cod: - # dec: - # fmt: "STEREO" - # tx: - # type: "FER" - # error_rate: 5 - # c32: - # type: ivas - # bitrates: - # - 48000 - # cod: - # dec: - # fmt: "STEREO" - # tx: - # type: "FER" - # error_rate: 5 - - # c33: - # type: ivas - # bitrates: - # - 24400 - # cod: - # opts: ["-dtx"] - # dec: - # fmt: "STEREO" - + c28: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + c29: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + c30: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + c31: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + c32: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + c33: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: c34: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + c35: type: ivas bitrates: - 13200 cod: fmt: "MASA2" - opts: ["-dtx"] dec: + tx: + type: "FER" + error_rate: 5 + c36: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + tx: + type: "FER" + error_rate: 5 + c37: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + tx: + type: "FER" + error_rate: 5 + c38: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + tx: + type: "FER" + error_rate: 5 + c39: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + tx: + type: "FER" + error_rate: 5 + c40: + type: ivas + bitrates: + - 64000 + cod: fmt: "MASA2" + dec: tx: type: "FER" error_rate: 5 -- GitLab From 000498826002d2b73f29298b73349050a331ebcb Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 12:31:29 +0200 Subject: [PATCH 06/35] fix for setting up IVAS condition with list in postproc fmt key --- ivas_processing_scripts/processing/chains.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index b9395983..2cae9902 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -201,6 +201,8 @@ def get_processing_chain( tmp_in_fs = pre_cfg.get("fs", cfg.input.get("fs")) tmp_in_fmt = pre_cfg.get("fmt", cfg.input["fmt"]) tmp_out_fmt = post_cfg.get("fmt") + if isinstance(tmp_out_fmt, list): + tmp_out_fmt = tmp_out_fmt[0] tmp_lp_cutoff = post_cfg.get("lp_cutoff") tmp_mnru_q = None -- GitLab From 26e47a1ca57062e6df804c23167526fe2431ff16 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 12:32:12 +0200 Subject: [PATCH 07/35] fix PLANARFOA to MASA and FOA conversions --- ivas_processing_scripts/audiotools/convert/scenebased.py | 8 ++++---- .../audiotools/wrappers/masaAnalyzer.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ivas_processing_scripts/audiotools/convert/scenebased.py b/ivas_processing_scripts/audiotools/convert/scenebased.py index 732de76e..9867808d 100755 --- a/ivas_processing_scripts/audiotools/convert/scenebased.py +++ b/ivas_processing_scripts/audiotools/convert/scenebased.py @@ -78,7 +78,8 @@ def convert_scenebased( render_sba_to_sba(sba, out) # SBA -> MASA - elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name == "FOA": + # NOTE: only allowed for 1st order ambisonics ("FOA" + "PLANARFOA") + elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name.endswith("FOA"): render_sba_to_masa(sba, out) else: @@ -176,7 +177,7 @@ def render_sba_to_sba( sba_out.audio = np.pad( sba_in.audio, [[0, 0], [0, sba_out.num_channels - sba_in.num_channels]] ) - elif sba_out.ambi_order < sba_in.ambi_order: + elif sba_out.ambi_order <= sba_in.ambi_order: sba_out.audio = sba_in.audio[:, : sba_out.num_channels] if sba_out.is_planar: @@ -187,9 +188,8 @@ def render_sba_to_masa( sba_in: audio.SceneBasedAudio, masa_out: audio.MetadataAssistedSpatialAudio, ) -> None: - assert sba_in.name == "FOA" - # two dir only possible from HOA2 + # two dir only possible from HOA2, which is not yet implemented as conversion num_dirs = 1 num_tcs = masa_out.audio.shape[1] md_out_path = masa_out.metadata_file diff --git a/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py index 257b94df..c90508bb 100644 --- a/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py +++ b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py @@ -78,8 +78,8 @@ def masaAnalyzer( if num_dirs not in [1, 2]: raise ValueError(f"Only 1 or 2 directions supported, but {num_dirs} was given.") - if sba.name not in ["FOA", "HOA2"]: - raise ValueError(f"Only FOA or HOA2 suported, but {sba.name} was given.") + if sba.name not in [ "PLANARFOA", "FOA", "HOA2"]: + raise ValueError(f"Only FOA or HOA2 suported, but {sba.name} was given.") cmd = [ str(binary), -- GitLab From 7bdb0f4d4a61e4742f97df840614b7fc5b02d245 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 13:45:08 +0200 Subject: [PATCH 08/35] correct P800-8 config --- experiments/selection/P800-8/config/P800-8.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/experiments/selection/P800-8/config/P800-8.yml b/experiments/selection/P800-8/config/P800-8.yml index 085dbef0..19f2fd56 100644 --- a/experiments/selection/P800-8/config/P800-8.yml +++ b/experiments/selection/P800-8/config/P800-8.yml @@ -231,7 +231,7 @@ conditions_to_generate: type: "FER" error_rate: 5 - # ### IVAS condition ############################### + ### IVAS condition ############################### c28: type: ivas bitrates: @@ -239,6 +239,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" c29: type: ivas bitrates: @@ -246,6 +247,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" c30: type: ivas bitrates: @@ -253,6 +255,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" c31: type: ivas bitrates: @@ -260,6 +263,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" c32: type: ivas bitrates: @@ -267,6 +271,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" c33: type: ivas bitrates: @@ -274,6 +279,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" c34: type: ivas bitrates: @@ -281,6 +287,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" c35: type: ivas bitrates: @@ -288,6 +295,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" tx: type: "FER" error_rate: 5 @@ -298,6 +306,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" tx: type: "FER" error_rate: 5 @@ -308,6 +317,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" tx: type: "FER" error_rate: 5 @@ -318,6 +328,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" tx: type: "FER" error_rate: 5 @@ -328,6 +339,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" tx: type: "FER" error_rate: 5 @@ -338,6 +350,7 @@ conditions_to_generate: cod: fmt: "MASA2" dec: + fmt: "MASA2" tx: type: "FER" error_rate: 5 -- GitLab From 74592748c20cc29d3c07d263e9106383777da5ff Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 13:45:28 +0200 Subject: [PATCH 09/35] handle dual-mono EVS for stereo MASA input cases --- ivas_processing_scripts/processing/chains.py | 17 ++++++++++++++++- ivas_processing_scripts/processing/evs.py | 5 +++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 2cae9902..117dd9bc 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -290,6 +290,21 @@ def get_processing_chain( else: preamble = 0 + # if the encoding format differs from the format after the preprocessing, add format conversion stuff + if tmp_in_fmt != cod_cfg["fmt"]: + chain["processes"].append( + Preprocessing( + { + "in_fs": tmp_in_fs, + "in_fmt": tmp_in_fmt, + "out_fs": tmp_in_fs, + "out_fmt": cod_cfg["fmt"], + "multiprocessing": cfg.multiprocessing, + } + ) + ) + tmp_in_fmt = cod_cfg["fmt"] + chain["processes"].append( EVS( { @@ -311,7 +326,7 @@ def get_processing_chain( ) # update values to reflect decoder output tmp_in_fs = dec_cfg.get("fs", tmp_in_fs) - tmp_in_fmt = cond_cfg.get("sba_format", cfg.input["fmt"]) + tmp_in_fmt = cond_cfg.get("sba_format", tmp_in_fmt) elif cond_cfg["type"] == "ivas": cod_cfg = cond_cfg["cod"] diff --git a/ivas_processing_scripts/processing/evs.py b/ivas_processing_scripts/processing/evs.py index d70e15ae..562fd1e7 100755 --- a/ivas_processing_scripts/processing/evs.py +++ b/ivas_processing_scripts/processing/evs.py @@ -245,6 +245,11 @@ class EVS(Processing): / f"{out_file.stem.split('.')[0]}.evs{out_file.suffix}.{idx}.csv" ) copyfile(in_meta[idx], out_file_meta) + # copy MASA metadata for MASA pass-through + if isinstance(condition_fmt, audio.MetadataAssistedSpatialAudio): + md_file_in = in_file.parent / (in_file.name + ".met") + md_file_out = out_file.parent / (out_file.name + ".met") + copyfile(md_file_in, md_file_out) elif out_file.suffix == ".txt": raise NotImplementedError(".txt file support is WIP") # output_wav = out_file.replace(output_ext, ".wav") -- GitLab From 600e5f3dd41eb78f9b424fed9fd6b83e3febc23c Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 13:56:54 +0200 Subject: [PATCH 10/35] fix crash in EVS condition setup --- ivas_processing_scripts/processing/chains.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 117dd9bc..903e36e5 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -291,19 +291,19 @@ def get_processing_chain( preamble = 0 # if the encoding format differs from the format after the preprocessing, add format conversion stuff - if tmp_in_fmt != cod_cfg["fmt"]: + if (cod_fmt := cod_cfg.get("fmt", tmp_in_fmt)) != tmp_in_fmt: chain["processes"].append( Preprocessing( { "in_fs": tmp_in_fs, "in_fmt": tmp_in_fmt, "out_fs": tmp_in_fs, - "out_fmt": cod_cfg["fmt"], + "out_fmt": cod_fmt, "multiprocessing": cfg.multiprocessing, } ) ) - tmp_in_fmt = cod_cfg["fmt"] + tmp_in_fmt = cod_fmt chain["processes"].append( EVS( -- GitLab From 759244ec2997f77c9e0a7d3390f4318cd08cceb8 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 14:04:16 +0200 Subject: [PATCH 11/35] fix masaAnalyzer for PlanarFOA input --- ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py index c90508bb..8489d346 100644 --- a/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py +++ b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py @@ -85,7 +85,7 @@ def masaAnalyzer( str(binary), "-mono" if num_tcs == 1 else "-stereo", f"-{num_dirs}dir", - "-foa" if sba.name == "FOA" else "-hoa2", + "-foa" if sba.name.endswith( "FOA" ) else "-hoa2", "", # 4 -> inputPcm "", # 5 -> outputPcm "", # 6 -> output metadata file -- GitLab From 9b06fe60ae6652946a998ce598cb5b6bb8598875 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 14:15:18 +0200 Subject: [PATCH 12/35] add inline documentation for list of fmt's in postprocessing --- examples/TEMPLATE.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/TEMPLATE.yml b/examples/TEMPLATE.yml index 9252a44d..915965fa 100755 --- a/examples/TEMPLATE.yml +++ b/examples/TEMPLATE.yml @@ -274,7 +274,9 @@ conditions_to_generate: ### Post-processing step performed after core processing for all conditions ### Post-processing is required and can not be omitted postprocessing: - ### REQUIRED: Target format for output + ### REQUIRED: Target format for output, this can be a string as below, or a list, e.g. ["FOA", "BINAURAL"]. + ### Conversion will be applied in order and the last format is the final output forma. This was introduced to + ### accomodate for the MASA tests where masaRenderer is used as binaural renderer for all conditions. fmt: "BINAURAL" ### REQUIRED: Target sampling rate in Hz for resampling fs: 48000 -- GitLab From 3baef7bff929ec76faaccc41c1c9c10b1c94e313 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 14:28:41 +0200 Subject: [PATCH 13/35] test for masaAnalyzer binary --- tests/test_binaries_present.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_binaries_present.py b/tests/test_binaries_present.py index 0ba0d4bb..5ce6be59 100755 --- a/tests/test_binaries_present.py +++ b/tests/test_binaries_present.py @@ -44,6 +44,7 @@ BINARIES = [ "random", "networkSimulator_g192", "masaRenderer", + "masaAnalyzer" ] -- GitLab From 89cf3010cd6b38d1fd39fb297965cf39b78dfa02 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 19 May 2023 15:23:57 +0200 Subject: [PATCH 14/35] fix problem with list for postproc format and loudness --- .../audiotools/wrappers/masaAnalyzer.py | 1 - ivas_processing_scripts/processing/chains.py | 21 +++++++++++-------- .../processing/processing.py | 5 ++++- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py index 8489d346..41bd054a 100644 --- a/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py +++ b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py @@ -104,7 +104,6 @@ def masaAnalyzer( write(tmp_in, tmp_audio, 48000) # we need to run in the masaAnalyzer directory to use the .bin files it requires - print(cmd) run(cmd, cwd=binary.resolve().parent) fmt = f"MASA{num_tcs}" diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 3166b239..706add50 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -115,6 +115,9 @@ def get_preprocessing(cfg: TestConfig) -> dict: pre_cfg = cfg.preprocessing post_cfg = cfg.postprocessing + post_fmt = post_cfg["fmt"] + if isinstance(post_fmt, list): + post_fmt = post_fmt[-1] chain["processes"].append( Preprocessing( @@ -128,7 +131,7 @@ def get_preprocessing(cfg: TestConfig) -> dict: "in_delay": pre_cfg.get("delay"), "in_window": pre_cfg.get("window"), "in_loudness": pre_cfg.get("loudness"), - "in_loudness_fmt": pre_cfg.get("loudness_fmt", post_cfg.get("fmt")), + "in_loudness_fmt": pre_cfg.get("loudness_fmt", post_fmt), "in_mask": pre_cfg.get("mask", None), "multiprocessing": cfg.multiprocessing, } @@ -436,14 +439,6 @@ def get_processing_chain( raise SystemExit(f"Unknown condition {condition}!") # add postprocessing step based on condition - # if concatenation and splitting do loudness adjustment only on splitted files - if pre2_cfg.get("concatenate_input", False): - loudness_postprocessing = None - loudness_fmt_postprocessing = None - else: - loudness_postprocessing = post_cfg.get("loudness") - loudness_fmt_postprocessing = post_cfg.get("loudness_fmt", post_cfg.get("fmt")) - post_fmt = post_cfg.get("fmt") if isinstance(post_fmt, list): pre_fmts = post_fmt[:-1] @@ -464,6 +459,14 @@ def get_processing_chain( ) tmp_in_fmt = fmt_out + # if concatenation and splitting do loudness adjustment only on splitted files + if pre2_cfg.get("concatenate_input", False): + loudness_postprocessing = None + loudness_fmt_postprocessing = None + else: + loudness_postprocessing = post_cfg.get("loudness") + loudness_fmt_postprocessing = post_cfg.get("loudness_fmt", tmp_in_fmt) + chain["processes"].append( Postprocessing( { diff --git a/ivas_processing_scripts/processing/processing.py b/ivas_processing_scripts/processing/processing.py index 4ff9acd6..7737e639 100755 --- a/ivas_processing_scripts/processing/processing.py +++ b/ivas_processing_scripts/processing/processing.py @@ -358,11 +358,14 @@ def reverse_process_2(cfg, logger): # scale individual files if cfg.postprocessing.get("loudness", False): + post_fmt = cfg.postprocessing["fmt"] + if isinstance(post_fmt, list): + post_fmt = post_fmt[-1] scale_files( out_paths_splits, fmt, cfg.postprocessing["loudness"], - cfg.postprocessing.get("loudness_fmt", cfg.postprocessing["fmt"]), + cfg.postprocessing.get("loudness_fmt", post_fmt), cfg.postprocessing["fs"], out_meta_splits, logger, -- GitLab From 63c5e022fcbeb9e9dff3868629defbc67deee0e0 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 10:24:17 +0200 Subject: [PATCH 15/35] add configs for MASA BS1534 experiments --- .../selection/BS1534-7a/config/BS1534-7a.yml | 113 +++++++ .../selection/BS1534-7b/config/BS1534-7b.yml | 128 ++++++++ .../selection/P800-9/config/P800-9.yml | 301 ++++++++++++++++++ tests/constants.py | 8 +- 4 files changed, 546 insertions(+), 4 deletions(-) create mode 100644 experiments/selection/BS1534-7a/config/BS1534-7a.yml create mode 100644 experiments/selection/BS1534-7b/config/BS1534-7b.yml create mode 100644 experiments/selection/P800-9/config/P800-9.yml diff --git a/experiments/selection/BS1534-7a/config/BS1534-7a.yml b/experiments/selection/BS1534-7a/config/BS1534-7a.yml new file mode 100644 index 00000000..6a11cd6e --- /dev/null +++ b/experiments/selection/BS1534-7a/config/BS1534-7a.yml @@ -0,0 +1,113 @@ +--- +################################################ +# General configuration +################################################ + +name: BS1534-7a +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/BS1534-7a/proc_input" +output_path: "experiments/selection/BS1534-7a/proc_output" + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "20KBP" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + preamble: 10000 + preamble_noise: true + +################################################# +### Bitstream processing +################################################# + +################################################ +### Configuration for conditions under test +################################################ +conditions_to_generate: + ### Reference and anchor conditions ########################## + c01: + type: ref + c02: + type: lp7k + + ### EVS condition ################################ + c03: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c04: + type: evs + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c05: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + + ### IVAS condition ############################### + c06: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c07: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c08: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/BS1534-7b/config/BS1534-7b.yml b/experiments/selection/BS1534-7b/config/BS1534-7b.yml new file mode 100644 index 00000000..c0f907cf --- /dev/null +++ b/experiments/selection/BS1534-7b/config/BS1534-7b.yml @@ -0,0 +1,128 @@ +--- +################################################ +# General configuration +################################################ + +name: BS1534-7b +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/BS1534-7b/proc_input" +output_path: "experiments/selection/BS1534-7b/proc_output" + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "20KBP" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + preamble: 10000 + preamble_noise: true + +################################################# +### Bitstream processing +################################################# + +################################################ +### Configuration for conditions under test +################################################ +conditions_to_generate: + ### Reference and anchor conditions ########################## + c01: + type: ref + c02: + type: lp7k + + ### EVS condition ################################ + c03: + type: evs + bitrates: + - 48000 + cod: + opts: ["-max_band", "FB"] + dec: + c04: + type: evs + bitrates: + - 96000 + cod: + opts: ["-max_band", "FB"] + dec: + c05: + type: evs + bitrates: + - 48000 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c06: + type: evs + bitrates: + - 96000 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c07: + type: evs + bitrates: + - 32000 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + + ### IVAS condition ############################### + c08: + type: ivas + bitrates: + - 160000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c09: + type: ivas + bitrates: + - 256000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c10: + type: ivas + bitrates: + - 96000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-9/config/P800-9.yml b/experiments/selection/P800-9/config/P800-9.yml new file mode 100644 index 00000000..bacdbb8c --- /dev/null +++ b/experiments/selection/P800-9/config/P800-9.yml @@ -0,0 +1,301 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-9 +master_seed: 5 +prerun_seed: 2 +multiprocessing: false + +input_path: "experiments/selection/P800-9/proc_input" +output_path: "experiments/selection/P800-9/proc_output" + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + 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: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c19: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c22: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c23: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + + ### IVAS condition ############################### + c24: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c25: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c26: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c27: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c28: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c36: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/tests/constants.py b/tests/constants.py index fb91b23c..c4ea94eb 100644 --- a/tests/constants.py +++ b/tests/constants.py @@ -215,8 +215,8 @@ INPUT_EXPERIMENT_NAMES = [ "BS1534-5b", "BS1534-6a", "BS1534-6b", - # "BS1534-7a", - # "BS1534-7b", + "BS1534-7a", + "BS1534-7b", "P800-1", "P800-2", "P800-3", @@ -224,6 +224,6 @@ INPUT_EXPERIMENT_NAMES = [ "P800-5", "P800-6", "P800-7", - # "P800-8", - # "P800-9", + "P800-8", + "P800-9", ] -- GitLab From 1c6abb8415b5efd5a9578a3ecf71d717f02b4c83 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 10:53:06 +0200 Subject: [PATCH 16/35] fix bug in format conversion handling --- ivas_processing_scripts/processing/chains.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 706add50..701b1e2b 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -399,19 +399,19 @@ def get_processing_chain( preamble = 0 # if the encoding format differs from the format after the preprocessing, add format conversion stuff - if tmp_in_fmt != cod_cfg["fmt"]: + if (cod_fmt := cod_cfg.get("fmt", tmp_in_fmt)) != tmp_in_fmt: chain["processes"].append( Preprocessing( { "in_fs": tmp_in_fs, "in_fmt": tmp_in_fmt, "out_fs": tmp_in_fs, - "out_fmt": cod_cfg["fmt"], + "out_fmt": cod_fmt, "multiprocessing": cfg.multiprocessing, } ) ) - tmp_in_fmt = cod_cfg["fmt"] + tmp_in_fmt = cod_fmt chain["processes"].append( IVAS( -- GitLab From d2f8191c0013f611bf31a50145ee547dc4bb5ac7 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 12:01:50 +0200 Subject: [PATCH 17/35] make check for binary work for str and Path objects --- .../audiotools/wrappers/networkSimulator.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ivas_processing_scripts/audiotools/wrappers/networkSimulator.py b/ivas_processing_scripts/audiotools/wrappers/networkSimulator.py index 4ea84db1..3c116979 100644 --- a/ivas_processing_scripts/audiotools/wrappers/networkSimulator.py +++ b/ivas_processing_scripts/audiotools/wrappers/networkSimulator.py @@ -31,7 +31,6 @@ # import logging -import os.path from pathlib import Path from typing import Optional, Union @@ -75,7 +74,7 @@ def validate_network_simulator( "The network simulator binary was not found! Please check the configuration." ) if error_pattern is not None: - if not os.path.exists(os.path.realpath(error_pattern)): + if not Path(error_pattern).exists(): raise FileNotFoundError( f"The network simulator error profile file {error_pattern} was not found! Please check the configuration." ) -- GitLab From bcd29a84425f9d8c1c6629401389a867b3a153da Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 12:07:47 +0200 Subject: [PATCH 18/35] add directory strucutre to version control --- experiments/selection/BS1534-7a/.gitkeep | 0 experiments/selection/BS1534-7a/proc_input/.gitkeep | 0 experiments/selection/BS1534-7a/proc_output/.gitkeep | 0 experiments/selection/BS1534-7b/.gitkeep | 0 experiments/selection/BS1534-7b/proc_input/.gitkeep | 0 experiments/selection/BS1534-7b/proc_output/.gitkeep | 0 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 experiments/selection/BS1534-7a/.gitkeep create mode 100644 experiments/selection/BS1534-7a/proc_input/.gitkeep create mode 100644 experiments/selection/BS1534-7a/proc_output/.gitkeep create mode 100644 experiments/selection/BS1534-7b/.gitkeep create mode 100644 experiments/selection/BS1534-7b/proc_input/.gitkeep create mode 100644 experiments/selection/BS1534-7b/proc_output/.gitkeep diff --git a/experiments/selection/BS1534-7a/.gitkeep b/experiments/selection/BS1534-7a/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/BS1534-7a/proc_input/.gitkeep b/experiments/selection/BS1534-7a/proc_input/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/BS1534-7a/proc_output/.gitkeep b/experiments/selection/BS1534-7a/proc_output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/BS1534-7b/.gitkeep b/experiments/selection/BS1534-7b/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/BS1534-7b/proc_input/.gitkeep b/experiments/selection/BS1534-7b/proc_input/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/BS1534-7b/proc_output/.gitkeep b/experiments/selection/BS1534-7b/proc_output/.gitkeep new file mode 100644 index 00000000..e69de29b -- GitLab From 4a0605c850bbd8462d311912a07ca51400875d8f Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 13:31:41 +0200 Subject: [PATCH 19/35] fix crash on custom ls setup --- ivas_processing_scripts/audiotools/convert/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ivas_processing_scripts/audiotools/convert/__init__.py b/ivas_processing_scripts/audiotools/convert/__init__.py index d859aac8..06c624ef 100755 --- a/ivas_processing_scripts/audiotools/convert/__init__.py +++ b/ivas_processing_scripts/audiotools/convert/__init__.py @@ -74,7 +74,8 @@ def convert_file( if not isinstance(in_fmt, PurePath) and in_fmt.startswith("META"): input = metadata.Metadata(in_file) else: - if in_fmt.startswith("MASA") and in_meta is None: + # first check prevents crash on custom_ls setup formats + if isinstance(in_fmt, str) and in_fmt.startswith("MASA") and in_meta is None: # if no MD fileis provided, default to name (including .wav or .pcm!!!) + ".met" in_meta = [in_file.parent / (in_file.name + ".met")] input = audio.fromfile(in_fmt, in_file, in_fs, in_meta) -- GitLab From 0dd47e63b3391c417bc5e40cb93234aab59ffa07 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 14:33:00 +0200 Subject: [PATCH 20/35] only run P800-8 test and archive logs --- .gitlab-ci.yml | 15 ++++++++++----- tests/constants.py | 44 ++++++++++++++++++++++---------------------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ecbbadd1..c47229bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,7 +50,7 @@ stages: # ------------------------------------ # check pre-conditions are met # ------------------------------------ -check_for_binaries: +.check_for_binaries: stage: check tags: - linux @@ -64,7 +64,7 @@ check_for_binaries: # ------------------------------------ # test the format conversion only -test_audiotools_convert: +.test_audiotools_convert: stage: test tags: - linux @@ -81,9 +81,14 @@ experiments: - *print-common-info - *get-codec-binaries - python3 -m pytest -n auto tests/test_experiments.py + artifacts: + paths: + - experiments/selection/*/proc_output/*.log + when: always + expose_as: "experiments logs" # run some test configs for item creation -test_processing: +.test_processing: stage: test rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -100,7 +105,7 @@ test_processing: # static analysis/formatting tests # ------------------------------------ -lint: +.lint: stage: analyze needs: [] tags: @@ -109,7 +114,7 @@ lint: script: - flake8 --max-line-length 88 --extend-ignore=E203,E501,E741 -format: +.format: stage: analyze needs: [] variables: diff --git a/tests/constants.py b/tests/constants.py index c4ea94eb..cbe8e110 100644 --- a/tests/constants.py +++ b/tests/constants.py @@ -203,27 +203,27 @@ INPUT_CONFIG_FILES = [ ] INPUT_EXPERIMENT_NAMES = [ - "BS1534-1a", - "BS1534-1b", - "BS1534-2a", - "BS1534-2b", - "BS1534-3a", - "BS1534-3b", - "BS1534-4a", - "BS1534-4b", - "BS1534-5a", - "BS1534-5b", - "BS1534-6a", - "BS1534-6b", - "BS1534-7a", - "BS1534-7b", - "P800-1", - "P800-2", - "P800-3", - "P800-4", - "P800-5", - "P800-6", - "P800-7", + # "BS1534-1a", + # "BS1534-1b", + # "BS1534-2a", + # "BS1534-2b", + # "BS1534-3a", + # "BS1534-3b", + # "BS1534-4a", + # "BS1534-4b", + # "BS1534-5a", + # "BS1534-5b", + # "BS1534-6a", + # "BS1534-6b", + # "BS1534-7a", + # "BS1534-7b", + # "P800-1", + # "P800-2", + # "P800-3", + # "P800-4", + # "P800-5", + # "P800-6", + # "P800-7", "P800-8", - "P800-9", + # "P800-9", ] -- GitLab From 239960470731525daccf9e53ae99c856fce5dfae Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 14:34:15 +0200 Subject: [PATCH 21/35] fix gitlab-ci.yml --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c47229bc..e7901a8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,7 +85,6 @@ experiments: paths: - experiments/selection/*/proc_output/*.log when: always - expose_as: "experiments logs" # run some test configs for item creation .test_processing: -- GitLab From 6125bd963476870396f69f0d3764ebd9fee03a93 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 14:43:29 +0200 Subject: [PATCH 22/35] run all configs again, but delete everything before --- .gitlab-ci.yml | 1 + tests/constants.py | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e7901a8f..0821625e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,6 +78,7 @@ experiments: tags: - linux script: + - rm -rf experiments/selection/*/proc_*/* - *print-common-info - *get-codec-binaries - python3 -m pytest -n auto tests/test_experiments.py diff --git a/tests/constants.py b/tests/constants.py index cbe8e110..c4ea94eb 100644 --- a/tests/constants.py +++ b/tests/constants.py @@ -203,27 +203,27 @@ INPUT_CONFIG_FILES = [ ] INPUT_EXPERIMENT_NAMES = [ - # "BS1534-1a", - # "BS1534-1b", - # "BS1534-2a", - # "BS1534-2b", - # "BS1534-3a", - # "BS1534-3b", - # "BS1534-4a", - # "BS1534-4b", - # "BS1534-5a", - # "BS1534-5b", - # "BS1534-6a", - # "BS1534-6b", - # "BS1534-7a", - # "BS1534-7b", - # "P800-1", - # "P800-2", - # "P800-3", - # "P800-4", - # "P800-5", - # "P800-6", - # "P800-7", + "BS1534-1a", + "BS1534-1b", + "BS1534-2a", + "BS1534-2b", + "BS1534-3a", + "BS1534-3b", + "BS1534-4a", + "BS1534-4b", + "BS1534-5a", + "BS1534-5b", + "BS1534-6a", + "BS1534-6b", + "BS1534-7a", + "BS1534-7b", + "P800-1", + "P800-2", + "P800-3", + "P800-4", + "P800-5", + "P800-6", + "P800-7", "P800-8", - # "P800-9", + "P800-9", ] -- GitLab From 96dbbaee0a65065caac04ec07e473e464d837735 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 15:01:53 +0200 Subject: [PATCH 23/35] try running without multithreading --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0821625e..fac57164 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,7 +81,7 @@ experiments: - rm -rf experiments/selection/*/proc_*/* - *print-common-info - *get-codec-binaries - - python3 -m pytest -n auto tests/test_experiments.py + - python3 -m pytest tests/test_experiments.py artifacts: paths: - experiments/selection/*/proc_output/*.log -- GitLab From 866454613e2672e055f4f1ec79e35bf8c72ff1f0 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 15:39:07 +0200 Subject: [PATCH 24/35] raise log level for less output --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fac57164..e90bb950 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,7 +81,7 @@ experiments: - rm -rf experiments/selection/*/proc_*/* - *print-common-info - *get-codec-binaries - - python3 -m pytest tests/test_experiments.py + - python3 -m pytest tests/test_experiments.py --log-level ERROR artifacts: paths: - experiments/selection/*/proc_output/*.log -- GitLab From fefd2096adc988849f872e392bd2df54b013eeca Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 16:09:24 +0200 Subject: [PATCH 25/35] try with different git strategy --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e90bb950..37a6b012 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,6 +74,8 @@ stages: # run the test configs for the selection experiments experiments: + variables: + GIT_STRATEGY: clone stage: test tags: - linux @@ -86,6 +88,7 @@ experiments: paths: - experiments/selection/*/proc_output/*.log when: always + expire_in: 1 week # run some test configs for item creation .test_processing: -- GitLab From 8564deb5d23bc4e1d8acf7c31c9838bf2c8945be Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 16:35:11 +0200 Subject: [PATCH 26/35] add global log file --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37a6b012..10e99664 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,10 +83,11 @@ experiments: - rm -rf experiments/selection/*/proc_*/* - *print-common-info - *get-codec-binaries - - python3 -m pytest tests/test_experiments.py --log-level ERROR + - python3 -m pytest tests/test_experiments.py --log-level ERROR | tee log.txt artifacts: paths: - experiments/selection/*/proc_output/*.log + - log.txt when: always expire_in: 1 week -- GitLab From 67f395f2ef0b583efc911dd4d686925ca26f0b46 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 17:29:20 +0200 Subject: [PATCH 27/35] prevent modifying DEFAULT_CONFIG in merge_dicts --- ivas_processing_scripts/processing/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ivas_processing_scripts/processing/config.py b/ivas_processing_scripts/processing/config.py index 1fef013b..d7b0ad6b 100755 --- a/ivas_processing_scripts/processing/config.py +++ b/ivas_processing_scripts/processing/config.py @@ -76,7 +76,7 @@ class TestConfig: self.tmp_dirs = [] # get default config - cfg = DEFAULT_CONFIG + cfg = deepcopy(DEFAULT_CONFIG) # parse configuration file file_cfg = self._parse_yaml(filename) -- GitLab From cc8cba1f71b931608b192447ddbe7a6491c409fd Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 22 May 2023 18:24:47 +0200 Subject: [PATCH 28/35] go back to old test settings --- .gitlab-ci.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 10e99664..b96764f1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,7 +50,7 @@ stages: # ------------------------------------ # check pre-conditions are met # ------------------------------------ -.check_for_binaries: +check_for_binaries: stage: check tags: - linux @@ -64,7 +64,7 @@ stages: # ------------------------------------ # test the format conversion only -.test_audiotools_convert: +test_audiotools_convert: stage: test tags: - linux @@ -74,25 +74,22 @@ stages: # run the test configs for the selection experiments experiments: - variables: - GIT_STRATEGY: clone stage: test tags: - linux script: - - rm -rf experiments/selection/*/proc_*/* - *print-common-info - *get-codec-binaries - - python3 -m pytest tests/test_experiments.py --log-level ERROR | tee log.txt + - python3 -m pytest tests/test_experiments.py -n auto | tee log.txt artifacts: paths: - experiments/selection/*/proc_output/*.log - log.txt - when: always + when: on_failure expire_in: 1 week # run some test configs for item creation -.test_processing: +test_processing: stage: test rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -109,7 +106,7 @@ experiments: # static analysis/formatting tests # ------------------------------------ -.lint: +lint: stage: analyze needs: [] tags: @@ -118,7 +115,7 @@ experiments: script: - flake8 --max-line-length 88 --extend-ignore=E203,E501,E741 -.format: +format: stage: analyze needs: [] variables: -- GitLab From 067fd65a6f8072f45331d2e1609966b3679308b9 Mon Sep 17 00:00:00 2001 From: knj Date: Tue, 23 May 2023 09:41:11 +0200 Subject: [PATCH 29/35] fix fomatting issues --- .../audiotools/convert/__init__.py | 12 ++++++++---- .../audiotools/convert/scenebased.py | 7 ++++--- .../audiotools/wrappers/masaAnalyzer.py | 17 ++++++----------- ivas_processing_scripts/processing/chains.py | 2 +- tests/test_binaries_present.py | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ivas_processing_scripts/audiotools/convert/__init__.py b/ivas_processing_scripts/audiotools/convert/__init__.py index 06c624ef..adc6e6d0 100755 --- a/ivas_processing_scripts/audiotools/convert/__init__.py +++ b/ivas_processing_scripts/audiotools/convert/__init__.py @@ -32,9 +32,10 @@ import logging from pathlib import Path, PurePath +from shutil import copyfile from typing import Optional, Union + from numpy import empty -from shutil import copyfile from ivas_processing_scripts.audiotools import audio, audioarray, metadata from ivas_processing_scripts.audiotools.audiofile import write @@ -102,7 +103,7 @@ def convert_file( output.audio = empty((1, num_tcs)) # fabricate metadata file name - output.metadata_file = Path(out_file).parent / ( Path(out_file).name + ".met" ) + output.metadata_file = Path(out_file).parent / (Path(out_file).name + ".met") if isinstance(output, audio.ObjectBasedAudio): try: output.object_pos = input.object_pos @@ -310,7 +311,10 @@ def format_conversion( """Convert one audio format to another""" # validation - if isinstance(output, audio.MetadataAssistedSpatialAudio) and not (isinstance(input, audio.SceneBasedAudio) or isinstance(input, audio.MetadataAssistedSpatialAudio )): + if isinstance(output, audio.MetadataAssistedSpatialAudio) and not ( + isinstance(input, audio.SceneBasedAudio) + or isinstance(input, audio.MetadataAssistedSpatialAudio) + ): raise NotImplementedError("Can only convert to MASA from SBA") if isinstance(output, audio.ObjectBasedAudio) and input.name != output.name: @@ -321,7 +325,7 @@ def format_conversion( if logger: logger.debug(f"Format conversion: {input.name} -> {output.name}") - if ( fmt := input.name ) == output.name or ( + if (fmt := input.name) == output.name or ( input.name.startswith("BINAURAL") and output.name.startswith("BINAURAL") ): output.audio = input.audio diff --git a/ivas_processing_scripts/audiotools/convert/scenebased.py b/ivas_processing_scripts/audiotools/convert/scenebased.py index e5bdd9da..40588564 100755 --- a/ivas_processing_scripts/audiotools/convert/scenebased.py +++ b/ivas_processing_scripts/audiotools/convert/scenebased.py @@ -79,7 +79,9 @@ def convert_scenebased( # SBA -> MASA # NOTE: only allowed for 1st order ambisonics ("FOA" + "PLANARFOA") - elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name.endswith("FOA"): + elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name.endswith( + "FOA" + ): render_sba_to_masa(sba, out) else: @@ -191,12 +193,11 @@ def render_sba_to_masa( sba_in: audio.SceneBasedAudio, masa_out: audio.MetadataAssistedSpatialAudio, ) -> None: - # two dir only possible from HOA2, which is not yet implemented as conversion num_dirs = 1 num_tcs = masa_out.audio.shape[1] md_out_path = masa_out.metadata_file - + masa = masaAnalyzer(sba_in, num_tcs, num_dirs, md_out_path) masa_out.audio = masa.audio diff --git a/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py index 41bd054a..961c987f 100644 --- a/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py +++ b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py @@ -1,4 +1,3 @@ - #!/usr/bin/env python3 # @@ -34,17 +33,14 @@ from pathlib import Path from tempfile import TemporaryDirectory from ivas_processing_scripts.audiotools import audio -from ivas_processing_scripts.audiotools.audiofile import read, write +from ivas_processing_scripts.audiotools.audiofile import write from ivas_processing_scripts.audiotools.wrappers.filter import resample_itu from ivas_processing_scripts.constants import DEFAULT_CONFIG_BINARIES from ivas_processing_scripts.utils import find_binary, run def masaAnalyzer( - sba: audio.SceneBasedAudio, - num_tcs: int, - num_dirs: int, - metadata_out_path: Path + sba: audio.SceneBasedAudio, num_tcs: int, num_dirs: int, metadata_out_path: Path ) -> audio.MetadataAssistedSpatialAudio: """ Wrapper for masaAnalyzer (from MASA reference software) @@ -74,18 +70,18 @@ def masaAnalyzer( if num_tcs not in [1, 2]: raise ValueError(f"Only 1 or 2 TCs supported, but {num_tcs} was given.") - + if num_dirs not in [1, 2]: raise ValueError(f"Only 1 or 2 directions supported, but {num_dirs} was given.") - if sba.name not in [ "PLANARFOA", "FOA", "HOA2"]: - raise ValueError(f"Only FOA or HOA2 suported, but {sba.name} was given.") + if sba.name not in ["PLANARFOA", "FOA", "HOA2"]: + raise ValueError(f"Only FOA or HOA2 suported, but {sba.name} was given.") cmd = [ str(binary), "-mono" if num_tcs == 1 else "-stereo", f"-{num_dirs}dir", - "-foa" if sba.name.endswith( "FOA" ) else "-hoa2", + "-foa" if sba.name.endswith("FOA") else "-hoa2", "", # 4 -> inputPcm "", # 5 -> outputPcm "", # 6 -> output metadata file @@ -110,4 +106,3 @@ def masaAnalyzer( masa = audio.fromfile(fmt, tmp_out_pcm, 48000, [metadata_out_path]) return masa - diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 5cba69b6..12525a85 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -468,7 +468,7 @@ def get_processing_chain( "in_fs": tmp_in_fs, "in_fmt": fmt_in, "out_fs": tmp_in_fs, - "out_fmt": fmt_out + "out_fmt": fmt_out, } ) ) diff --git a/tests/test_binaries_present.py b/tests/test_binaries_present.py index 5ce6be59..51e256fa 100755 --- a/tests/test_binaries_present.py +++ b/tests/test_binaries_present.py @@ -44,7 +44,7 @@ BINARIES = [ "random", "networkSimulator_g192", "masaRenderer", - "masaAnalyzer" + "masaAnalyzer", ] -- GitLab From 8dddd91fb06e906fd36d5bd382b9ae2618986d39 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 26 May 2023 13:57:14 +0200 Subject: [PATCH 30/35] fix crash when using background noise --- ivas_processing_scripts/processing/chains.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index 12525a85..a662e9d9 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -161,7 +161,6 @@ def get_preprocessing_2(cfg: TestConfig) -> dict: "low_level_noise": background_cfg.get("low_level_noise", False), "seed_delay": cfg.prerun_seed, "master_seed": cfg.master_seed, - "output_fmt": cfg.postprocessing["fmt"], "background_object": None, } else: @@ -171,13 +170,16 @@ def get_preprocessing_2(cfg: TestConfig) -> dict: pre_cfg = getattr(cfg, "preprocessing", {}) tmp_in_fs = pre_cfg.get("fs", cfg.input.get("fs")) tmp_in_fmt = pre_cfg.get("fmt", cfg.input["fmt"]) + out_fmt = cfg.postprocessing["fmt"] + if isinstance(out_fmt, list): + out_fmt = out_fmt[0] chain["processes"].append( Preprocessing2( { "in_fs": tmp_in_fs, "in_fmt": tmp_in_fmt, - "out_fmt": cfg.postprocessing["fmt"], + "out_fmt": out_fmt, "concatenate_input": pre2_cfg.get("concatenate_input", False), "concatenation_order": pre2_cfg.get("concatenation_order", None), "preamble": pre2_cfg.get("preamble", 0), -- GitLab From 5683edb6180dcfe604db457ba629dd1bb24e60b6 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 26 May 2023 15:46:28 +0200 Subject: [PATCH 31/35] add background noise portion for P800-9 --- experiments/selection/P800-9/config/P800-9.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/experiments/selection/P800-9/config/P800-9.yml b/experiments/selection/P800-9/config/P800-9.yml index bacdbb8c..b74980b2 100644 --- a/experiments/selection/P800-9/config/P800-9.yml +++ b/experiments/selection/P800-9/config/P800-9.yml @@ -34,6 +34,11 @@ preprocessing_2: # concatenation_order: [] preamble: 10000 preamble_noise: true + background_noise: + ### REQUIRED: SNR for background noise in dB + snr: 15 + ### REQUIRED: Path to background noise, must have same format and sampling rate as input signal(s) + background_noise_path: "experiments/selection/P800-9/background_noise/background_noise.wav" ################################################# ### Bitstream processing -- GitLab From 6074aab8558d2284a28603962cb4272ab5c555e7 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 26 May 2023 15:54:25 +0200 Subject: [PATCH 32/35] adapt MASA P800 test configs to new category-wise configs --- .../config/{P800-8.yml => P800-8-cat1.yml} | 7 +- .../selection/P800-8/config/P800-8-cat2.yml | 365 ++++++++++++++++++ .../selection/P800-8/config/P800-8-cat3.yml | 365 ++++++++++++++++++ .../selection/P800-8/config/P800-8-cat4.yml | 365 ++++++++++++++++++ .../selection/P800-8/config/P800-8-cat5.yml | 365 ++++++++++++++++++ .../selection/P800-8/config/P800-8-cat6.yml | 365 ++++++++++++++++++ .../selection/P800-8/proc_input/cat1/.gitkeep | 0 .../selection/P800-8/proc_input/cat2/.gitkeep | 0 .../selection/P800-8/proc_input/cat3/.gitkeep | 0 .../selection/P800-8/proc_input/cat4/.gitkeep | 0 .../selection/P800-8/proc_input/cat5/.gitkeep | 0 .../selection/P800-8/proc_input/cat6/.gitkeep | 0 .../config/{P800-9.yml => P800-9-cat1.yml} | 9 +- .../selection/P800-9/config/P800-9-cat2.yml | 307 +++++++++++++++ .../selection/P800-9/config/P800-9-cat3.yml | 307 +++++++++++++++ .../selection/P800-9/config/P800-9-cat4.yml | 307 +++++++++++++++ .../selection/P800-9/config/P800-9-cat5.yml | 307 +++++++++++++++ .../selection/P800-9/config/P800-9-cat6.yml | 307 +++++++++++++++ .../selection/P800-9/proc_input/cat1/.gitkeep | 0 .../selection/P800-9/proc_input/cat2/.gitkeep | 0 .../selection/P800-9/proc_input/cat3/.gitkeep | 0 .../selection/P800-9/proc_input/cat4/.gitkeep | 0 .../selection/P800-9/proc_input/cat5/.gitkeep | 0 .../selection/P800-9/proc_input/cat6/.gitkeep | 0 24 files changed, 3369 insertions(+), 7 deletions(-) rename experiments/selection/P800-8/config/{P800-8.yml => P800-8-cat1.yml} (97%) create mode 100644 experiments/selection/P800-8/config/P800-8-cat2.yml create mode 100644 experiments/selection/P800-8/config/P800-8-cat3.yml create mode 100644 experiments/selection/P800-8/config/P800-8-cat4.yml create mode 100644 experiments/selection/P800-8/config/P800-8-cat5.yml create mode 100644 experiments/selection/P800-8/config/P800-8-cat6.yml create mode 100644 experiments/selection/P800-8/proc_input/cat1/.gitkeep create mode 100644 experiments/selection/P800-8/proc_input/cat2/.gitkeep create mode 100644 experiments/selection/P800-8/proc_input/cat3/.gitkeep create mode 100644 experiments/selection/P800-8/proc_input/cat4/.gitkeep create mode 100644 experiments/selection/P800-8/proc_input/cat5/.gitkeep create mode 100644 experiments/selection/P800-8/proc_input/cat6/.gitkeep rename experiments/selection/P800-9/config/{P800-9.yml => P800-9-cat1.yml} (96%) create mode 100644 experiments/selection/P800-9/config/P800-9-cat2.yml create mode 100644 experiments/selection/P800-9/config/P800-9-cat3.yml create mode 100644 experiments/selection/P800-9/config/P800-9-cat4.yml create mode 100644 experiments/selection/P800-9/config/P800-9-cat5.yml create mode 100644 experiments/selection/P800-9/config/P800-9-cat6.yml create mode 100644 experiments/selection/P800-9/proc_input/cat1/.gitkeep create mode 100644 experiments/selection/P800-9/proc_input/cat2/.gitkeep create mode 100644 experiments/selection/P800-9/proc_input/cat3/.gitkeep create mode 100644 experiments/selection/P800-9/proc_input/cat4/.gitkeep create mode 100644 experiments/selection/P800-9/proc_input/cat5/.gitkeep create mode 100644 experiments/selection/P800-9/proc_input/cat6/.gitkeep diff --git a/experiments/selection/P800-8/config/P800-8.yml b/experiments/selection/P800-8/config/P800-8-cat1.yml similarity index 97% rename from experiments/selection/P800-8/config/P800-8.yml rename to experiments/selection/P800-8/config/P800-8-cat1.yml index 19f2fd56..cf89a878 100644 --- a/experiments/selection/P800-8/config/P800-8.yml +++ b/experiments/selection/P800-8/config/P800-8-cat1.yml @@ -6,10 +6,11 @@ name: P800-8 master_seed: 5 prerun_seed: 2 -multiprocessing: false -input_path: "experiments/selection/P800-8/proc_input" -output_path: "experiments/selection/P800-8/proc_output" +input_path: "experiments/selection/P800-8/proc_input/cat1" +output_path: "experiments/selection/P800-8/proc_output/cat1" +use_windows_codec_binaries: true +condition_in_output_filename: true ################################################ ### Input configuration diff --git a/experiments/selection/P800-8/config/P800-8-cat2.yml b/experiments/selection/P800-8/config/P800-8-cat2.yml new file mode 100644 index 00000000..56d1df23 --- /dev/null +++ b/experiments/selection/P800-8/config/P800-8-cat2.yml @@ -0,0 +1,365 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-8 +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/P800-8/proc_input/cat2" +output_path: "experiments/selection/P800-8/proc_output/cat2" +use_windows_codec_binaries: true +condition_in_output_filename: true + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + 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: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 8000 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c19: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + tx: + type: "FER" + error_rate: 5 + c22: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c23: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c24: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c25: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c26: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c27: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + + ### IVAS condition ############################### + c28: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c36: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c37: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c38: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c39: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c40: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-8/config/P800-8-cat3.yml b/experiments/selection/P800-8/config/P800-8-cat3.yml new file mode 100644 index 00000000..068c3d2a --- /dev/null +++ b/experiments/selection/P800-8/config/P800-8-cat3.yml @@ -0,0 +1,365 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-8 +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/P800-8/proc_input/cat3" +output_path: "experiments/selection/P800-8/proc_output/cat3" +use_windows_codec_binaries: true +condition_in_output_filename: true + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + 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: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 8000 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c19: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + tx: + type: "FER" + error_rate: 5 + c22: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c23: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c24: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c25: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c26: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c27: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + + ### IVAS condition ############################### + c28: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c36: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c37: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c38: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c39: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c40: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-8/config/P800-8-cat4.yml b/experiments/selection/P800-8/config/P800-8-cat4.yml new file mode 100644 index 00000000..4703581f --- /dev/null +++ b/experiments/selection/P800-8/config/P800-8-cat4.yml @@ -0,0 +1,365 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-8 +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/P800-8/proc_input/cat4" +output_path: "experiments/selection/P800-8/proc_output/cat4" +use_windows_codec_binaries: true +condition_in_output_filename: true + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + 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: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 8000 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c19: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + tx: + type: "FER" + error_rate: 5 + c22: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c23: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c24: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c25: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c26: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c27: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + + ### IVAS condition ############################### + c28: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c36: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c37: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c38: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c39: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c40: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-8/config/P800-8-cat5.yml b/experiments/selection/P800-8/config/P800-8-cat5.yml new file mode 100644 index 00000000..bfebe93e --- /dev/null +++ b/experiments/selection/P800-8/config/P800-8-cat5.yml @@ -0,0 +1,365 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-8 +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/P800-8/proc_input/cat5" +output_path: "experiments/selection/P800-8/proc_output/cat5" +use_windows_codec_binaries: true +condition_in_output_filename: true + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + 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: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 8000 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c19: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + tx: + type: "FER" + error_rate: 5 + c22: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c23: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c24: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c25: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c26: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c27: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + + ### IVAS condition ############################### + c28: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c36: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c37: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c38: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c39: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c40: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-8/config/P800-8-cat6.yml b/experiments/selection/P800-8/config/P800-8-cat6.yml new file mode 100644 index 00000000..641efed6 --- /dev/null +++ b/experiments/selection/P800-8/config/P800-8-cat6.yml @@ -0,0 +1,365 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-8 +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/P800-8/proc_input/cat6" +output_path: "experiments/selection/P800-8/proc_output/cat6" +use_windows_codec_binaries: true +condition_in_output_filename: true + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + 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: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 8000 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c19: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + tx: + type: "FER" + error_rate: 5 + c22: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c23: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c24: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c25: + type: evs + bitrates: + - 13200 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c26: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + c27: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + tx: + type: "FER" + error_rate: 5 + + ### IVAS condition ############################### + c28: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c36: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c37: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c38: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c39: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + c40: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + tx: + type: "FER" + error_rate: 5 + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-8/proc_input/cat1/.gitkeep b/experiments/selection/P800-8/proc_input/cat1/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-8/proc_input/cat2/.gitkeep b/experiments/selection/P800-8/proc_input/cat2/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-8/proc_input/cat3/.gitkeep b/experiments/selection/P800-8/proc_input/cat3/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-8/proc_input/cat4/.gitkeep b/experiments/selection/P800-8/proc_input/cat4/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-8/proc_input/cat5/.gitkeep b/experiments/selection/P800-8/proc_input/cat5/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-8/proc_input/cat6/.gitkeep b/experiments/selection/P800-8/proc_input/cat6/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-9/config/P800-9.yml b/experiments/selection/P800-9/config/P800-9-cat1.yml similarity index 96% rename from experiments/selection/P800-9/config/P800-9.yml rename to experiments/selection/P800-9/config/P800-9-cat1.yml index b74980b2..b1b91db7 100644 --- a/experiments/selection/P800-9/config/P800-9.yml +++ b/experiments/selection/P800-9/config/P800-9-cat1.yml @@ -6,10 +6,11 @@ name: P800-9 master_seed: 5 prerun_seed: 2 -multiprocessing: false -input_path: "experiments/selection/P800-9/proc_input" -output_path: "experiments/selection/P800-9/proc_output" +input_path: "experiments/selection/P800-9/proc_input/cat1" +output_path: "experiments/selection/P800-9/proc_output/cat1" +use_windows_codec_binaries: true +condition_in_output_filename: true ################################################ ### Input configuration @@ -38,7 +39,7 @@ preprocessing_2: ### REQUIRED: SNR for background noise in dB snr: 15 ### REQUIRED: Path to background noise, must have same format and sampling rate as input signal(s) - background_noise_path: "experiments/selection/P800-9/background_noise/background_noise.wav" + background_noise_path: "experiments/selection/P800-9/background_noise/background_noise_cat1.wav" ################################################# ### Bitstream processing diff --git a/experiments/selection/P800-9/config/P800-9-cat2.yml b/experiments/selection/P800-9/config/P800-9-cat2.yml new file mode 100644 index 00000000..1ed2b89c --- /dev/null +++ b/experiments/selection/P800-9/config/P800-9-cat2.yml @@ -0,0 +1,307 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-9 +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/P800-9/proc_input/cat2" +output_path: "experiments/selection/P800-9/proc_output/cat2" +use_windows_codec_binaries: true +condition_in_output_filename: true + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + preamble: 10000 + preamble_noise: true + background_noise: + ### REQUIRED: SNR for background noise in dB + snr: 15 + ### REQUIRED: Path to background noise, must have same format and sampling rate as input signal(s) + background_noise_path: "experiments/selection/P800-9/background_noise/background_noise_cat2.wav" + +################################################# +### Bitstream processing +################################################# + +################################################ +### Configuration for conditions under test +################################################ +conditions_to_generate: + ### Reference and anchor conditions ########################## + c01: + type: ref + c02: + type: mnru + q: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c19: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c22: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c23: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + + ### IVAS condition ############################### + c24: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c25: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c26: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c27: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c28: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c36: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-9/config/P800-9-cat3.yml b/experiments/selection/P800-9/config/P800-9-cat3.yml new file mode 100644 index 00000000..6a3cd9c6 --- /dev/null +++ b/experiments/selection/P800-9/config/P800-9-cat3.yml @@ -0,0 +1,307 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-9 +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/P800-9/proc_input/cat3" +output_path: "experiments/selection/P800-9/proc_output/cat3" +use_windows_codec_binaries: true +condition_in_output_filename: true + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + preamble: 10000 + preamble_noise: true + background_noise: + ### REQUIRED: SNR for background noise in dB + snr: 15 + ### REQUIRED: Path to background noise, must have same format and sampling rate as input signal(s) + background_noise_path: "experiments/selection/P800-9/background_noise/background_noise_cat3.wav" + +################################################# +### Bitstream processing +################################################# + +################################################ +### Configuration for conditions under test +################################################ +conditions_to_generate: + ### Reference and anchor conditions ########################## + c01: + type: ref + c02: + type: mnru + q: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c19: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c22: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c23: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + + ### IVAS condition ############################### + c24: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c25: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c26: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c27: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c28: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c36: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-9/config/P800-9-cat4.yml b/experiments/selection/P800-9/config/P800-9-cat4.yml new file mode 100644 index 00000000..e10f73a9 --- /dev/null +++ b/experiments/selection/P800-9/config/P800-9-cat4.yml @@ -0,0 +1,307 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-9 +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/P800-9/proc_input/cat4" +output_path: "experiments/selection/P800-9/proc_output/cat4" +use_windows_codec_binaries: true +condition_in_output_filename: true + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + preamble: 10000 + preamble_noise: true + background_noise: + ### REQUIRED: SNR for background noise in dB + snr: 15 + ### REQUIRED: Path to background noise, must have same format and sampling rate as input signal(s) + background_noise_path: "experiments/selection/P800-9/background_noise/background_noise_cat4.wav" + +################################################# +### Bitstream processing +################################################# + +################################################ +### Configuration for conditions under test +################################################ +conditions_to_generate: + ### Reference and anchor conditions ########################## + c01: + type: ref + c02: + type: mnru + q: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c19: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c22: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c23: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + + ### IVAS condition ############################### + c24: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c25: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c26: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c27: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c28: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c36: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-9/config/P800-9-cat5.yml b/experiments/selection/P800-9/config/P800-9-cat5.yml new file mode 100644 index 00000000..1c1930e6 --- /dev/null +++ b/experiments/selection/P800-9/config/P800-9-cat5.yml @@ -0,0 +1,307 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-9 +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/P800-9/proc_input/cat5" +output_path: "experiments/selection/P800-9/proc_output/cat5" +use_windows_codec_binaries: true +condition_in_output_filename: true + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + preamble: 10000 + preamble_noise: true + background_noise: + ### REQUIRED: SNR for background noise in dB + snr: 15 + ### REQUIRED: Path to background noise, must have same format and sampling rate as input signal(s) + background_noise_path: "experiments/selection/P800-9/background_noise/background_noise_cat5.wav" + +################################################# +### Bitstream processing +################################################# + +################################################ +### Configuration for conditions under test +################################################ +conditions_to_generate: + ### Reference and anchor conditions ########################## + c01: + type: ref + c02: + type: mnru + q: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c19: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c22: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c23: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + + ### IVAS condition ############################### + c24: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c25: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c26: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c27: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c28: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c36: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-9/config/P800-9-cat6.yml b/experiments/selection/P800-9/config/P800-9-cat6.yml new file mode 100644 index 00000000..e6dcc3dc --- /dev/null +++ b/experiments/selection/P800-9/config/P800-9-cat6.yml @@ -0,0 +1,307 @@ +--- +################################################ +# General configuration +################################################ + +name: P800-9 +master_seed: 5 +prerun_seed: 2 + +input_path: "experiments/selection/P800-9/proc_input/cat6" +output_path: "experiments/selection/P800-9/proc_output/cat6" +use_windows_codec_binaries: true +condition_in_output_filename: true + +################################################ +### Input configuration +################################################ +input: + fmt: "FOA" + fs: 48000 + +################################################ +### Pre-processing on individual items +################################################ +preprocessing: + mask: "HP50" + loudness: -26 + window: 100 + +################################################ +### Pre-processing on whole signal(s) +################################################ +preprocessing_2: + concatenate_input: true + # concatenation_order: [] + preamble: 10000 + preamble_noise: true + background_noise: + ### REQUIRED: SNR for background noise in dB + snr: 15 + ### REQUIRED: Path to background noise, must have same format and sampling rate as input signal(s) + background_noise_path: "experiments/selection/P800-9/background_noise/background_noise_cat6.wav" + +################################################# +### Bitstream processing +################################################# + +################################################ +### Configuration for conditions under test +################################################ +conditions_to_generate: + ### Reference and anchor conditions ########################## + c01: + type: ref + c02: + type: mnru + q: 32 + c03: + type: mnru + q: 27 + c04: + type: mnru + q: 22 + c05: + type: mnru + q: 17 + c06: + type: esdru + alpha: 0.8 + c07: + type: esdru + alpha: 0.675 + c08: + type: esdru + alpha: 0.55 + + # ### EVS condition ################################ + c09: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c10: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c11: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c12: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c13: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c14: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + c15: + type: evs + bitrates: + - 7200 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c16: + type: evs + bitrates: + - 9600 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c17: + type: evs + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx", "-max_band", "FB"] + dec: + c18: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + sba_format: "PLANARFOA" + c19: + type: evs + bitrates: + - 7200 + cod: + opts: ["-max_band", "FB"] + dec: + c20: + type: evs + bitrates: + - 8000 + cod: + opts: ["-max_band", "FB"] + dec: + c21: + type: evs + bitrates: + - 9600 + cod: + opts: ["-max_band", "FB"] + dec: + c22: + type: evs + bitrates: + - 16400 + cod: + opts: ["-max_band", "FB"] + dec: + c23: + type: evs + bitrates: + - 24400 + cod: + opts: ["-max_band", "FB"] + dec: + + ### IVAS condition ############################### + c24: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c25: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c26: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c27: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c28: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c29: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c30: + type: ivas + bitrates: + - 80000 + cod: + fmt: "MASA2" + dec: + fmt: "MASA2" + c31: + type: ivas + bitrates: + - 13200 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c32: + type: ivas + bitrates: + - 16400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c33: + type: ivas + bitrates: + - 24400 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c34: + type: ivas + bitrates: + - 32000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c35: + type: ivas + bitrates: + - 48000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + c36: + type: ivas + bitrates: + - 64000 + cod: + fmt: "MASA2" + opts: ["-dtx"] + dec: + fmt: "MASA2" + +################################################ +### Post-processing +################################################ +postprocessing: + fmt: ["MASA2", "BINAURAL"] + fs: 48000 + loudness: -26 diff --git a/experiments/selection/P800-9/proc_input/cat1/.gitkeep b/experiments/selection/P800-9/proc_input/cat1/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-9/proc_input/cat2/.gitkeep b/experiments/selection/P800-9/proc_input/cat2/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-9/proc_input/cat3/.gitkeep b/experiments/selection/P800-9/proc_input/cat3/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-9/proc_input/cat4/.gitkeep b/experiments/selection/P800-9/proc_input/cat4/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-9/proc_input/cat5/.gitkeep b/experiments/selection/P800-9/proc_input/cat5/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/experiments/selection/P800-9/proc_input/cat6/.gitkeep b/experiments/selection/P800-9/proc_input/cat6/.gitkeep new file mode 100644 index 00000000..e69de29b -- GitLab From 684171de56543d03b8edfa1657d23013147940f7 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 26 May 2023 15:56:51 +0200 Subject: [PATCH 33/35] fix formatting --- create_items_p800.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_items_p800.py b/create_items_p800.py index f9a1985b..dc4d747b 100644 --- a/create_items_p800.py +++ b/create_items_p800.py @@ -21,7 +21,7 @@ def create_items(testname): p800_cfgs = p800_path.joinpath("config").glob("P800*cat*.yml") args = [Arguments(str(cfg)) for cfg in p800_cfgs] - apply_func_parallel(generate_test, zip( args ), type="mp") + apply_func_parallel(generate_test, zip(args), type="mp") # if is necessary here so that multiprocessing does not crash -- GitLab From 7143bb2e2d4a9f67b148c15d53400ff940d71cac Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 26 May 2023 16:23:06 +0200 Subject: [PATCH 34/35] add directory for background noise in P800-9 --- experiments/selection/P800-9/background_noise/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 experiments/selection/P800-9/background_noise/.gitkeep diff --git a/experiments/selection/P800-9/background_noise/.gitkeep b/experiments/selection/P800-9/background_noise/.gitkeep new file mode 100644 index 00000000..e69de29b -- GitLab From f36b8ef6b10ca46f0c1ac3000d36111c416d4fef Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 26 May 2023 16:25:45 +0200 Subject: [PATCH 35/35] add missing keys in MASA BS1534 experiments --- experiments/selection/BS1534-7a/config/BS1534-7a.yml | 2 ++ experiments/selection/BS1534-7b/config/BS1534-7b.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/experiments/selection/BS1534-7a/config/BS1534-7a.yml b/experiments/selection/BS1534-7a/config/BS1534-7a.yml index 6a11cd6e..b92ae405 100644 --- a/experiments/selection/BS1534-7a/config/BS1534-7a.yml +++ b/experiments/selection/BS1534-7a/config/BS1534-7a.yml @@ -9,6 +9,8 @@ prerun_seed: 2 input_path: "experiments/selection/BS1534-7a/proc_input" output_path: "experiments/selection/BS1534-7a/proc_output" +use_windows_codec_binaries: true +condition_in_output_filename: true ################################################ ### Input configuration diff --git a/experiments/selection/BS1534-7b/config/BS1534-7b.yml b/experiments/selection/BS1534-7b/config/BS1534-7b.yml index c0f907cf..d4984f4d 100644 --- a/experiments/selection/BS1534-7b/config/BS1534-7b.yml +++ b/experiments/selection/BS1534-7b/config/BS1534-7b.yml @@ -9,6 +9,8 @@ prerun_seed: 2 input_path: "experiments/selection/BS1534-7b/proc_input" output_path: "experiments/selection/BS1534-7b/proc_output" +use_windows_codec_binaries: true +condition_in_output_filename: true ################################################ ### Input configuration -- GitLab