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 stuff like cleaning audio transcript datasets, it's necessary to cut out segments of the corresponding subtitles when cutting out bad parts of the training audio. This is partially doable by merging the subtitles into an mkv container with the audio, and then using ffmpeg on it and splitting them apart again, but is far from ideal.
Having an easy way to just operate on the subtitles with an api like subs.cut(start="30:30", end="40:20"), which would remove the offending section and then shift everything after down would be really nice for this usecase.
The text was updated successfully, but these errors were encountered:
That sounds like a useful feature! :) In terms of API, pysubs2 represents time in seconds. When a method (like SSAFile.shift()) takes just one time, it can be "sugared" to keyword arguments for hours, seconds, etc., so it looks pretty short: subs.shift(m=1, s=30). Unfortunately this would not work for multiple time inputs, which could work like this:
...which is a bit ugly/verbose, though pretty unambiguous and robust for scripted use.
I imagine you may have multiple segments to cut out, in which case it would be nice to be able to specify them all at once, so that all times have the same reference (otherwise you may have to compensate for time shift from previous cuts):
For stuff like cleaning audio transcript datasets, it's necessary to cut out segments of the corresponding subtitles when cutting out bad parts of the training audio. This is partially doable by merging the subtitles into an mkv container with the audio, and then using ffmpeg on it and splitting them apart again, but is far from ideal.
Having an easy way to just operate on the subtitles with an api like
subs.cut(start="30:30", end="40:20")
, which would remove the offending section and then shift everything after down would be really nice for this usecase.The text was updated successfully, but these errors were encountered: