The audio component find the local file(s) and the player bar appears but it says “Error”. I’m not sure how to troubleshoot this.
audio_file = open("Media/audio/voyages.ogg", 'rb')
audio_bytes = audio_file.read()
st.audio(audio_bytes, format='audio/ogg',start_time=0)
I’ve tried mp3 and ogg formats with file sizes ranging 2.7MB - 9MB. For the format I tried putting both format=‘audio/ogg’ and format=‘audio/mp3’ although I’m not sure if the latter is even supported (it’s not mentioned by the docs but in various posts I’ve seem some people do it…).
On a related note, if there’s a way to add arbitrary non-streamlit code / embeds to an app like in Shiny that would be really powerful, so please let me know. For instance, what I’d really like to do is embed a stream from SoundCloud.com using their code.