linux – What is the best way to redirect PulseAudio sink data to another(python) process
My goal is to get real time audio data from some application and mic to another process(python) for processing(DSP, live transcription ect.).
I was able to create a PulseAudio sink, using PulseAudio CLI, which combines the streams and writes audio data to a file, when the bash script is terminated.
Now, I want to pipe the audio data to python processing code in real time.
Is it possible with PulseAudio CLI? I’d like to use out of the box threading mechanisms and existing sockets for data transferer. I was thinking to redirect PulseAdudio sink data to Unix domain socket and listening to it with Python on the other end.
Will be grateful on feedback on my thoughts and other possible implementations ideas/code
Read more here: Source link