Commit 09920fb7 authored by Anika Treffehn's avatar Anika Treffehn
Browse files

updated readme

parent e304f83c
Loading
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -432,7 +432,9 @@ No required arguments but the `type` key.
#### EVS
For EVS a list of at least one bitrate has to be specified with the key `bitrates`. The entries in this list can also be lists containing the bitrates used for the processing of the individual channels.
This configuration has to match the channel configuration. If the provided list is shorter, the last value will be repeated.
For the encoding stage `cod` and the decoding stage `dec`, the path to the IVAS_cod and IVAS_dec binaries can be specified under the key `bin`. Additionally some resampling can be applied by using the key `fs` followed by the desired sampling rate.
For the encoding stage `cod` and the decoding stage `dec`, the path to the IVAS_cod and IVAS_dec binaries can be specified under the key `bin`.
Additionally some resampling can be applied by using the key `fs` followed by the desired sampling rate.
The general bitstream processing configuration can be locally overwritten for each EVS and IVAS condition with the key `tx`.
#### IVAS
The configuration of the IVAS condition is similar to the EVS condition. However, only one bitrate for all channels (and metadata) can be specified.
In addition to that, the encoder and decoder take some additional arguments defined by the key `opts`.
@@ -476,15 +478,19 @@ It also makes use of the MASA tools provided by Nokia. These can be found here:

The following binaries/executables are needed for the different processing steps:

| processing step          | ITU binary      |
|--------------------------|-----------------|
| LP filtering             |    filter       |
| HP filtering             |    filter       |
| Resampling               |    filter       |
| Loudness adjustment      |    bs1770demo   |
| MNRU                     |    p50fbmnru    |
| ESDRU                    |    esdru        |
| MASA rendering           |    masaRenderer |
| processing step         			  | Exectuable      		  | Where to find |
|-------------------------------------|---------------------------|---------------|
| LP filtering           			  |    filter       		  |               |
| HP filtering          			  |    filter       		  |               |
| Resampling            			  |    filter       		  |               |
| Loudness adjustment   			  |    bs1770demo   		  |               |
| MNRU                  			  |    p50fbmnru			  |               |
| ESDRU                  			  |    esdru       			  |               |
| MASA rendering          		      |    masaRenderer			  |               |
| Frame error pattern generation      |    gen-patt    			  |               |
| Frame error pattern application     |    eid-xor     			  |               |
| Random seed generation for gen-patt |    random      			  |               |
| JBM error pattern generation        |    networkSimulator_g192  |               |

The necessary binaries have to be placed in the [ivas_processing_scripts/bin](./ivas_processing_scripts/bin) folder.
For the ITU tools it is sufficient to copy the binaries while it is necessary to add some additional files for the MASA renderer.
+6 −0
Original line number Diff line number Diff line
@@ -130,6 +130,12 @@ def main(args):

            logger.info(f"  Generating condition: {condition['name']}")

            # # TODO: what happens when no concatenation or only one file for concatenation?
            # if condition["processes"][0].name == "ivas":  # TODO: check if 0 index sufficient
            #     a = {"number_frames": cfg.num_frames, "number_frames_preamble": cfg.num_frames_preamble}
            #     condition["processes"][0].tx.update(a)


            apply_func_parallel(
                process_item,
                zip(
+17 −3
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import numpy as np
import scipy.io.wavfile as wav

from .audioarray import trim, window
from ivas_processing_scripts.audiotools.constants import IVAS_FRAME_LEN_MS

logger = logging.getLogger("__main__")
logger.setLevel(logging.DEBUG)
@@ -156,7 +157,7 @@ def concat(
    pad_noise: Optional[bool] = False,
    preamble: Optional[int] = None,
    pad_noise_preamble: Optional[bool] = False,
) -> list:
) -> Tuple[list, int, int]:
    """
    Horizontally concatenates audio files into one long file

@@ -177,7 +178,12 @@ def concat(

    Returns
    -------
    splits
        List of sample indices to split the resulting file at
    num_frames
        Length of overall signal in frames
    num_frames_preamble: int
        Length of preamble in frames
    """

    y = None
@@ -211,7 +217,15 @@ def concat(

    write(out_file, y, fs=in_fs)

    return splits[1:]
    # compute length of concatenated file and preamble in frames for bitstream processing
    frame_len = fs_compare * IVAS_FRAME_LEN_MS / 1000
    num_frames = int(len(y) / frame_len)
    if preamble:
        num_frames_preamble = int(preamble / IVAS_FRAME_LEN_MS)
    else:
        num_frames_preamble = 0

    return splits[1:], num_frames, num_frames_preamble


def split(
+2 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ def concat_setup(cfg: TestConfig, logger: logging.Logger):
            f"{cfg.input_path.name}_concatenated.wav"
        )

        cfg.splits = concat(
        cfg.splits, cfg.num_frames, cfg.num_frames_preamble = concat(
            cfg.items_list,
            cfg.concat_file,
            cfg.concat_silence.get("pre", 0),
@@ -126,6 +126,7 @@ def concat_setup(cfg: TestConfig, logger: logging.Logger):
            "Concatenation specified with a single item this will have no effect. Please use preprocessing if padding is required."
        )
        cfg.splits = []
        # TODO: set num frames


def concat_teardown(cfg: TestConfig, logger: logging.Logger):