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
- fragmentbytes object
Specifies the original fragment.
- widthint
Specifies the fragment’s original sampwidth.
- nchannelsint
Specifies the fragment’s original nchannels.
- framerate_inint
Specifies the fragment’s original framerate.
- framerate_outint
Specifies the fragment’s desired framerate.
- Returns
- bytes
Converted audio with the desired framerate ‘framerate_out’.