dlpy.speech_utils.convert_framerate¶
-
dlpy.speech_utils.
convert_framerate
(fragment, width, nchannels, framerate_in, framerate_out)¶ Convert framerate (sampling rate) of the input fragment.
Parameters: - fragment : bytes object
Specifies the original fragment.
- width : int
Specifies the fragment’s original sampwidth.
- nchannels : int
Specifies the fragment’s original nchannels.
- framerate_in : int
Specifies the fragment’s original framerate.
- framerate_out : int
Specifies the fragment’s desired framerate.
Returns: - bytes
Converted audio with the desired framerate ‘framerate_out’.