Documentation
¶
Index ¶
- Variables
- func AdjustGain(ctx context.Context, src io.Reader, dst io.WriteSeeker, gainDB float64) (resultErr error)
- func Concat(ctx context.Context, sources []io.Reader, dst io.WriteSeeker, ...) (resultErr error)
- func ConvertToWAV(ctx context.Context, src io.Reader, dst io.WriteSeeker) (resultErr error)
- func FadeIn(ctx context.Context, src io.Reader, dst io.WriteSeeker, duration time.Duration) (resultErr error)
- func FadeOut(ctx context.Context, src io.Reader, dst io.WriteSeeker, duration time.Duration) (resultErr error)
- func RemoveEdgeSilence(ctx context.Context, src io.Reader, dst io.WriteSeeker, options SilenceOptions) (resultErr error)
- func SplitByDuration(ctx context.Context, src io.Reader, output OutputFactory, ...) (resultErr error)
- func SplitOnSilence(ctx context.Context, src io.Reader, output OutputFactory, ...) (resultErr error)
- func Trim(ctx context.Context, src io.Reader, dst io.WriteSeeker, ...) (resultErr error)
- type AudioInfo
- type Format
- type Interval
- type OutputFactory
- type PCMReader
- type SilenceOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedFormat = errors.New("audio: unsupported format") ErrMalformedAudio = errors.New("audio: malformed audio") ErrInvalidPCMBuffer = errors.New("audio: PCM buffer length must align to channel count") ErrInvalidTimeRange = errors.New("audio: invalid time range") ErrTrimStartOutOfRange = errors.New("audio: trim start is at or beyond EOF") ErrInvalidDuration = errors.New("audio: duration must include at least one frame") ErrIncompatibleAudio = errors.New("audio: incompatible sample rate or channel count") ErrInvalidCrossfade = errors.New("audio: invalid crossfade duration") ErrInvalidGain = errors.New("audio: gain must be finite") ErrInvalidSilenceOptions = errors.New("audio: invalid silence options") )
Functions ¶
func AdjustGain ¶
func ConvertToWAV ¶
func RemoveEdgeSilence ¶
func RemoveEdgeSilence(ctx context.Context, src io.Reader, dst io.WriteSeeker, options SilenceOptions) (resultErr error)
func SplitByDuration ¶
func SplitOnSilence ¶
func SplitOnSilence(ctx context.Context, src io.Reader, output OutputFactory, options SilenceOptions) (resultErr error)
Types ¶
type AudioInfo ¶
type Interval ¶
func DetectSilence ¶
type OutputFactory ¶
type OutputFactory func(index int) (io.WriteSeeker, error)
type SilenceOptions ¶
type SilenceOptions struct {
ThresholdDBFS float64
MinSilence time.Duration
Window time.Duration
KeepPadding time.Duration
}
func DefaultSilenceOptions ¶
func DefaultSilenceOptions() SilenceOptions
Click to show internal directories.
Click to hide internal directories.