Skip to content

Releases

v1.3.2

Choose a tag to compare

@kalicyh kalicyh released this 25 Nov 04:07

Decoder performance

The int16 and float decoders now copy the decoded PCM directly into the returned bytes. This removes per-sample Python conversions from the standard, multistream, and Projection decoders. The public API and output format are unchanged.

Benchmarks

The GitHub Actions benchmark used 20 ms stereo frames at 48 kHz on Ubuntu with libopus 1.6.1. The table shows median decode time per frame before and after, using PyPI 1.3.1 as the baseline. Performance run

Python int16 decode (µs/frame) float decode (µs/frame)
3.10 105.58 → 44.32 (−58%) 92.25 → 33.94 (−63%)
3.11 87.62 → 35.51 (−59%) 75.31 → 27.17 (−64%)
3.12 99.79 → 36.41 (−64%) 92.42 → 27.90 (−70%)
3.13 172.61 → 45.83 (−73%) 151.21 → 35.36 (−77%)
3.14 137.13 → 35.58 (−74%) 104.58 → 27.68 (−74%)

Encoding time varied by less than 1% across the matrix. In a separate macOS arm64 benchmark with Python 3.11 and libopus 1.6.1, six-channel multistream decode time decreased by 52–55% and four-channel Projection decode time decreased by 48–49%.

Benchmark tooling

Version comparisons now run in isolated Python processes and record the installed package version and import path in the results.

v1.3.0

Choose a tag to compare

@kalicyh kalicyh released this 15 Jun 03:08

This release adds multistream and projection support on top of the existing Opus encoder/decoder APIs.

Added

  • Low-level multistream encoder/decoder bindings.
  • High-level MultiStreamEncoder and MultiStreamDecoder classes.
  • Low-level projection encoder/decoder bindings.
  • High-level ProjectionEncoder and ProjectionDecoder classes.
  • Roundtrip tests for multistream and projection encode/decode paths.
  • CI checks that verify the GitHub runner's libopus exposes the required multistream and projection APIs.

Compatibility

Existing Encoder and Decoder APIs are unchanged. The new APIs are additive.

v1.2.0

Choose a tag to compare

@kalicyh kalicyh released this 15 Jun 03:08

This release adds multistream support to opuslib-next.

Added

  • Low-level multistream encoder/decoder bindings.
  • High-level MultiStreamEncoder and MultiStreamDecoder classes.
  • Multistream encode/decode roundtrip tests for integer and float PCM paths.
  • Tests for multistream state creation, reset, size queries, and basic CTL properties.

Compatibility

Existing Encoder and Decoder APIs are unchanged. The new multistream APIs are additive.

v1.1.7

Choose a tag to compare

@kalicyh kalicyh released this 15 Jun 02:08

Fixed

  • Fixed Encoder.inband_fec assignment raising a TypeError.
    • The setter was not forwarding the assigned value to encoder_ctl.
    • encoder.inband_fec = 1 now works as expected.

Tests

  • Added a regression test for the high-level Encoder.inband_fec property setter.

Upgrade

Using pip:

pip install -U opuslib-next

Using uv:

uv add --upgrade opuslib-next

Install This Exact Version

Using pip:

pip install opuslib-next==1.1.7

Using uv:

uv add opuslib-next==1.1.7