Loading README.md +10 −1 Original line number Diff line number Diff line Loading @@ -435,6 +435,13 @@ conditions_to_generate: # fs: 48000 ### Additional commandline options; default = null # opts: ["-q", "-no_delay_cmp"] ### Per-item renderer configuration. Set to true to search for a file with suffix .cfg; default = false # render_config: true ### Head-tracking trajectory file for binaural output OR 'true' which will search for a file with the suffix .ht.csv next to the input; default = null ### NOTE: this automatically configures the '-T' argument to the decoder, so may conflict if also specified in `opts` # trajectory: "path/to/file" ### Limit the trajectory to 3DoF via truncation; default = false # only_3dof: false ### IVAS condition ############################### c07: Loading Loading @@ -520,8 +527,10 @@ postprocessing: # bin_lfe_gain: 1 ### Flag whether output should be limited to avoid clipping (can alter target loudness); default = true # limit: false ### Head-tracking trajectory file for binaural output; default = null ### Head-tracking trajectory file for binaural output OR 'true' which will search for a file with the suffix .ht.csv in the input dir; default = null # trajectory: "path/to/file" ### Limit the trajectory to 3DoF via truncation; default = false # only_3dof: false ``` </details> Loading examples/TEMPLATE.yml +24 −15 Original line number Diff line number Diff line Loading @@ -290,6 +290,13 @@ conditions_to_generate: # fs: 48000 ### Additional commandline options; default = null # opts: ["-q", "-no_delay_cmp"] ### Per-item renderer configuration. Set to true to search for a file with suffix .cfg in the input dir; default = false # render_config: true ### Head-tracking trajectory file for binaural output OR 'true' which will search for a file with the suffix .ht.csv in the input dir; default = null ### NOTE: this automatically configures the '-T' argument to the decoder, so may conflict if also specified in `opts` # trajectory: "path/to/file" ### Limit the trajectory to 3DoF via truncation; default = false # only_3dof: false ### Bitstream options # tx: ### For possible arguments see overall bitstream modification Loading Loading @@ -352,5 +359,7 @@ postprocessing: # bin_lfe_gain: 1 ### Flag whether output should be limited to avoid clipping (can alter target loudness); default = false # limit: true ### Head-tracking trajectory file for binaural output; default = null ### Head-tracking trajectory file for binaural output OR 'true' which will search for a file with the suffix .ht.csv in the input dir; default = null # trajectory: "path/to/file" ### Limit the trajectory to 3DoF via truncation; default = false # only_3dof: false ivas_processing_scripts/audiotools/audio.py +0 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,6 @@ class Audio(ABC): self.audio = None self.fs = None self.num_channels = None # self.logger = None # TODO needed? def __repr__(self): return f"{self.__class__} : {self.__dict__}" Loading ivas_processing_scripts/audiotools/convert/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ def process_audio( if loudness is not None: if logger: logger.debug( f"Applying loudness adjustment to {loudness} LKFS for format {loudness_fmt} using ITU STL bs1770demo" f"Applying loudness adjustment to {loudness} LKFS for format {x.name} (measured using {loudness_fmt}) using ITU STL bs1770demo" ) x.audio, _ = loudness_norm(x, loudness, loudness_fmt, logger=logger) Loading ivas_processing_scripts/audiotools/utils.py +28 −0 Original line number Diff line number Diff line Loading @@ -31,10 +31,12 @@ # from pathlib import Path from typing import Union import numpy as np from ivas_processing_scripts.audiotools.rotation import Euler2Quat, Quat2Euler from ivas_processing_scripts.utils import get_abs_path def read_trajectory(trj_file: Path, return_quat=True): Loading Loading @@ -69,3 +71,29 @@ def write_trajectory(trj, out_file, write_quat=True): for pos in trj: f.write(", ".join([f"{q:.6f}" for q in pos])) f.write("\n") def get_trajectory_or_dir( trj: Union[str, Path, bool], input_path: Path ) -> tuple[Path, Path]: trajectory = None trajectory_dir = None if isinstance(trj, bool): trajectory_dir = input_path else: trajectory = get_abs_path(trj) return trajectory, trajectory_dir def truncate_trajectory_3dof( in_file: Path, out_file: Path, ) -> None: data = np.genfromtxt(in_file, delimiter=",") data = data[:, :4] with open(out_file, "w") as f: for pos in data: f.write(", ".join([f"{q:.6f}" for q in pos])) f.write("\n") Loading
README.md +10 −1 Original line number Diff line number Diff line Loading @@ -435,6 +435,13 @@ conditions_to_generate: # fs: 48000 ### Additional commandline options; default = null # opts: ["-q", "-no_delay_cmp"] ### Per-item renderer configuration. Set to true to search for a file with suffix .cfg; default = false # render_config: true ### Head-tracking trajectory file for binaural output OR 'true' which will search for a file with the suffix .ht.csv next to the input; default = null ### NOTE: this automatically configures the '-T' argument to the decoder, so may conflict if also specified in `opts` # trajectory: "path/to/file" ### Limit the trajectory to 3DoF via truncation; default = false # only_3dof: false ### IVAS condition ############################### c07: Loading Loading @@ -520,8 +527,10 @@ postprocessing: # bin_lfe_gain: 1 ### Flag whether output should be limited to avoid clipping (can alter target loudness); default = true # limit: false ### Head-tracking trajectory file for binaural output; default = null ### Head-tracking trajectory file for binaural output OR 'true' which will search for a file with the suffix .ht.csv in the input dir; default = null # trajectory: "path/to/file" ### Limit the trajectory to 3DoF via truncation; default = false # only_3dof: false ``` </details> Loading
examples/TEMPLATE.yml +24 −15 Original line number Diff line number Diff line Loading @@ -290,6 +290,13 @@ conditions_to_generate: # fs: 48000 ### Additional commandline options; default = null # opts: ["-q", "-no_delay_cmp"] ### Per-item renderer configuration. Set to true to search for a file with suffix .cfg in the input dir; default = false # render_config: true ### Head-tracking trajectory file for binaural output OR 'true' which will search for a file with the suffix .ht.csv in the input dir; default = null ### NOTE: this automatically configures the '-T' argument to the decoder, so may conflict if also specified in `opts` # trajectory: "path/to/file" ### Limit the trajectory to 3DoF via truncation; default = false # only_3dof: false ### Bitstream options # tx: ### For possible arguments see overall bitstream modification Loading Loading @@ -352,5 +359,7 @@ postprocessing: # bin_lfe_gain: 1 ### Flag whether output should be limited to avoid clipping (can alter target loudness); default = false # limit: true ### Head-tracking trajectory file for binaural output; default = null ### Head-tracking trajectory file for binaural output OR 'true' which will search for a file with the suffix .ht.csv in the input dir; default = null # trajectory: "path/to/file" ### Limit the trajectory to 3DoF via truncation; default = false # only_3dof: false
ivas_processing_scripts/audiotools/audio.py +0 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,6 @@ class Audio(ABC): self.audio = None self.fs = None self.num_channels = None # self.logger = None # TODO needed? def __repr__(self): return f"{self.__class__} : {self.__dict__}" Loading
ivas_processing_scripts/audiotools/convert/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ def process_audio( if loudness is not None: if logger: logger.debug( f"Applying loudness adjustment to {loudness} LKFS for format {loudness_fmt} using ITU STL bs1770demo" f"Applying loudness adjustment to {loudness} LKFS for format {x.name} (measured using {loudness_fmt}) using ITU STL bs1770demo" ) x.audio, _ = loudness_norm(x, loudness, loudness_fmt, logger=logger) Loading
ivas_processing_scripts/audiotools/utils.py +28 −0 Original line number Diff line number Diff line Loading @@ -31,10 +31,12 @@ # from pathlib import Path from typing import Union import numpy as np from ivas_processing_scripts.audiotools.rotation import Euler2Quat, Quat2Euler from ivas_processing_scripts.utils import get_abs_path def read_trajectory(trj_file: Path, return_quat=True): Loading Loading @@ -69,3 +71,29 @@ def write_trajectory(trj, out_file, write_quat=True): for pos in trj: f.write(", ".join([f"{q:.6f}" for q in pos])) f.write("\n") def get_trajectory_or_dir( trj: Union[str, Path, bool], input_path: Path ) -> tuple[Path, Path]: trajectory = None trajectory_dir = None if isinstance(trj, bool): trajectory_dir = input_path else: trajectory = get_abs_path(trj) return trajectory, trajectory_dir def truncate_trajectory_3dof( in_file: Path, out_file: Path, ) -> None: data = np.genfromtxt(in_file, delimiter=",") data = data[:, :4] with open(out_file, "w") as f: for pos in data: f.write(", ".join([f"{q:.6f}" for q in pos])) f.write("\n")