Trying to do some audio processing in python3 in a docker image running on the cloud.
PyAudio looks for ALSA and JACK audio servers, and ALSA at least needs to have a device.
I was initially trying to do it with only PulseAudio Sound Server but this is inadequate.
Sharing /dev/snd/ is not scalable, even if the cloud service happened to have a sound card installed it can only serve a limited number of users. This is the approach that most of the other questions end up recommending.
Possible Solutions on which I would like advice:
I understand that you can create a dummy soundcard in ALSA with the snd-aloop module. This has led to a number of further questions:
- getting access to this module necessitates having privileges that I’m not certain I will have on a cloud service, such as accessing the host machine and modprobing modules into the kernel
- I can try building the modules from source
JACK sound server as an alternative sound server. That is what I'll look into now, I just hope it isn't as problematic as an ALSA virtual server.
Other things to think about:
Perhaps I need to ditch PyAudio altogether?
My incoming audiostream can see pulseaudio, so perhaps
https://pypi.org/project/pulsectl/ might be more useful, or something like