Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

st.audio does not take a numpy array? #3434

Closed
amine-aboufirass opened this issue Jun 16, 2021 · 1 comment
Closed

st.audio does not take a numpy array? #3434

amine-aboufirass opened this issue Jun 16, 2021 · 1 comment
Labels
type:docs Requests for changes to docs (will be rerouted to docs repo)

Comments

@amine-aboufirass
Copy link

amine-aboufirass commented Jun 16, 2021

Link to doc page in question (if any):
https://docs.streamlit.io/en/stable/api.html#streamlit.audio
Name of the Streamlit feature whose docs need improvement:
streamlit.audio
What you think the docs should say:
The documentation states 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(np.array([audio]))

It successfully displays an audio player and throws no errors, however there is no available sound.

Please let me know if I am doing anything wrong. Otherwise I think the documentation might be incorrect.

Related SO post https://stackoverflow.com/questions/68007304/st-audio-does-not-take-a-numpy-array

@amine-aboufirass amine-aboufirass added type:docs Requests for changes to docs (will be rerouted to docs repo) status:needs-triage Has not been triaged by the Streamlit team labels Jun 16, 2021
@kmcgrady kmcgrady removed the status:needs-triage Has not been triaged by the Streamlit team label Jul 7, 2021
@kmcgrady
Copy link
Collaborator

kmcgrady commented Jul 7, 2021

Hi there @awa5114, thanks for sharing your question! Unfortunately we can't always dig deep and troubleshoot challenges like this on GitHub. We typically use GitHub for feature requests and bug reports.

For troubleshooting help, you can visit our awesome community forums, where thousands of other Streamlit hackers help each other and talk about the amazing things they are creating!

@kmcgrady kmcgrady closed this as completed Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:docs Requests for changes to docs (will be rerouted to docs repo)
Projects
None yet
Development

No branches or pull requests

2 participants