Commit 1882d29d authored by Anika Treffehn's avatar Anika Treffehn
Browse files

merge main and adjust 20ms alignment

parents 369dba93 4e0775bd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -11,11 +11,11 @@ venv/
*.bs
*.192
mc.double
proc_input/*.wav
proc_input/*.pcm
proc_output/
experiments/selection/*/proc_input/*.wav
experiments/selection/*/proc_input/*.pcm
experiments/selection/*/proc_output/
*~
tests/tmp_output_*
tests/temp_output_*
tests/cut
tests/ref
tests/concatenation_folder
 No newline at end of file
+7 −1
Original line number Diff line number Diff line
@@ -81,7 +81,13 @@ experiments:
  script:
    - *print-common-info
    - *get-codec-binaries
    - python3 -m pytest -n auto tests/test_experiments.py
    - python3 -m pytest tests/test_experiments.py -n auto | tee log.txt
  artifacts:
    paths:
      - experiments/selection/*/proc_output/*.log
      - log.txt
    when: on_failure
    expire_in: 1 week

# run some test configs for item creation
test_processing:
+17 −2
Original line number Diff line number Diff line
@@ -142,6 +142,9 @@ postprocessing:
# master_seed: 5
### Additional seed to specify number of preruns (used for background noise delay and FER bitstream processing); default = 0
# prerun_seed: 2
### flag for linux to use windows-built binaries with wine: default = false
### this requires the wine binary to be available and will be ignored on windows
# use_windows_codec_binaries: true

### Any relative paths will be interpreted relative to the working directory the script is called from!
### Usage of absolute paths is recommended.
@@ -172,6 +175,10 @@ output_path: "./tmp_output"
### searches for the specified substring in found filenames; default = null
# input_select:
#  - "48kHz"

### Include the condition number in the item name; default = false
### for e.g. abcxyz.wav --> abcxyz.cXX.wav
# condition_in_output_filename: true
```

</details>
@@ -253,6 +260,8 @@ input:
        # background_noise_path: ".../noise.wav"
        ### Flag for using low level [-4,+4] background noise; default = false
        # low_level_noise: true
	### Flag for repeating the whole signal once and discarding the first half after processing
    # repeat_signal: true
```

</details>
@@ -536,7 +545,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 
@@ -677,6 +686,12 @@ ISM

---

# audiotools CLI for format conversion and rendering
# Audiotools CLI for format conversion and rendering

Please refer to [the notebook](./examples/audiotools.ipynb) for an overview.

# Selection test experiments

The folder `experiments/selection` contains a directory skeleton for processing items for the various selection test experiments including the config files. E.g. for processing the items for BS1534-1a, the input files need to be put into `experiments/selection/BS1534-1a/proc_input`, then execute `python3 -m ivas_processing_scripts experiments/selection/BS1534-1a/config/BS1534-1a.yml`. The output files will be in `experiments/selection/BS1534-1a/proc_output`, in subfolders per conditions.

Note that for P800 experiments, there are separate configs per category as different background noises need to be specified. Thus, there are several config files with `-catX` suffix available. The background noise files need to be put into `experiments/selection/P800-X/background_noise`. To generate all categories, there is a convenience script `create_items_p800.py` in the repository root folder.
 No newline at end of file

create_items_p800.py

0 → 100644
+33 −0
Original line number Diff line number Diff line
#! /usr/bin/env python3
import argparse
from pathlib import Path

from ivas_processing_scripts import main as generate_test
from ivas_processing_scripts.utils import apply_func_parallel

P800_TESTS = [f"P800-{i}" for i in range(1, 8)]


class Arguments:
    def __init__(self, config):
        self.config = config
        self.debug = False
        # used to overwrite the multiprocessing key in the configs to rather parallelize on category level
        self.multiprocessing = False


def create_items(testname):
    p800_path = Path(f"experiments/selection/{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")


# if is necessary here so that multiprocessing does not crash
if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("testname", choices=P800_TESTS)
    args = parser.parse_args()

    create_items(args.testname)
+11 −3
Original line number Diff line number Diff line
@@ -18,15 +18,19 @@
# master_seed: 5
### Additional seed to specify number of preruns (used for background noise delay and FER bitstream processing); default = 0
# prerun_seed: 2
### flag for linux to use windows-built binaries with wine: default = false
### this requires the wine binary to be available and will be ignored on windows
# use_windows_codec_binaries: true

### Any relative paths will be interpreted relative to the working directory the script is called from!
### Usage of absolute paths is recommended.
### Do not use file names with dots "." in them! This is not supported, use "_" instead
### For Windows user: please use double back slash '\\' in paths and add '.exe' to executable definitions
### Do not use "tmp_" in file or folder names ("temp_" is fine)
### For Windows user: please use double back slash '\\' in paths
### REQUIRED: Input path or file
input_path: ".../ivas/items/HOA3"
### REQUIRED: Output path or file
output_path: ".../tmp_output"
output_path: ".../temp_output"
### Metadata path or file(s)
### If input format is ISM{1-4} a path for the metadata files can be specified;
### default = null (for ISM search for item_name.{wav, raw, pcm}.{0-3}.csv in input folder, otherise ignored)
@@ -117,6 +121,8 @@ input:
        # background_noise_path: ".../noise.wav"
        ### Flag for using low level [-4,+4] background noise; default = false
        # low_level_noise: true
    ### Flag for repeating the whole signal once and discarding the first half after processing
    # repeat_signal: true

#################################################
### Bitstream processing
@@ -282,7 +288,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
Loading