Registry / ai-ml / webrtc-models

webrtc-models

JSON →
library0.3.0pypypi✓ verified 83d ago

A Python library providing lightweight models designed for analyzing WebRTC statistics. It helps estimate quality of experience, predict network congestion, and perform other related tasks using simple prediction models. Currently at version 0.3.0, it follows a feature-driven release cadence, with updates for new models or API refinements.

pip install webrtc-models
INSTALL
IMPORT
SIG · WEBRTC-MODELS
W
webrtc-models
ai-mlpythonv0.3.0
Install
1.9s avg
Import
Disk
13MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✕ build_error
py 3.11
✕ build_error
✕ build_error
py 3.12
✓ —
✓ 1.88s
py 3.13
✓ —
✓ 1.95s
py 3.9
✕ build_error
✕ build_error
13MB installed
● package 13MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RTCConfiguration
from webrtc_models import RTCConfiguration
from webrtc_models import PacketLossPredictor
RTCIceCandidate
from webrtc_models import RTCIceCandidate
RTCIceServer
from webrtc_models import RTCIceServer

Demonstrates how to import a model, initialize it, provide input features as a dictionary, and get a prediction.

from webrtc_models import PacketLossPredictor # Initialize the predictor model predictor = PacketLossPredictor() # Prepare features as a dictionary # (Note: Specific keys are required by each model) features = { 'inbound_rtp_packets_lost': 0, 'inbound_rtp_packets_received': 100 } # Make a prediction prediction = predictor.predict(features) print(f"Predicted packet loss: {prediction}")
Debug
Known issues
breakingThe `predict` method for all models (e.g., `PacketLossPredictor`, `BandwidthPredictor`, `QoEPredictor`) changed its signature in version 0.3.0.
fix
Update calls to `predict` to pass a single dictionary of features instead of individual keyword arguments. For example, change `predictor.predict(arg1=val1, arg2=val2)` to `predictor.predict({'arg1': val1, 'arg2': val2})`.
affects: 0.3.0 and later
gotchaModels expect specific feature keys in the input dictionary passed to the `predict` method. Missing or misspelled keys will raise a `KeyError`.
fix
Refer to the model's documentation or the library's source code for the exact feature keys required (e.g., `inbound_rtp_packets_lost`, `inbound_rtp_packets_received` for `PacketLossPredictor`).
affects: All versions
gotchaThe `webrtc-models` library explicitly requires Python 3.12 or newer.
fix
Ensure your environment is running Python 3.12.0 or higher. Use `python --version` to check and upgrade if necessary, or activate a suitable virtual environment.
affects: All versions
Upgrade
Version history
0.3.0latest on PyPI · released Nov 18, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
48 hits · last 30 days
node
42
OpenAI (training)
1
Resources