A Python tool to extract .wav files from Audacity .aup files
This package can read an Audacity .aup file, and can extract the audio for a given channel and save as a .wav file.
pip install --user git+https://github.com/davidavdav/audacity.py.gitExtract the second channel from an .aup file
python -m audacity --channel 2 file.aup file-2.wavOn the command line, the first channel is 1.
import audacity
aup = audacity.Aup("file.aup")channel=0
with aup.open(channel) as fd:
  data = fd.read()
  print len(data) ## float32 numbersIn the Python API, the first channel is 0.
channel=0
aup.towav("file.wav", channel, start=0, stop=None)Optionally, you can specify start and stop (in seconds) to only extract part of an .aup file.