usage about get_uniform_subsegments

38 views
Skip to first unread message

yuan

unread,
Oct 20, 2021, 12:42:19 AM10/20/21
to kaldi-help
regarding this:
https://github.com/kaldi-asr/kaldi/blob/master/egs/wsj/s5/utils/data/get_uniform_subsegments.py

1 the description for "max-remaining-duration" says:
parser.add_argument("--max-remaining-duration", type=float,
default=10, help="""Segment is not split
if the left-over duration is more than this
many seconds""")

shouldn't that be "less than"?

2 it mentions "constant-duration" overrides "max-remaining-duration"
parser.add_argument("--constant-duration", type=bool,
default=False, help="""Final segment is given
a start time max-segment-duration before the
end to force a constant segment duration. This
overrides the max-remaining-duration parameter""")

but the code is conditional, not always gives a contant duration.
if (dur < args.max_remaining_duration):
start = max(end_time - args.max_segment_duration, start_time)

correct me if I'm wrong.

Daniel Povey

unread,
Oct 20, 2021, 1:11:24 AM10/20/21
to kaldi-help
It looks to me like line 96 is likely a bug, i.e. should say args.max_segment_duration and not args.max_remaining_duration.
Then it would be more consistent with the usage message.
And yes, it looks to me like max_remaining_duration is really functioning as a min_remaining_duration.  I suppose the usage message
could be clarified, but changing the variable name would require changing all calling code (plus others may have recipes that copy
existing code that are not in the Kaldi repo, which we'd break).
You could perhaps make a PR with the fix(es).


--
Go to http://kaldi-asr.org/forums.html to find out how to join the kaldi-help group
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/a2cfcce2-728c-42dd-abca-fa2de80466a4n%40googlegroups.com.

Kirill 'kkm' Katsnelson

unread,
Oct 25, 2021, 7:40:23 PM10/25/21
to kaldi-help
Yuan, are you planning to send a fix in a PR, or should we take care of this?

Thanks.
Reply all
Reply to author
Forward
0 new messages