jacdac.sound_level

Submodules

Package Contents

Classes

SoundLevelClient

A sound level detector sensor, gives a relative indication of the sound level.

class jacdac.sound_level.SoundLevelClient(bus: jacdac.bus.Bus, role: str, *, missing_sound_level_value: float | None = None)

Bases: jacdac.bus.SensorClient

A sound level detector sensor, gives a relative indication of the sound level. Implements a client for the Sound level service.

property sound_level: float | None

The sound level detected by the microphone, _: /

property enabled: bool | None

Turn on or off the microphone.,

property loud_threshold: float | None

Set level at which the loud event is generated., _: /

property quiet_threshold: float | None

Set level at which the quiet event is generated., _: /

on_loud(handler: jacdac.bus.EventHandlerFn) jacdac.bus.UnsubscribeFn

Generated when a loud sound is detected.

on_quiet(handler: jacdac.bus.EventHandlerFn) jacdac.bus.UnsubscribeFn

Generated low level of sound is detected.