fix: pad audio arrays to same shape if sample rates differ#1880
fix: pad audio arrays to same shape if sample rates differ#1880chrisammon3000 wants to merge 3 commits intodocarray:mainfrom
Conversation
JoanFM
left a comment
There was a problem hiding this comment.
It would be nice to add a test case to show that the problem is fixed.
|
Hey @chrisammon3000 , Thanks a lot for the contribution. However we would ask you to submit a test case to make sure the error case is covered and to make sure that the commits are Please take a look at our contributing guidelines (https://github.com/docarray/docarray/blob/main/CONTRIBUTING.md) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1880 +/- ##
==========================================
- Coverage 84.69% 84.63% -0.06%
==========================================
Files 136 136
Lines 9263 9274 +11
==========================================
+ Hits 7845 7849 +4
- Misses 1418 1425 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
Please refer to #1875 for a detailed description of the issue this fixes. When ffmpeg creates subclips of a video sometimes the audio sample rates are inconsistent causing an error due to different size arrays. To fix this the arrays are padded to ensure they are all the same shape before they are parsed as AudioNdArray.