Commit d985aec8 authored by Anika Treffehn's avatar Anika Treffehn
Browse files

formatting

parent 700c74b8
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,10 +45,10 @@ from ivas_processing_scripts.processing import chains, config
from ivas_processing_scripts.processing.processing import (
    preprocess,
    preprocess_2,
    preprocess_background_noise,
    process_item,
    reorder_items_list,
    reverse_process_2,
    preprocess_background_noise,
)
from ivas_processing_scripts.utils import DirManager, apply_func_parallel

+1 −2
Original line number Diff line number Diff line
@@ -39,8 +39,7 @@ if __name__ == "__main__":
        description="IVAS Processing scripts for setting up listening tests. Please refer to README.md for usage."
    )
    parser.add_argument(
        "config",
        help="YAML configuration file",
        "config", help="YAML configuration file",
    )
    parser.add_argument(
        "--debug", help="Set logging level to debug", action="store_true", default=False
+2 −7
Original line number Diff line number Diff line
@@ -40,9 +40,7 @@ import numpy as np


def wrap_angles(
    azi: float,
    ele: float,
    clip_ele: Optional[bool] = False,
    azi: float, ele: float, clip_ele: Optional[bool] = False,
) -> Tuple[float, float]:
    """
    Wrap angles to (-180, 180] azimuth and [-90, 90] elevation
@@ -809,10 +807,7 @@ class EFAP:
        for poly, mod in found_polys:
            surface = self.verts[poly]
            d = self._point_plane_dist(
                surface[0].pos,
                surface[1].pos,
                surface[2].pos,
                point_pos,
                surface[0].pos, surface[1].pos, surface[2].pos, point_pos,
            )
            if d >= 0:
                dist.append(d)
+1 −5
Original line number Diff line number Diff line
@@ -184,11 +184,7 @@ def get_args():
        default=None,
    )
    output_parser.add_argument(
        "-mnru",
        "--mnru_q",
        type=float,
        help="Flag for MNRU processing",
        default=None,
        "-mnru", "--mnru_q", type=float, help="Flag for MNRU processing", default=None,
    )
    output_parser.add_argument(
        "-esdru",
+9 −33
Original line number Diff line number Diff line
@@ -115,9 +115,7 @@ def trim(


def window(
    x: np.ndarray,
    fs: Optional[int] = 48000,
    len_ms: Optional[float] = 100,
    x: np.ndarray, fs: Optional[int] = 48000, len_ms: Optional[float] = 100,
) -> np.ndarray:
    """
    Apply windowing to the start and end
@@ -243,10 +241,7 @@ def delay(
    return x


def limiter(
    x: np.ndarray,
    fs: int,
) -> np.ndarray:
def limiter(x: np.ndarray, fs: int,) -> np.ndarray:
    """
    Apply limiting to an audio signal

@@ -347,9 +342,7 @@ def limiter(


def get_framewise(
    x: np.ndarray,
    chunk_size: int,
    zero_pad: Optional[bool] = False,
    x: np.ndarray, chunk_size: int, zero_pad: Optional[bool] = False,
) -> Iterator:
    """
    Generator to yield a signal frame by frame
@@ -417,11 +410,7 @@ def framewise_io(
"""Deprecated functions (partly replaced by ITU binaries)"""


def resample(
    x: np.ndarray,
    in_freq: int,
    out_freq: int,
) -> np.ndarray:
def resample(x: np.ndarray, in_freq: int, out_freq: int,) -> np.ndarray:
    """
    Resample a multi-channel audio array

@@ -456,11 +445,7 @@ def resample(
    return y


def lpfilter(
    x: np.ndarray,
    fc: int,
    fs: int,
) -> np.ndarray:
def lpfilter(x: np.ndarray, fc: int, fs: int,) -> np.ndarray:
    """
    Low-pass filter a multi-channel audio array

@@ -493,10 +478,7 @@ def lpfilter(
    return y


def cut(
    x: np.ndarray,
    limits: Optional[Tuple[int, int]],
) -> np.ndarray:
def cut(x: np.ndarray, limits: Optional[Tuple[int, int]],) -> np.ndarray:
    """
    Cut an audio array

@@ -542,10 +524,7 @@ def cut(


def compare(
    ref: np.ndarray,
    test: np.ndarray,
    fs: int,
    per_frame: bool = False,
    ref: np.ndarray, test: np.ndarray, fs: int, per_frame: bool = False,
) -> dict:
    """
    Compare two audio arrays
@@ -633,10 +612,7 @@ def compare(
    return result


def getdelay(
    x: np.ndarray,
    y: np.ndarray,
) -> int:
def getdelay(x: np.ndarray, y: np.ndarray,) -> int:
    """
    Get the delay between two audio signals

Loading