I suspect it isn't saving because asking for the string representation of a datetime will give you a string with the date and time separated by a space. When putting that into the command that audacity receives it will think the filename ends at that space after the date and that the time and file extension are garbage data that it doesn't understand. Likely outcome is that it considers the entire command invalid and ignores it.
If this is what's happening then hopefully you need to either quote the filename to indicate the space is part of the filename or you should use datetime's isoformat() method to get the string with a non-space separator (defaults to the letter T).
E.g.I have no experience with audacity's scripting so the above may not work.
If this is what's happening then hopefully you need to either quote the filename to indicate the space is part of the filename or you should use datetime's isoformat() method to get the string with a non-space separator (defaults to the letter T).
E.g.
Code:
current_time = datetime.datetime.now().isoformat()send_command(f"Export2: Filename=/home/pi/raspberrypi/{current_time}.mp3")
Statistics: Posted by Paeryn — Sun Mar 17, 2024 2:47 am