Audio#
- class ignis.services.audio.AudioService(*args: Any, **kwargs: Any)#
An audio service. Allows controlling audio devices.
Warning
This service uses the PulseAudio backend. To use it with PipeWire, install
pipewire-pulse
.Example usage:
from ignis.services.audio import AudioService audio = AudioService.get_default() audio.connect("speaker-added", lambda x, speaker: print(speaker.description))
- signal speaker_added#
Emitted when a speaker is added.
- Parameters:
stream (
Stream
) -- The instance of the stream.
- signal microphone_added#
Emitted when a microphone is added.
- Parameters:
stream (
Stream
) -- The instance of the stream.
- signal app_added#
Emitted when an app is added.
- Parameters:
stream (
Stream
) -- The instance of the stream.
- signal recorder_added#
Emitted when a recorder is added.
- Parameters:
stream (
Stream
) -- The instance of the stream.
- gproperty control: gi.repository.Gvc.MixerControl#
read-only
An instance of
Gvc.MixerControl
.
- class ignis.services.audio.Stream(control: gi.repository.Gvc.MixerControl, stream: Gvc.MixerStream | None)#
An audio stream. A general class for speakers, microphones, applications, and recorders.
- Raises:
GvcNotFoundError -- If Gvc is not found.
- signal removed#
Emitted when the stream has been removed.