0

I have an application (that I do not own and cannot control) that plays audio. I want to capture the audio coming from this application and process it realtime.

Although there are multiple guides on how to do that in PulseAudio and Pipewire, I want to run this inside a docker container without using the privileged mode, so I want to avoid sound servers.

To my understanding, if I can create a virtual device directly with ALSA, this can do the trick but I do not know where to start.

What I want to do is to create a virtual device that is an audio sink, make it default output, create another device that is an audio source, and connect the first to the second, run the application that produces audio (so it writes to the first) then have another application reading from the second one.

Will this approach work? Any clues where to start from?

The Brain
  • 91
  • 7

1 Answers1

0

Depending on whether or not your host machine is running any sound server. If it does run Pipewire already, like most of the fresh distros are doing, have a look - https://stackoverflow.com/a/75775875/1321921

In a nutshell, you will have a container with your application, which will be using virtual ALSA "pipewire" device in it. The sound will be routed to your Pipewire server on your host, where you can capture it via standard set of Pipewire tools - like to reroute it to DAW of your choice.

Alex
  • 101
  • 1
  • 7