I am using pyaudio but I got some error
import pyaudio
p = pyaudio.PyAudio()
This is my error
shared memfd open() failed: Function not implemented
shared memfd open() failed: Function not implemented
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
shared memfd open() failed: Function not implemented
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Any help please
You are using a headless linux-subsystem, which doesn't provide a connection to a PulseAudio server by default. (That's why you get this connection error.)
You have to setup a connection yourself (via tcp for example). This is discussed here and here.