Commit 9f5f7bd5 authored by Anika Treffehn's avatar Anika Treffehn
Browse files

Merge branch 'test_runner_binaries' into 'main'

extended tests to use all binaries

See merge request !36
parents 023b26b7 68381df7
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -16,3 +16,7 @@ proc_input/*.wav
proc_input/*.pcm
proc_output/
*~
tests/tmp_output_*
tests/cut
tests/ref
tests/concatenation_folder
 No newline at end of file
+13 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ default:


stages:
  - check
  - test
  - analyze

@@ -31,6 +32,18 @@ stages:
  - cd $dir


# ------------------------------------
# check pre-conditions are met
# ------------------------------------
check_for_binaries:
  stage: check
  tags:
    - linux
  script:
    - *print-common-info
    - python3 -m pytest tests/test_binaries_present.py


# ------------------------------------
# functionality tests
# ------------------------------------
+8 −7
Original line number Diff line number Diff line
@@ -103,9 +103,9 @@ conditions_to_generate:
      bitrates:
          - 9600
      cod:
          bin: ~/git/ivas-codec/IVAS_cod
          bin: ~/git/ivas-codec/EVS_cod
      dec:
          bin: ~/git/ivas-codec/IVAS_dec
          bin: ~/git/ivas-codec/EVS_dec
postprocessing:
    fmt: "BINAURAL"
	fs: 48000
@@ -296,7 +296,7 @@ input:
###     mnru       generate MNRU condition
###     esdru      generate ESDRU condition
###     mono_dmx   generate mono downmix condition
###     evs        generate an EVS coded condition (see below examples for additional required keys) (currently uses IVAS EVS mode)
###     evs        generate an EVS coded condition (see below examples for additional required keys)
###     ivas       generate an IVAS coded condition (see below examples for additional required keys)
conditions_to_generate:
  ### Reference and anchor conditions ##########################
@@ -389,13 +389,13 @@ conditions_to_generate:
      ### for multi-channel configs, code LFE with 9.6 kbps NB (as mandated by IVAS-3)
      evs_lfe_9k6bps_nb: true
      cod:
          ### Path to encoder binary; default search for IVAS_cod in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/IVAS_cod
          ### Path to encoder binary; default search for EVS_cod in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/EVS_cod
          ### Encoder input sampling rate in Hz (resampling performed in case of mismatch); default = null (no resampling)
          # fs: 32000
      dec:
          ### Path to encoder binary; default search for IVAS_dec in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/IVAS_dec
          ### Path to encoder binary; default search for EVS_dec in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/EVS_dec
          ### Decoder output sampling rate; default = null (same as input)
          # fs: 48000
```
@@ -521,6 +521,7 @@ The following additional executables are needed for the different processing ste
| 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         |
| 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 
[ivas_processing_scripts/binary_paths.yml](./ivas_processing_scripts/binary_paths.yml).
+7 −7
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ input:
###     mnru       generate MNRU condition
###     esdru      generate ESDRU condition
###     mono_dmx   generate mono downmix condition
###     evs        generate an EVS coded condition (see below examples for additional required keys) (currently uses IVAS EVS mode)
###     evs        generate an EVS coded condition (see below examples for additional required keys)
###     ivas       generate an IVAS coded condition (see below examples for additional required keys)
conditions_to_generate:
  ### Reference and anchor conditions ##########################
@@ -251,14 +251,14 @@ conditions_to_generate:
      evs_lfe_9k6bps_nb: true
      ### Encoder options
      cod:
          ### Path to encoder binary; default search for IVAS_cod in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/IVAS_cod
          ### Path to encoder binary; default search for EVS_cod in bin folder (primary) and PATH (secondary)
          bin: EVS_cod
          ### Encoder input sampling rate in Hz (resampling performed in case of mismatch); default = null (no resampling)
          # fs: 32000
      ### Decoder options
      dec:
          ### Path to encoder binary; default search for IVAS_dec in bin folder (primary) and PATH (secondary)
          bin: ~/git/ivas-codec/IVAS_dec
          ### Path to encoder binary; default search for EVS_dec in bin folder (primary) and PATH (secondary)
          bin: EVS_dec
          ### Decoder output sampling rate; default = null (same as input)
          # fs: 48000
      ### Bitstream options
@@ -287,7 +287,7 @@ postprocessing:
    # bin_dataset: SADIE
    ### Render LFE to binaural output with the specified gain (only valid for channel-based input); default = null
    # bin_lfe_gain: 1
    ### Flag whether output should be limited to avoid clipping (can alter target loudness); default = true
    # limit: false
    ### 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
    # trajectory: "path/to/file"
+5 −5
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ def concat(
    pad_noise: Optional[bool] = False,
    preamble: Optional[int] = None,
    pad_noise_preamble: Optional[bool] = False,
) -> list:
) -> Tuple[list, int]:
    """
    Horizontally concatenates audio files into one long file

@@ -198,7 +198,7 @@ def concat(

        # pad with very low amplitude noise
        x = trim(
            x, in_fs, (-silence_pre, -silence_post), samples=True, pad_noise=pad_noise
            x, fs, (-silence_pre, -silence_post), samples=True, pad_noise=pad_noise
        )

        # add the length to our splits list
@@ -209,11 +209,11 @@ def concat(

    # add preamble
    if preamble:
        y = trim(y, in_fs, (-preamble, 0), pad_noise_preamble)
        y = trim(y, fs, (-preamble, 0), pad_noise_preamble)

    write(out_file, y, fs=in_fs)
    write(out_file, y, fs=fs)

    return splits[1:]
    return splits[1:], fs


def split(
Loading