Skip to content
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

pad cuts by num_samples as default #1449

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pengzhendong
Copy link
Contributor

@pengzhendong pengzhendong commented Jan 19, 2025

avoid duration precision issue:

padding_duration = round(duration - cut.duration, ndigits=8)

0.15052083333333321 * 24000 = 3,612.5 = 3,613
0.15052083 * 24000 = 3,612.49992 = 3,612

fix duration precision issue:

https://github.com/lhotse-speech/lhotse/blob/509f4a97ab79a9eaeb8ba377d2a8e4acc794e45b/lhotse/cut/set.py#L2967

0.15052083333333321 * 24000 = 3,612.5 = 3,613
0.15052083 * 24000 = 3,612.49992 = 3,612
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.

1 participant