polymath
polymath copied to clipboard
Quantized files are mono
- Add file to library
python3.9 polymath.py -a btQYekwDU0U - Quantize all files to bpm
python3.9 polymath.py -q all -t 80 - Look at files in ./processed - all are mono
I'm on m1 macOS Monterey
I tried changing lines 338/339
# load audio file
y, sr = librosa.load(vid.audio, sr=None)
to...
# load audio file
y, sr = librosa.load(vid.audio, sr=None, mono=False)
...but then I get the following error
TypeError: type numpy.ndarray doesn't define __round__ method
Thanks
I think soundfile.write() expects the axes to be swapped:
y, sr = librosa.load(path=vid, sr=44100, mono=False)
path = os.path.join(os.getcwd(), 'library', audioid+'.wav')
sf.write(path, np.swapaxes(y,0,1), 44100)
I see you can pass in the target sample rate to librosa.load so you may not need the additional resample step.