pythonaudio-streamingpython-sounddevice

How to record audio output with python-sounddevice?


I am trying to repurpose the example that records arbitrary length microphone audio to capture audio output https://python-sounddevice.readthedocs.io/en/0.4.1/examples.html#recording-with-arbitrary-duration

I am not sure how to setup the device correctly and whether I can actually capture the output sound with python-sounddevice


Solution

  • Looking into it more it seems like I need to use a virtual audio driver to capture output such as https://github.com/ExistentialAudio/BlackHole for Mac or pulseaudio can be setup to do this on Ubuntu then I can connect to the virtual audio driver which can capture the output and then write it out