Commit 700c74b8 authored by Anika Treffehn's avatar Anika Treffehn
Browse files

Merge branch 'main' of...

Merge branch 'main' of https://forge.3gpp.org/rep/ivas-codec-pc/ivas-processing-scripts into background_noise_modification
parents a67b7c94 a25aa301
Loading
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
__pycache__/
__pycache__/
venv/
*.py[cod]
*$py.class
@@ -11,4 +11,8 @@ venv/
*.pcm
*.bs
*.192
mc.double
proc_input/*.wav
proc_input/*.pcm
proc_output/
*~
+5 −1
Original line number Diff line number Diff line
@@ -53,12 +53,16 @@ The `ivas_processing_scripts` module helps to quickly setup listening tests with

This module may be used by executing the top level python module i.e. `python -m ivas_processing_scripts CONFIG.YML`.

## Configuration file
## Configuration file for processing module

The processing module can be configured to set up a test via a YAML configuration file.

YAML is a superset of JSON, however unlike JSON comments are permitted, which allows for the addition of useful information in the configuration file.

## Configuration file for binaries/executables

The user can specify custom binary paths and names via a YAML configuration file called [_binary_paths.yml_](ivas_processing_scripts/binary_paths.yml). More information on usage can be found in the comments mentioned in the file.

## YAML reference

A read through of the YAML reference card is highly recommended. This can be found here: <https://yaml.org/refcard.html>
+11 −0
Original line number Diff line number Diff line
@@ -95,6 +95,8 @@ input:
    ### Specify the concatenation order in a list of strings. If not specified, the concatenation order would be
    ### as per the filesystem on the users' device
    ### Should only be used if concatenate_input = true
    ### Specify the filename with extension.
    ### For example, concatenation_order: ["file3.wav", "file1.wav", "file4.wav", "file2.wav"]
    # concatenation_order: []
    ### Specify preamble duration in ms; default = 0
    # preamble: 10000
@@ -201,6 +203,9 @@ conditions_to_generate:
          # fs: 48000
          ### Additional commandline options; default = null
          # opts: ["-q", "-no_delay_cmp"]
      ### Bitstream options
      # tx:
          ### For possible arguments see overall bitstream modification

  ### IVAS condition ###############################
  c07:
@@ -228,6 +233,9 @@ conditions_to_generate:
          # fs: 48000
          ### Additional commandline options; default = null
          # opts: ["-q", "-no_delay_cmp"]
      ### Bitstream options
      # tx:
          ### For possible arguments see overall bitstream modification
            
  ### EVS condition ################################
  c08:
@@ -249,6 +257,9 @@ conditions_to_generate:
          bin: ~/git/ivas-codec/IVAS_dec
          ### Decoder output sampling rate; default = null (same as input)
          # fs: 48000
      ### Bitstream options
      # tx:
          ### For possible arguments see overall bitstream modification

################################################
### Post-processing
+8 −1
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import numpy as np
from ivas_processing_scripts.audiotools import audio, convert
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, get_devnull, run

logger = logging.getLogger("__main__")
@@ -72,6 +73,12 @@ def bs1770demo(

    null_file = get_devnull()

    if "bs1770demo" in DEFAULT_CONFIG_BINARIES["binary_paths"]:
        binary = find_binary(
            DEFAULT_CONFIG_BINARIES["binary_paths"]["bs1770demo"].name,
            binary_path=DEFAULT_CONFIG_BINARIES["binary_paths"]["bs1770demo"].parent,
        )
    else:
        binary = find_binary("bs1770demo")

    if not isinstance(input, audio.BinauralAudio) and not isinstance(
+8 −1
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ from pathlib import Path
from typing import Optional, Union

from ivas_processing_scripts.audiotools.wrappers.gen_patt import create_error_pattern
from ivas_processing_scripts.constants import DEFAULT_CONFIG_BINARIES
from ivas_processing_scripts.utils import find_binary, run


@@ -57,6 +58,12 @@ def eid_xor(
    """

    # find binary
    if "eid-xor" in DEFAULT_CONFIG_BINARIES["binary_paths"]:
        binary = find_binary(
            DEFAULT_CONFIG_BINARIES["binary_paths"]["eid-xor"].name,
            binary_path=DEFAULT_CONFIG_BINARIES["binary_paths"]["eid-xor"].parent,
        )
    else:
        binary = find_binary("eid-xor")

    # check for valid inputs
Loading