Python WebRTC Models

0.3.0 · active · verified Thu Apr 16

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.

Common errors

Warnings

Install

Imports

Quickstart

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}")

view raw JSON →