Skip to content

pkgs/audio/codec/opus

Provides Opus encoder/decoder and supported sample-rate contracts for voice, WebRTC media and Ogg Opus conversion.

Go API References

Core structure and main function

SymbolFunction
ApplicationDistinguish between VoIP, audio and low-delay encoder mode.
OpusSampleRateExpress sample rates supported by Opus.
Encoder / NewEncoderEncode PCM frames into Opus packets.
Decoder / NewDecoderDecode Opus packets to PCM.
VersionReturns native Opus runtime version.
IsRuntimeSupportedDetermine whether the current build/runtime supports codec.

This package does not own an Ogg container, RTP timestamp or WebRTC track lifecycle.