The audio-record interface

The audio-record interface allows an application to access your audio recording hardware, such as a microphone, via your system’s audio service, such as PulseAudio. It’s disabled by default.

This interface is a companion interface to the audio-playback interface, and is not intended to be used without it.

Example

The brilliant OBS Studio is a good example of an application that needs access to your microphone/audio recording hardware.

$ sudo snap connect obs-studio:audio-record

Interface documentation:
See Interface management and Supported interfaces for further details on how interfaces are used.


Developer details

Auto-connect: no

The design of this interface is based on the principle that the slot implementation of the audio service, such as PulseAudio, queries whether its audio-record slot is connected, leaving the audio service to mediate recording if it is.

On systems with snapd integration, PulseAudio’s mediation is limited and will only verify that the snap is connected to audio-record and not if the specific snap command plugs the interface.

Code examples

Mumble is a voice chat platform and a good example of an application using audio-record. Its snapcraft.yaml can be found here:
https://github.com/snapcrafters/mumble/blob/master/snap/snapcraft.yaml

The source code for this interface is in the snapd repository:
https://github.com/snapcore/snapd/blob/master/interfaces/builtin/audio_record.go


Last updated 3 years ago.