When using recode in streamlitfront apps, the following function choked on some wav files (that could be read with sf.read):
file_to_bytes = Pipe(Path, methodcaller("read_bytes"))
wav_file_to_array = Pipe(
file_to_bytes,
decode_wav_bytes,
itemgetter(0),
np.array,
np.transpose,
itemgetter(0),
)
Link to the app: simple_ml_app_1
We should check the correctness of the function decode_wav_bytes.