-
Notifications
You must be signed in to change notification settings - Fork 216
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
timestamp_offset vs. frame_offset #23
Comments
We need to get rid of the frames because np.concatenate becomes time consuming as the size of the array grows. |
Yes, we keep 15 seconds to process, we dont remove the whole 45 seconds because that might contain unprocessed audio frames. We only remove the first 30 seconds when the length is more than 45.
L158 i.e.:
Lets say the duration of your |
Closing this. Feel free to re-open if you have any queries. |
i think the core issue is just that already processed audio ends up getting reprocessed? |
Thanks for your curiousity, i had a deeper look and found a typo. I was previously removing 45s of audio when I had 60s, changed 60s to 45s but missed updating 45s to 30s. So, here we should ideally increment frames_offset by 30s.
This way frames_offset never exceeds timestamp offset. Consider this example. Lets say our
we should be processing anything after 44 seconds since timestamp_offset tells what has been processed already. so, from frames_np which is now 15s(30-45 in absolute audio time) what we process is
anything after 14 seconds from and which is correct. Because the audio frame at 14s is same as the audio_frame at 44s if we hadnt removed anything from frames_np. Here is a plot over a 500s audio with frames_offset incremented by 30s instead of 45s. It shows that we are not reprocessing, if we were then timestamps_offset should fall below frames_offset only then we would pickup already processed samples.
samples_take = 0
picks up already processed samples.
self.frames_offset += 30
|
awesome thanks for looking into this! |
what's the difference between timestamp_offset and frame_offset? i get what the timestamp_offset is doing but not sure why the frame_offset is also necessary. thanks!
The text was updated successfully, but these errors were encountered: