Loading ivas_processing_scripts/audiotools/wrappers/filter.py +5 −5 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ # import re from copy import copy from copy import deepcopy from pathlib import Path from tempfile import TemporaryDirectory from typing import Optional Loading Loading @@ -214,7 +214,7 @@ def lpfilter_itu( # resample if samplingrate is not supported old_fs = None tmp = copy(x) tmp = deepcopy(x) if x.fs != 48000: warn( f"Filter type {flt_type} only supported for 48kHz samplingrate, not for {x.fs}Hz -> resampling" Loading Loading @@ -256,7 +256,7 @@ def hp50filter_itu( # set filter type and check if sampling rate is supported old_fs = None tmp = copy(x) tmp = deepcopy(x) if x.fs == 48000: flt_type = "HP50_48KHZ" elif x.fs == 32000: Loading Loading @@ -310,7 +310,7 @@ def kbp20filter_itu( # set filter type and check if sampling rate is supported old_fs = None tmp = copy(x) tmp = deepcopy(x) if x.fs == 48000: flt_type = "20KBP" else: Loading Loading @@ -428,7 +428,7 @@ def resample_itu( raise ValueError("Ratio of input and output sampling frequency not supported") # apply filter y = copy(x) y = deepcopy(x) for i, flt in enumerate(flt_type): y.audio = filter_itu(y, flt_type=flt, up=up[i], down=down[i]) y.audio = delay_compensation( Loading Loading
ivas_processing_scripts/audiotools/wrappers/filter.py +5 −5 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ # import re from copy import copy from copy import deepcopy from pathlib import Path from tempfile import TemporaryDirectory from typing import Optional Loading Loading @@ -214,7 +214,7 @@ def lpfilter_itu( # resample if samplingrate is not supported old_fs = None tmp = copy(x) tmp = deepcopy(x) if x.fs != 48000: warn( f"Filter type {flt_type} only supported for 48kHz samplingrate, not for {x.fs}Hz -> resampling" Loading Loading @@ -256,7 +256,7 @@ def hp50filter_itu( # set filter type and check if sampling rate is supported old_fs = None tmp = copy(x) tmp = deepcopy(x) if x.fs == 48000: flt_type = "HP50_48KHZ" elif x.fs == 32000: Loading Loading @@ -310,7 +310,7 @@ def kbp20filter_itu( # set filter type and check if sampling rate is supported old_fs = None tmp = copy(x) tmp = deepcopy(x) if x.fs == 48000: flt_type = "20KBP" else: Loading Loading @@ -428,7 +428,7 @@ def resample_itu( raise ValueError("Ratio of input and output sampling frequency not supported") # apply filter y = copy(x) y = deepcopy(x) for i, flt in enumerate(flt_type): y.audio = filter_itu(y, flt_type=flt, up=up[i], down=down[i]) y.audio = delay_compensation( Loading