Trying to Upload an Audio File to WebPage and Then Play it Using Audio Player

I have a .wav audio file that I’m successfully uploading into my streamlit webpage. But then I try to play the uploaded audio file using st.audio() but it’s giving me the following error: UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xac in position 25: invalid start byte

Below is my code:

What am I doing wrong?

Update: Resolved!

if uploaded_file is not None:
audio_bytes = uploaded_file.read()
st.audio(audio_bytes, format=‘audio/wav’)