How to get room audio recording in a local folder after session ends

This question originally came up in our Slack community and the thread has been consolidated here for long-term reference.

Is there any way to get the LiveKit session or room audio recording in a local recordings folder after the session ends?

You would use egress to export the room audio. The simplest pattern is documented here: