I am outputting
parec -d "name"
You don't need to know this command, just know that as soon as you press enter, it outputs binary data representing audio.
My goal is to read this with python in real time, ie start it and have it in a variable "data" I can read from with something like
data = p.stdout.read()
What I tried
p = subprocess.Popen(['parec','-d','"name"'],stdout=subprocess.PIPE,shell=True)
while True:
data = p.stdout.read()
But this results in no data being received.
parec -d "name" > result.raw
is readable with an audio-programme and contains exactly the necessary data. So what is the command for python?