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: - path : string
Specifies path of the audio file.
- local_path : string
Specifies the location where temporary segmented audio files are stored (server side).
- data_path_after_caslib : string
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_len : float
Specifies the maximum length of one segment in seconds.
- framerate : int
Specifies the desired framerate.
- sampwidth : int
Specifies the desired sampwidth.
Returns: - listing_path_after_caslib : string
Path of the file listing the audio segments on the server side, relative to caslib.
- listing_path_local : string
Path of the file listing the audio segments on the client side.
- segment_path_after_caslib_list : list of string
A list of paths of the audio segments on the server side, relative to caslib.
- segment_path_local_list : list of string
A list of paths of the audio segments on client side.