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

Adds support for audio samples in float64, float16, or uint16 formats #2545

Merged
merged 6 commits into from
Oct 26, 2022

Conversation

abidlabs
Copy link
Member

Previously, we would not be able to handle audio samples if they were provided as numpy arrays in float64, float16, or uint16 formats. This adds support for that and closes: #2522

thanks @nateraw @lewtun for flagging this

@github-actions
Copy link
Contributor

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-2545-all-demos

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me @abidlabs ! Would be good to add a unit test for this

@abidlabs
Copy link
Member Author

Thanks for the quick reviews @freddyaboulton! I added a unit test specifically for float64 as that was the feature request we heard. For most of the others, it's basically just inverting the arithmetic so not sure how necessary the unit tests are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid needing to cast audio file to int16 for Audio component
2 participants