dlpy.speech_utils.segment_audio

dlpy.speech_utils.segment_audio(path, local_path, data_path_after_caslib, segment_len, framerate, sampwidth)

Segment the audio into pieces shorter than segment_len.

Parameters
pathstring

Specifies path of the audio file.

local_pathstring

Specifies the location where temporary segmented audio files are stored (server side).

data_path_after_caslibstring

Specifies the location where temporary segmented audio files are stored (client side, relative to caslib). Note that local_path and data_path_after_caslib actually point to the same position.

segment_lenfloat

Specifies the maximum length of one segment in seconds.

framerateint

Specifies the desired framerate.

sampwidthint

Specifies the desired sampwidth.

Returns
listing_path_after_caslibstring

Path of the file listing the audio segments on the server side, relative to caslib.

listing_path_localstring

Path of the file listing the audio segments on the client side.

segment_path_after_caslib_listlist of string

A list of paths of the audio segments on the server side, relative to caslib.

segment_path_local_listlist of string

A list of paths of the audio segments on client side.