denoise

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() string

Version 获取降噪库版本

Types

type DenoiseConfig

type DenoiseConfig struct {
	// AEC (Acoustic Echo Cancellation) 回声消除
	AECEnable bool
	// AGC (Automatic Gain Control) 自动增益控制
	AGCEnable bool
	// 采样率 (Hz)
	SampleRate int
	// 声道数
	Channels int
	// 位深 (bits)
	BitsPerSample int
}

DenoiseConfig 降噪配置

type DenoiseProcessor

type DenoiseProcessor struct {
	// contains filtered or unexported fields
}

DenoiseProcessor 降噪处理器

func NewDenoiseProcessor

func NewDenoiseProcessor(config *DenoiseConfig) (*DenoiseProcessor, error)

NewDenoiseProcessor 创建降噪处理器

func (*DenoiseProcessor) Close

func (p *DenoiseProcessor) Close() error

Close 关闭处理器

func (*DenoiseProcessor) GetConfig

func (p *DenoiseProcessor) GetConfig() DenoiseConfig

GetConfig 获取当前配置

func (*DenoiseProcessor) Process

func (p *DenoiseProcessor) Process(input []byte) ([]byte, error)

Process 处理音频数据 input: 输入音频数据 (PCM格式) output: 输出音频数据 (降噪后) 返回处理的字节数和错误

func (*DenoiseProcessor) ProcessInPlace

func (p *DenoiseProcessor) ProcessInPlace(data []byte) error

ProcessInPlace 原地处理音频数据

func (*DenoiseProcessor) Reset

func (p *DenoiseProcessor) Reset() error

Reset 重置处理器状态

func (*DenoiseProcessor) SetAECEnable

func (p *DenoiseProcessor) SetAECEnable(enable bool) error

SetAECEnable 设置AEC启用状态

func (*DenoiseProcessor) SetAGCEnable

func (p *DenoiseProcessor) SetAGCEnable(enable bool) error

SetAGCEnable 设置AGC启用状态

Jump to

Keyboard shortcuts

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