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))
- speaker_added(*args)#
Signal
Emitted when a speaker is added.
- Parameters:
stream (
Stream
) -- The instance of the stream.
- microphone_added(*args)#
Signal
Emitted when a microphone is added.
- Parameters:
stream (
Stream
) -- The instance of the stream.
- app_added(*args)#
Signal
Emitted when an app is added.
- Parameters:
stream (
Stream
) -- The instance of the stream.
- recorder_added(*args)#
Signal
Emitted when a recorder is added.
- Parameters:
stream (
Stream
) -- The instance of the stream.
- property control: gi.repository.Gvc.MixerControl#
read-only
An instance of
Gvc.MixerControl
.
- class ignis.services.audio.Stream(control: gi.repository.Gvc.MixerControl, stream: gi.repository.Gvc.MixerStream | None)#
An audio stream. A general class for speakers, microphones, applications, and recorders.
- Raises:
GvcNotFoundError -- If Gvc is not found.
- removed()#
Signal
Emitted when the stream has been removed.