interpolation

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BandLimitedSincInterpolation

func BandLimitedSincInterpolation[T int16 | int32 | int64 | int | byte](input []T, ratioIO float64) ([]T, error)

BandLimitedSincInterpolation resamples the input slice using the band-limited sinc interpolation method.

Warning: size of the input slice must be greater than 0 and power of 2. Warning: For high-quality audio resampling, a byte size of 8192 or higher might be suitable. Warning: For lower quality audio resampling, a byte size of 4096 or lower might be acceptable. Warning: For speech recognition and other similar applications, a byte size of 2048 or lower may be sufficient. Warning: For real-time audio processing, a byte size of 1024 or lower may be necessary to meet the processing requirements.

func LinearInterpolation

func LinearInterpolation[T int16 | int32 | int64 | int | byte](data []T, ratioIO float64) ([]T, error)

LinearInterpolation resamples the input data at the target sample rate using linear interpolation. The input data must be a slice of int16, int32, int64, int, or byte. The ratio must be a positive float64. The output data is a slice of int16, int32, int64, int, or byte.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL