tessl install tessl/pypi-aiortc@1.13.0Python implementation of WebRTC and ORTC for real-time peer-to-peer communication
Agent Success
Agent success rate when using this tile
87%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.02x
Baseline
Agent success rate without this tile
85%
Build a tool that analyzes audio samples and reports their loudness levels in decibels relative to overload (dBov), a standard measurement used in digital audio and telecommunications systems.
Implement a function that processes audio samples and computes their audio level in dBov:
The function must handle edge cases properly, particularly silent audio where RMS is zero (return -127.0 dBov as the minimum measurable level).
@generates
def calculate_audio_level(samples: list[float]) -> float:
"""
Calculate the audio level in dBov from audio samples.
Args:
samples: List of audio sample values (floating-point, typically -1.0 to 1.0)
Returns:
Audio level in dBov (decibels relative to overload).
Returns -127.0 for silent audio (RMS of 0).
Range: -127.0 to 0.0 dBov
"""
pass[0.5, -0.5, 0.5, -0.5], returns approximately -6.02 dBov @test[0.0, 0.0, 0.0, 0.0], returns -127.0 dBov (minimum level) @test[1.0, 1.0, 1.0, 1.0], returns 0.0 dBov (maximum level) @test[0.1, -0.1, 0.2, -0.2], returns approximately -20.0 dBov @testProvides WebRTC utilities including audio processing functions.
@satisfied-by