This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
blip25-mbe (Python)
Python bindings for blip25-mbe,
a research-grade Rust implementation of the MBE / IMBE / AMBE+2 vocoder
family for P25 Phase 1 and Phase 2 pipelines.
Patents. AMBE+2 is covered by US 8,359,197 until 2028-05-20. See
PATENT_NOTICE.md.
Install
pip install blip25-mbe
Wheels are published for Linux (manylinux 2_28), macOS (x86_64 + arm64), and Windows for Python 3.9+.
Quick start
import numpy as np
import blip25_mbe
# One-shot frame round-trip
vc = blip25_mbe.Vocoder(blip25_mbe.Rate.IMBE_7200X4400)
pcm_in = np.zeros(vc.frame_samples, dtype=np.int16) # 160 samples = 20 ms
bits = vc.encode_pcm(pcm_in) # 18-byte FEC frame
pcm_out = vc.decode_bits(bits) # back to np.int16
# Streaming over arbitrary-sized chunks
enc = blip25_mbe.LiveEncoder(blip25_mbe.Rate.AMBEPLUS2_3600X2450)
for chunk in pcm_chunks: # any size, any rate
for frame in enc.push(chunk):
socket.send(frame) # 9 bytes each
# Wire-format bridge (Phase 1 IMBE ⇄ Phase 2 AMBE+2)
tc = blip25_mbe.Transcoder(
blip25_mbe.Rate.IMBE_7200X4400,
blip25_mbe.Rate.AMBEPLUS2_3600X2450,
)
out_bits = tc.transcode(in_bits)
encode_pcm accepts any np.int16 array; decode_bits returns a fresh
np.int16 array. Length must match vc.frame_samples / vc.fec_frame_bytes.
Rates
| Python | Codec | Wire size | Bitrate |
|---|---|---|---|
Rate.IMBE_7200X4400 |
IMBE | 18 bytes | 7 200 bps |
Rate.IMBE_4400X4400 |
IMBE no-FEC | 11 bytes | 4 400 bps |
Rate.AMBEPLUS2_3600X2450 |
AMBE+2 | 9 bytes | 3 600 bps |
Rate.AMBEPLUS2_2450X2450 |
AMBE+2 no-FEC | 7 bytes | 2 450 bps |
AMBEPLUS2_2450X2450byte order. The 7-byte no-FEC frame packs the 49 info bits in r34 column-interleave order (byte-exact with the reference rate-index 34 no-FEC stream), not naive MSB-first sequential. Consumers expecting natural / "AMBE_d" order (mbelib, IDAS/NXDN over-the-air) must de-interleave first.
Encoder toggles
As of blip25-mbe 0.3.0 the codec is a pure bits-in/bits-out function
with no runtime levers. The shipped decode path is the reference
console codec unaltered. Only two Vocoder toggles remain:
vc = blip25_mbe.Vocoder(blip25_mbe.Rate.AMBEPLUS2_3600X2450)
# Encode-side Annex-T tone detection (default OFF; AMBE+2 only).
vc.set_tone_detection(True)
vc.tone_detection # -> True
# Post-decode enhancement mode. NONE (the default) is the reference
# codec unaltered; CLASSICAL is an opt-in research post-filter.
vc.set_enhancement(blip25_mbe.EnhancementMode.CLASSICAL)
vc.enhancement # -> EnhancementMode.CLASSICAL
Migration from 0.2.x. The 0.2.x encoder knobs (
spectral_subtraction,chip_compat,pyin_pitch, thepitch_*/vuv_*encode-quality stack), the denoiser front-ends (set_denoise*,set_hum_notch*,DenoiseKind), and theAmbePlus2Synthselector were all removed upstream in 0.3.0 and are no longer exposed.EnhancementModenow defaults toNONE(wasCLASSICAL).
Reference soft-decision packets
blip25_mbe.reference_soft_decision provides the 4-bit soft-decision
(LLR) packet format for soft-FEC interchange with AMBE-2000/2020/3000
hardware: pack_channel_bits / unpack_packet, the raw USB-3000 nibble
stream (pack_nibble_stream / unpack_nibble_stream), SdPacketHeader,
and the verified P25 rate-control vectors.
import numpy as np
from blip25_mbe import reference_soft_decision as dsd
llrs = np.array(channel_soft_bits, dtype=np.int8) # one i8 LLR per bit
header = dsd.SdPacketHeader() # rate_info words are reference-/rate-specific
packet = dsd.pack_channel_bits(llrs, header) # uint16[60]
wire = dsd.packet_to_bytes(packet) # 120 big-endian bytes
P25_FULLRATE_FEC/P25_FULLRATE_NOFECare the 6-word-rrate-control vectors — a different framing from the packet's 5-wordrate_infofield; don't cross-assign them.
Half-rate channel frame (rate33)
blip25_mbe.rate33 exposes the half-rate (rate-33) AMBE+2 channel
frame layer that sits below the PCM↔wire façade — the four info
vectors û₀..û₃, the FEC code vectors c₀..c₃, and the deprioritized
b̂₀..b̂₈ voice-parameter fields. Use it to pull parameter fields out of
captured frames or to drive the FEC core directly (the reuse point for
other half-rate AMBE+2 protocols: DMR, NXDN, P25 Phase 2).
The one-call field extractors cover all three on-wire forms:
from blip25_mbe import rate33
b = rate33.fields_from_fec(frame9) # 9-byte FEC (Rate.AMBEPLUS2_3600X2450)
b = rate33.fields_from_no_fec(frame7) # 7-byte r34 no-FEC (AMBEPLUS2_2450X2450)
b = rate33.fields_from_natural(frame7) # 7-byte natural / AMBE_d (mbelib, IDAS/NXDN OTA)
# each returns the 9 deprioritized fields b̂₀..b̂₈ (widths AMBE_PARAM_WIDTHS)
Lower-level primitives are also exposed: unpack_no_fec / pack_no_fec
and natural_to_info / info_to_natural (the two 7-byte byte orders),
deinterleave / interleave and decode_frame / encode_frame
(Annex-S + Golay/PN FEC core, with a soft-decision decode_frame_soft),
prioritize / deprioritize, and unpack_dibits / pack_dibits.
decode_frame returns a Rate33Frame with .info, .errors, and
.error_total().
r34 vs natural order. The 7-byte no-FEC frame has two incompatible layouts.
Rate.AMBEPLUS2_2450X2450and*_no_fecuse the r34 column interleave; mbelib and IDAS/NXDN over-the-air use natural / AMBE_d sequential order. Pick the matchingfields_from_*/*_to_infofunction — they are not interchangeable.
Building from source
pip install maturin
maturin develop --release # editable install into current venv
pytest # smoke tests
Sibling packages
blip25-mbe is the vocoder wrapper. Future blip25 components (decoder /
SDR layer) will ship as separate PyPI packages with their own
blip25_* import names — they don't share a namespace with this one.
License
MIT — see LICENSE.
Metadata
Release files for blip25-mbe 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| blip25_mbe-0.3.0.tar.gz | 23.7 kB | With provenance | Details for blip25_mbe-0.3.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| blip25_mbe-0.3.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for blip25_mbe-0.3.0-cp39-abi3-win_amd64.whl |
| blip25_mbe-0.3.0-cp39-abi3-manylinux_2_28_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ x86-64 | Details for blip25_mbe-0.3.0-cp39-abi3-manylinux_2_28_x86_64.whl |
| blip25_mbe-0.3.0-cp39-abi3-manylinux_2_28_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ ARM64 | Details for blip25_mbe-0.3.0-cp39-abi3-manylinux_2_28_aarch64.whl |
| blip25_mbe-0.3.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for blip25_mbe-0.3.0-cp39-abi3-macosx_11_0_arm64.whl |
| blip25_mbe-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for blip25_mbe-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 3.1 MB
Release files / blip25_mbe-0.3.0.tar.gz
| Download URL | blip25_mbe-0.3.0.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ab8b9073efe54fa4e4738d6a29b26baef35c6f4f5d528a80e5197bcf24dbd71
|
|
BLAKE2b-256 checksum How to use checksums |
d5a9b19c628d7dcbc72477c6618399e88f435b3c894413770d4d31740d006dc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / blip25_mbe-0.3.0-cp39-abi3-win_amd64.whl
| Download URL | blip25_mbe-0.3.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 517.9 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
17fcf34c372b53e2da593969f131ede6ea78ecfcb0002b4976d6fc88bfb56c89
|
|
BLAKE2b-256 checksum How to use checksums |
cd97174f06ebbee7a6237827e01d7d24557ea8d2696a0a3498e7236c284a729c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / blip25_mbe-0.3.0-cp39-abi3-manylinux_2_28_x86_64.whl
| Download URL | blip25_mbe-0.3.0-cp39-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 637.4 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0e1f651b21e964794ba90385577857acc6b5a60a22d439aa88d6e5b552e3abc8
|
|
BLAKE2b-256 checksum How to use checksums |
95fb90cf1b6a84d015df930c862a8dfe42164f1227da625644fdd543e6e24e9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / blip25_mbe-0.3.0-cp39-abi3-manylinux_2_28_aarch64.whl
| Download URL | blip25_mbe-0.3.0-cp39-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 674.2 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
613a22e59338e246507eb8680b1e69da9e2e98bb7b5c666b56f0f682069d33ff
|
|
BLAKE2b-256 checksum How to use checksums |
efb72874939442d905e612bef2004273eec00b47864c89b13c14c2e8cdc0ae0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / blip25_mbe-0.3.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | blip25_mbe-0.3.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 621.8 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4c77f5b35a36f848dcc966a279ad121078a06a4f4c4abbde3c0360981048ed3c
|
|
BLAKE2b-256 checksum How to use checksums |
100d8aca20ae2471d3723efb3a1527a456136692c17e80cd63c7dd00f76abf68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / blip25_mbe-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | blip25_mbe-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 602.8 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
955b1042628598adf6d3635943a384951cea38d4d8fa53ce51bde606b625dafc
|
|
BLAKE2b-256 checksum How to use checksums |
0c07e725d6d1455369532718721bca233d861aa9d3702c1b45fbae7c1071f2f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logSecurity for blip25-mbe 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for blip25_mbe-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.