The streamlit docs (https://docs.streamlit.io/en/stable/api.html#streamlit.audio) state that streamlit.audio
can take a numpy ndarray
containing raw sample data and display an audio player. I tried this as follows on a local host:
import streamlit as st
import soundfile
data, sr = soundfile.read('test.wav')
st.audio(data)
It successfully displays an audio player and throws no errors, however there is no available sound.
Am I doing anything wrong or are the docs incorrect?