raiseValueError("Sampling rate must be specified for headerless files!")
elifitem.suffix==".wav":
x,fs=read(item)
sampling_rate=fs
else:
raiseValueError(f"Unsupported input file type {item.suffix}")
n_samples_x,n_chan_x=x.shape
# check for number of channels and sampling rate
iffs!=sampling_rate:
raiseValueError(
f"Sampling rate of the file ({fs}) does NOT match with that ({sampling_rate}) specified in the config yaml."
)
ifn_chan_x!=num_chan_expected:
raiseValueError(
f"The number of channels in the file ({n_chan_x}) do NOT match with those of format ({num_chan_expected}, {input_format}) specified in the config yaml."