def _get_t_start_t_stop(self, idx, chunk_size, padding=(0,0)):
t_start = idx*numpy.int64(chunk_size)+padding[0]
t_stop = (idx+1)*numpy.int64(chunk_size)+padding[1]
if t_stop > self.duration:
t_stop = self.duration
if t_start < 0:
t_start = 0
return t_start, t_stop
评论列表
文章目录