dlpy.speech_utils.calculate_segment_nframes

dlpy.speech_utils.calculate_segment_nframes(path, segment_len)

Calculate the number of frames of every segment split from the audio input.

Parameters
pathstring

Specifies path of the audio file.

segment_lenfloat

Specifies the maximum length of one segment in seconds.

Returns
list of ints

A list of each segment length in frames.