Skip to content

Ensure that rounded capacity is non-zero in resampleBuffer.#295

Merged
ZachNagengast merged 1 commit intoargmaxinc:mainfrom
drewmccormack:main
Jan 22, 2025
Merged

Ensure that rounded capacity is non-zero in resampleBuffer.#295
ZachNagengast merged 1 commit intoargmaxinc:mainfrom
drewmccormack:main

Conversation

@drewmccormack
Copy link
Contributor

Round off in resampling can lead to a rounded capacity of zero, causing AVAudioPCMBuffer to fail, and thereby causing transcription to fail entirely. (#224)

This is a simple fix, simply requiring the buffer to have a non-zero capacity.

Round off in resampling can lead to a rounded capacity of zero, causing AVAudioPCMBuffer to fail, and thereby causing transcription to fail entirely. (argmaxinc#224)

This is a simple fix, simply requiring the buffer to have a non-zero capacity.
@ZachNagengast ZachNagengast self-requested a review January 21, 2025 19:32
Copy link
Contributor

@ZachNagengast ZachNagengast left a comment

Choose a reason for hiding this comment

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

Simple PR, looks good. Do you have any reproducible way to create this issue so we can test its working?

@ZachNagengast ZachNagengast merged commit b84fcd3 into argmaxinc:main Jan 22, 2025
25 checks passed
@christactiq
Copy link

Hi @ZachNagengast can you release a new version of WhisperKit with this fix please?
Thank you!

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.

resampleBuffer may failed because the calculated capacity is less than 1

3 participants

Comments