You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now in lhotse.kaldi.load_kaldi_data_dir, it reads the original audio file, and get the duration info. but this is not friendly to long recodings with sox or ffmpeg conversion, when reco2dur already exists in the kaldi data directory.
Will you support loading reco2dur and get duration information from this file?
The text was updated successfully, but these errors were encountered:
We initially supported reco2dur but unfortunately it was not precise enough for the durations and we were running into issues with mismatched manifest metadata and audio that was loaded from file/command. I see the following options:
modify Kaldi's reco2dur to have precise duration information (num_samples / sampling_rate without truncation after 2 decimal points IIRC) - I don't know if this would break anything else or not though.
since that time, Lhotse supports setting a tolerance threshold for duration mismatch between audio and manifests, we could technically support reading imprecise reco2dur and the user could increase the mismatch threshold if necessary. But I think it could be confusing and not the right thing to do in general.
Make sense. So for option 1 we still have to recalculate the precise duration. I would try the option 2. I guess it's fairly safe to set tolerance threshold to 0.01 s as this is usually what the frame_shift is.
If you can contribute the relevant option for load_kaldi_data_dir (disabled by default, enabled via argument/flag) in Lhotse I'd be happy to merge that PR.
For now in
lhotse.kaldi.load_kaldi_data_dir
, it reads the original audio file, and get the duration info. but this is not friendly to long recodings withsox
orffmpeg
conversion, whenreco2dur
already exists in the kaldi data directory.Will you support loading
reco2dur
and get duration information from this file?The text was updated successfully, but these errors were encountered: