Skip to content

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

Merged
abidlabs merged 6 commits into
mainfrom
audio-fixes
Oct 26, 2022
Merged

Adds support for audio samples in float64, float16, or uint16 formats#2545
abidlabs merged 6 commits into
mainfrom
audio-fixes

Conversation

@abidlabs
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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
Copy Markdown
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