jacdac.sound_recorder_with_playback

Submodules

Package Contents

Classes

SoundRecorderWithPlaybackClient

A record and replay module. You can record a few seconds of audio and play it back.

class jacdac.sound_recorder_with_playback.SoundRecorderWithPlaybackClient(bus: jacdac.bus.Bus, role: str)

Bases: jacdac.bus.Client

A record and replay module. You can record a few seconds of audio and play it back. Implements a client for the Sound Recorder with Playback service.

property status Optional[jacdac.sound_recorder_with_playback.constants.SoundRecorderWithPlaybackStatus]

Indicate the current status,

property time Optional[int]

Milliseconds of audio recorded., _: ms

property volume Optional[float]

(Optional) Playback volume control, _: /

play() None

Replay recorded audio.

record(duration: int) None

Record audio for N milliseconds.

cancel() None

Cancel record, the time register will be updated by already cached data.