rnnoise

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

By default the package builds as a stub. To link Xiph librnnoise, use

go build -tags rnnoise

with CGO enabled and rnnoise headers/libs installed (see README.md).

Index

Constants

This section is empty.

Variables

View Source
var ErrUnavailable = errors.New("rnnoise: unavailable (build with -tags rnnoise, CGO_ENABLED=1, and install librnnoise)")

ErrUnavailable is returned by stub builds and by New() when the library cannot be used. Real CGO builds never return this from New() on success; it remains defined so callers can use errors.Is(err, rnnoise.ErrUnavailable) regardless of build tags.

Functions

func FrameBytes

func FrameBytes() int

FrameBytes is 2 * FrameSamples().

func FrameSamples

func FrameSamples() int

FrameSamples matches the Xiph RNNoise default when the library is not linked.

Types

type Denoiser

type Denoiser struct{}

Denoiser is a stub when CGO is disabled.

func New

func New() (*Denoiser, error)

New always fails when CGO is disabled.

func (*Denoiser) Close

func (d *Denoiser) Close()

Close is a no-op on the stub.

func (*Denoiser) Process

func (d *Denoiser) Process(pcm []byte) []byte

Process passes through on stub (no denoising).

func (*Denoiser) ProcessPCM16LE

func (d *Denoiser) ProcessPCM16LE(_ []byte) ([]byte, error)

ProcessPCM16LE is not available on stub builds.

Jump to

Keyboard shortcuts

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