Praat functions very slow due to large files?


Michael Bauwens
 

I am trying to run a voice analysis on dyadic conversations (analysing each conversation participant individually) using Praat via Parselmouth in Python. The audio files are in the .wav format and are around 15min usually. I load them as Sound objects. File sizes are between 10-80MB per file. Each file has stereo tracks for the dyads. 

I noticed that even when selecting the first 2 or 3min of a single channel, calculations really take ages (especially "To Pointprocess (cc)") and seem to hang indefinitely when attempting the full 15min files.

So my question is whether Praat has any recommended maximum file sizes/audio duration? Would performance be better/more possible with compressed files? 

I need to investigate how RAM resources are used to determine whether this is also part of the bottleneck, but I figured I'd ask this in the meantime as well.

Thanks! 


Daniel McCloy
 

cross-correlation of a 15-minute file (presumably at 44.1kHz or 48kHz sampling frequency?) should be fairly fast. In pure Python:

import numpy as np
from scipy.signal import correlate
data = np.random.default_rng().normal(size=(2, 44100 * 60 * 15))
%time foo = correlate(*data, mode='full')

gives result

CPU times: user 4.74 s, sys: 1.15 s, total: 5.89 s
Wall time: 5.89 s

I don't recall off the top of my head how to time execution in Praat, but I just did this:

Create Sound from formula: "Noise", 2, 0, 900, 44100, "randomGauss(0,0.1)"
To PointProcess (periodic, cc): 75, 600

...and it finished in maybe 3 seconds. An available-RAM bottleneck is a good thing to check first.