Versions in this module Expand all Collapse all v0 v0.3.0 Jan 24, 2026 Changes in this version + func AlawDecode(alaw []byte) []int16 + func AlawDecodeBytes(alaw []byte) []byte + func AlawEncode(pcm []int16) []byte + func AlawEncodeBytes(pcm []byte) []byte + func AlawSilence() byte + func AlawSilenceBuffer(length int) []byte + func AlawToMulaw(alaw []byte) []byte + func BytesToInt16(data []byte, bigEndian bool) []int16 + func CalculateDBFS(samples []int16) float64 + func CalculateRMS(samples []int16) float64 + func Float32ToInt16(samples []float32) []int16 + func Float64ToInt16(samples []float64) []int16 + func GenerateSilence(numSamples int) []int16 + func GenerateSilenceBytes(numSamples int) []byte + func GenerateSineWave(frequency float64, sampleRate SampleRate, duration float64, amplitude int16) []int16 + func Int16ToBytes(samples []int16, bigEndian bool) []byte + func Int16ToFloat32(samples []int16) []float32 + func Int16ToFloat64(samples []int16) []float64 + func MonoToStereo(mono []int16) []int16 + func MulawDecode(mulaw []byte) []int16 + func MulawDecodeBytes(mulaw []byte) []byte + func MulawEncode(pcm []int16) []byte + func MulawEncodeBytes(pcm []byte) []byte + func MulawSilence() byte + func MulawSilenceBuffer(length int) []byte + func MulawToAlaw(mulaw []byte) []byte + func NormalizePCM(samples []int16) []int16 + func Resample(samples []int16, fromRate, toRate SampleRate) []int16 + func ResampleBytes(data []byte, fromRate, toRate SampleRate) []byte + func StereoToMono(stereo []int16) []int16 + type PCMFormat struct + BigEndian bool + BitDepth int + Channels int + SampleRate SampleRate + func TelephonyFormat() PCMFormat + type SampleRate int + const SampleRate16kHz + const SampleRate22050Hz + const SampleRate44100Hz + const SampleRate48kHz + const SampleRate8kHz v0.2.0 Jan 19, 2026