Audio#
- class ignis.services.audio.AudioService(*args: Any, **kwargs: Any)#
An audio service. Allow controlling audio devices.
Warning
This service uses the PulseAudio backend. To use it with PipeWire, install
pipewire-pulse
.- Signals:
- Properties:
control (
Gvc.MixerControl
, read-only): A instance ofGvc.MixerControl
. You typically shouldn't use this property.speaker (
Stream
, read-write): The default speaker.microphone (
Stream
, read-write): The default microphone.streams (list[
Stream
], read-only): A list of all streams.speakers (list[
Stream
], read-only): A list of speakers.microphones (list[
Stream
], read-only): A list of microphones.apps (list[
Stream
], read-only): A list of applications currently playing sound.recorders (list[
Stream
], read-only): A list of audio recorders.
Example usage:
from ignis.service.audio import AudioService audio = AudioService.get_default() audio.connect("speaker-added", lambda x, speaker: print(speaker.description))
- class ignis.services.audio.Stream(*args: Any, **kwargs: Any)#
An audio stream. A general class for speakers, microphones, applications, and recorders.
- Signals:
"removed" (): Emitted when the stream has been removed.
- Properties:
stream (
Gvc.MixerStream | None
, read-only): An instance ofGvc.MixerStream
. You typically shouldn't use this property.application_id (
str | None
, read-only): Application ID orNone
.icon_name (
str | None
, read-only): Current icon name, depending onvolume
andis_muted
properties. Works only for speakers and microphones.id (
int | None
, read-only): ID of the stream.name (
str | None
, read-only): Name of the stream.description (
str | None
, read-only): Description of the stream.is_muted (
bool | None
, read-write): Whether the stream is muted.volume (
float | None
, read-write): Volume of the stream.is_default (
bool
, read-only): Whether the stream is default. Works only for speakers and microphones.
- Raises:
GvcNotFoundError -- If Gvc is not found.