How to get PCM audio stream out of baresip for external processing?

55 views
Skip to first unread message

W Abdullah

unread,
Jun 24, 2025, 11:06:33 AMJun 24
to baresip

Hi everyone,

Hope you're all doing well! I'm working on a project where I need to extract the PCM audio stream from baresip calls and pipe it to an external Go application for real-time processing.

Currently looking at the sndfile module but it creates its own dump files with generated names. I need to either:

  • Write to a named pipe (FIFO)
  • Stream via ctrl_tcp
  • Output to stdout
  • Any other method that lets my wrapper script easily consume the audio

What's the recommended way to get real-time PCM data out of baresip? Are there existing modules or configs I should be using?

Your help would be much appreciated, I've been struggling with this issue for about a week, especially because of the lack of modules documentation.

Thanks!

Christian Spielberger

unread,
Jun 25, 2025, 1:38:45 AMJun 25
to W Abdullah, baresip
Hi Abdullah,

that's not directly a point for the documentation because it is out of the scope of baresip and the existing modules. Anyway, there are different solutions but you need some programming skills. Here are two:
- Use pipewire (modern) or pulseaudio (classic) with special configuration! In your go application you could read from the monitor device.
- Write an audio filter module for baresip and e.g. pipe the samples to a FIFO pipe. As a reference you could start with module vumeter or any module that invokes `aufilt_register()` in its `module_init()`.

regards,
Christian.

--
You received this message because you are subscribed to the Google Groups "baresip" group.
To unsubscribe from this group and stop receiving emails from it, send an email to baresip+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/baresip/5e60481b-2783-4a2c-ac0c-b1bd0c65239cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages