I am using Raspberry Pi to record audio. I tried pyaudio but it didn't work, then I tried to use the subprocess module. As the recording needs to be executed multiple times, I need to make sure that the recoding filename is different after every recording.
For example, I would like to:
filename = datetime.now().strftime("%Y-%m-%d_%H_%M_%S")+".wav"
My question is: can I pass this filename as an argument to subprocess? I checked the document, it says only string and list are supported as arguments in subprocess.