Compatible audio libraries with Streamlit - For running uploaded file through keras model

This is a broad question that’s pretty high level. I’ve built a machine learning model and saved it as an h.5 file, and am trying to figure out the best way to approach using that model in Streamlit on an newly uploaded wav file?

Primarily, I’m fairly certain librosa doesn’t work on Streamlit (correct me if I’m wrong), and was wondering if there was a compatible library that I could use to convert an audio file I’ve uploaded via the code below to a numpy array, while also getting the audio components I need for the model (MFCC, Chroma, etc)?

Code I used to upload in streamlit:

Audio_file = st.sidebar.file_uploader(“Upload Audio”, type=[“wav”])

if Audio_file is not None:

st.audio(Audio_file, format=‘audio/x-wav’)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.