Loading ivas_processing_scripts/__init__.py +1 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,7 @@ def main(args): hasattr(cfg, "preprocessing") and hasattr(cfg.pre2, "background_noise") and cfg.pre2.background_noise is not None and cfg.pre2.background_noise.get("background_noise_path") ): preprocess_background_noise(cfg) # preprocess 2 Loading ivas_processing_scripts/processing/chains.py +0 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ # the United Nations Convention on Contracts on the International Sales of Goods. # from pathlib import Path from typing import Optional from warnings import warn Loading ivas_processing_scripts/processing/config.py +1 −2 Original line number Diff line number Diff line Loading @@ -143,7 +143,6 @@ class TestConfig: if (pre_proc_2 := cfg.get("preprocessing_2", None)) is not None and ( bg_noise := pre_proc_2.get("background_noise", None) ) is not None: # check if low level flag or path is given if not bg_noise.get("background_noise_path", None) and not bg_noise.get( "low_level_noise", False Loading @@ -165,7 +164,7 @@ class TestConfig: if not bg_noise.get("snr", None): raise ValueError("SNR has to be specified for background noise") if not Path(bg_noise["background_noise_path"]).exists(): if not get_abs_path(bg_noise["background_noise_path"]).exists(): raise ValueError( f"Background noise path {bg_noise['background_noise_path']} does not exist" ) Loading ivas_processing_scripts/processing/preprocessing_2.py +0 −2 Original line number Diff line number Diff line Loading @@ -108,13 +108,11 @@ class Preprocessing2(Processing): def add_background_noise( self, audio_object: audio.Audio, in_meta, logger ) -> np.ndarray: # range for random delay max_delay = int(2400000 * audio_object.fs / 48000) if self.background_noise.get("background_noise_path"): # load background noise # TODO: check preprocessing of background noise object if self.background_noise["background_object"] is not None: noise_object = self.background_noise["background_object"] else: Loading README.md +1 −1 File changed.Contains only whitespace changes. Show changes Loading
ivas_processing_scripts/__init__.py +1 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,7 @@ def main(args): hasattr(cfg, "preprocessing") and hasattr(cfg.pre2, "background_noise") and cfg.pre2.background_noise is not None and cfg.pre2.background_noise.get("background_noise_path") ): preprocess_background_noise(cfg) # preprocess 2 Loading
ivas_processing_scripts/processing/chains.py +0 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ # the United Nations Convention on Contracts on the International Sales of Goods. # from pathlib import Path from typing import Optional from warnings import warn Loading
ivas_processing_scripts/processing/config.py +1 −2 Original line number Diff line number Diff line Loading @@ -143,7 +143,6 @@ class TestConfig: if (pre_proc_2 := cfg.get("preprocessing_2", None)) is not None and ( bg_noise := pre_proc_2.get("background_noise", None) ) is not None: # check if low level flag or path is given if not bg_noise.get("background_noise_path", None) and not bg_noise.get( "low_level_noise", False Loading @@ -165,7 +164,7 @@ class TestConfig: if not bg_noise.get("snr", None): raise ValueError("SNR has to be specified for background noise") if not Path(bg_noise["background_noise_path"]).exists(): if not get_abs_path(bg_noise["background_noise_path"]).exists(): raise ValueError( f"Background noise path {bg_noise['background_noise_path']} does not exist" ) Loading
ivas_processing_scripts/processing/preprocessing_2.py +0 −2 Original line number Diff line number Diff line Loading @@ -108,13 +108,11 @@ class Preprocessing2(Processing): def add_background_noise( self, audio_object: audio.Audio, in_meta, logger ) -> np.ndarray: # range for random delay max_delay = int(2400000 * audio_object.fs / 48000) if self.background_noise.get("background_noise_path"): # load background noise # TODO: check preprocessing of background noise object if self.background_noise["background_object"] is not None: noise_object = self.background_noise["background_object"] else: Loading