Hi!
I am trying to use the st.audio
feature.
I adapted a few tests from the audio tests in the library:
import numpy as np
import streamlit as st
from datasets import load_dataset
fake_audio_data = "\x11\x22\x33\x44\x55\x66".encode("utf-8")
st.audio(fake_audio_data)
# Test using a URL instead of data
some_url = "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-3.mp3"
st.audio(some_url)
# Test that we can use an empty/None value without error.
st.audio(None)
# Test that our other data types don't result in an error.
st.audio(b"bytes_data")
st.audio("str_data".encode("utf-8"))
st.audio(np.array([0, 1, 2, 3]))
# The thing I am interested in ultimately
d = load_dataset("vivos")
example = d["train"][0]
print(example)
st.audio(example["audio"]["array"]) # Passing a numpy array
The code runs normally without throwing any error, and the players render correctly. However, I can’t actually play the sounds except for the mp3 downloaded from the web (SoundHelix-Song-3.mp3)…
I tested both Safari and Chrome:
Any idea what could be happening?