You can script Audacity from an external python script (with the output file being separate from the input file so as to provide non-destructive editing) with the scripts being plain text, python, files.
There is a huge selection of Audio processing and production software in the Python work some of which may provide what you need. A curated list can be ...
I was looking for something similar, and since I could not find it, I wrote a small python script following the principles outlined by rd_nielsen.
You can call it like this:
python3 pandoc-merge.py --csv addresses.csv -o merged_letter.pdf letter_template.md
In your template, you can ...