espnet2.sds.utils.utils.int2float
Less than 1 minute
espnet2.sds.utils.utils.int2float
espnet2.sds.utils.utils.int2float(sound: ndarray | list) → ndarray
Converts an integer PCM audio signal to a floating-point representation.
This function scales an integer PCM audio waveform (typically int16) to a float32 format, normalizing the values to the range [-1.0, 1.0].
- Parameters:sound (Union *[*np.ndarray , list ]) – The input audio signal in integer format. Typically a NumPy array or a list of integers.
- Returns: The audio signal converted to float32 format and normalized.
- Return type: np.ndarray
Taken from https://github.com/snakers4/silero-vad