-
Notifications
You must be signed in to change notification settings - Fork 338
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
resampleAudio implementation has bug when starttime and enttime is not nil #191
Comments
Thanks for the report, would you be able to post the specific exception? Or whatever test code you are using to reproduce the error? |
just the logic is wrong, when the audioFile is seeked to startTime, which changes its framePosition, and we should read from the frameposition until it reaches the framePosition + frameCount. |
I think I see what you mean, so we need to calculate the ending framePosition for cases where the starting framePosition is not 0, does that sound right? |
yes, I'm using the |
Thanks for your work, I checked the code, and I think it fixed the bug. |
should not comparing
audioFile.framePosition
withinputFrameCount
, but something like this:let endFrame = AVAudioFrameCount(audioFile.framePosition) + inputFrameCount
WhisperKit/Sources/WhisperKit/Core/AudioProcessor.swift
Lines 296 to 297 in c93d613
The text was updated successfully, but these errors were encountered: