Loading ivas_processing_scripts/audiotools/audiofile.py +3 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import numpy as np import scipy.io.wavfile as wav from .audioarray import trim, window from .constants import VERT_HOA_CHANNELS_ACN from .constants import SUPPRESS_CHUNK_WARNING_WAV_READ, VERT_HOA_CHANNELS_ACN logger = logging.getLogger("__main__") logger.setLevel(logging.DEBUG) Loading Loading @@ -80,6 +80,8 @@ def read( with catch_warnings(record=True) as warnings_list: fs, data = wav.read(filename) for w in warnings_list: if SUPPRESS_CHUNK_WARNING_WAV_READ and "Chunk (non-data) not understood, skipping it." in str(w.message): continue print(f"{filename} : {w.message} ( {w.filename}:{w.lineno} )") if data.dtype == np.int32: data = np.interp( Loading ivas_processing_scripts/audiotools/constants.py +2 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import numpy as np SUPPRESS_CHUNK_WARNING_WAV_READ = True # suppress warning from .wav read() when chunk size is not a multiple of 2 BINAURAL_AUDIO_FORMATS = { "BINAURAL": { "num_channels": 2, Loading Loading
ivas_processing_scripts/audiotools/audiofile.py +3 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import numpy as np import scipy.io.wavfile as wav from .audioarray import trim, window from .constants import VERT_HOA_CHANNELS_ACN from .constants import SUPPRESS_CHUNK_WARNING_WAV_READ, VERT_HOA_CHANNELS_ACN logger = logging.getLogger("__main__") logger.setLevel(logging.DEBUG) Loading Loading @@ -80,6 +80,8 @@ def read( with catch_warnings(record=True) as warnings_list: fs, data = wav.read(filename) for w in warnings_list: if SUPPRESS_CHUNK_WARNING_WAV_READ and "Chunk (non-data) not understood, skipping it." in str(w.message): continue print(f"{filename} : {w.message} ( {w.filename}:{w.lineno} )") if data.dtype == np.int32: data = np.interp( Loading
ivas_processing_scripts/audiotools/constants.py +2 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import numpy as np SUPPRESS_CHUNK_WARNING_WAV_READ = True # suppress warning from .wav read() when chunk size is not a multiple of 2 BINAURAL_AUDIO_FORMATS = { "BINAURAL": { "num_channels": 2, Loading