diff --git a/experiments/selection/P800-9/config/P800-9-cat1.yml b/experiments/selection/P800-9/config/P800-9-cat1.yml index 6c1e483aa877bdb85671001d4292be6396a54f67..14e85e8c4bdf2793b7817e3b3d66ff6a0882fce4 100644 --- a/experiments/selection/P800-9/config/P800-9-cat1.yml +++ b/experiments/selection/P800-9/config/P800-9-cat1.yml @@ -40,6 +40,7 @@ preprocessing_2: snr: 10 ### 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_cat1.wav" + repeat_signal: true ################################################# ### Bitstream processing diff --git a/experiments/selection/P800-9/config/P800-9-cat2.yml b/experiments/selection/P800-9/config/P800-9-cat2.yml index f18ca64084d00d205409a1b01182f8f196852733..37fefcee37904bf3879e2701a26bb11346096da6 100644 --- a/experiments/selection/P800-9/config/P800-9-cat2.yml +++ b/experiments/selection/P800-9/config/P800-9-cat2.yml @@ -40,6 +40,7 @@ preprocessing_2: snr: 10 ### 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" + repeat_signal: true ################################################# ### Bitstream processing diff --git a/experiments/selection/P800-9/config/P800-9-cat3.yml b/experiments/selection/P800-9/config/P800-9-cat3.yml index 5df21adc3e021f9cf3e519bca7793f85933723e7..ebd7e193a3e4dabda2850fbd621905da449ee7b6 100644 --- a/experiments/selection/P800-9/config/P800-9-cat3.yml +++ b/experiments/selection/P800-9/config/P800-9-cat3.yml @@ -40,6 +40,7 @@ preprocessing_2: 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" + repeat_signal: true ################################################# ### Bitstream processing diff --git a/experiments/selection/P800-9/config/P800-9-cat4.yml b/experiments/selection/P800-9/config/P800-9-cat4.yml index eebf2f4e773efc7b16952f25ea3c26d1debed619..c7579d70cd4b06ea5fd80236eb8e94d95210d075 100644 --- a/experiments/selection/P800-9/config/P800-9-cat4.yml +++ b/experiments/selection/P800-9/config/P800-9-cat4.yml @@ -40,6 +40,7 @@ preprocessing_2: 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" + repeat_signal: true ################################################# ### Bitstream processing diff --git a/experiments/selection/P800-9/config/P800-9-cat5.yml b/experiments/selection/P800-9/config/P800-9-cat5.yml index b5b9e6c3894abbdbb76d6dfe6cf8b0ee73c840e6..77e54cab7172641098e5d530e58fea548a091a54 100644 --- a/experiments/selection/P800-9/config/P800-9-cat5.yml +++ b/experiments/selection/P800-9/config/P800-9-cat5.yml @@ -40,6 +40,7 @@ preprocessing_2: 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" + repeat_signal: true ################################################# ### Bitstream processing diff --git a/experiments/selection/P800-9/config/P800-9-cat6.yml b/experiments/selection/P800-9/config/P800-9-cat6.yml index 94be0bbd0994c8c271aca68e435817d5e970e9c7..11c317df1e3125266f17457a7549176b29e6adda 100644 --- a/experiments/selection/P800-9/config/P800-9-cat6.yml +++ b/experiments/selection/P800-9/config/P800-9-cat6.yml @@ -40,6 +40,7 @@ preprocessing_2: 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" + repeat_signal: true ################################################# ### Bitstream processing diff --git a/ivas_processing_scripts/audiotools/convert/scenebased.py b/ivas_processing_scripts/audiotools/convert/scenebased.py index 7c44897d4f62aedf3d72b7d26d571f11a1dd8859..9a5f2729734a204d71dde582ada3b2bc4206a902 100755 --- a/ivas_processing_scripts/audiotools/convert/scenebased.py +++ b/ivas_processing_scripts/audiotools/convert/scenebased.py @@ -79,8 +79,8 @@ 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") or sba.name == "HOA2" ): render_sba_to_masa(sba, out) @@ -196,8 +196,10 @@ 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 + if sba_in.name == "HOA2": + num_dirs = 2 + 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 961c987ff12f74eb3f543a0d075d58dcb7552db7..0ded643deb736542edb85ba51e43e140fec8bb8e 100644 --- a/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py +++ b/ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py @@ -77,6 +77,9 @@ def masaAnalyzer( if sba.name not in ["PLANARFOA", "FOA", "HOA2"]: raise ValueError(f"Only FOA or HOA2 suported, but {sba.name} was given.") + if num_dirs == 2 and sba.name != "HOA2": + raise ValueError(f"2-dir MASA needs HOA2, but {sba.name} was given.") + cmd = [ str(binary), "-mono" if num_tcs == 1 else "-stereo",