kirbyj / praatsauce

Praat-based tools for spectral analysis
GNU General Public License v3.0
24 stars 9 forks source link

feature request: getting the intensity/energy contour? #9

Open leihgajeun opened 7 months ago

leihgajeun commented 7 months ago

First off, thank you for creating praatSauce! Is it possible to add a function to get the intensity contour (or energy contour? Though I believe the output of the "get energy..." function in praat is not the same as the RMS energy in VoiceSauce...)? This might be helpful for a lot of users who study prosody.

drfeinberg commented 7 months ago

Hi Folks, I've been following the repo and thought I'd add my 2 cents in here...

The RMS energy calculation in Voice Sauce does not calculate RMS energy as it advertises, it calculates total energy using window lengths based on the pitch. Ihave made a correction in my voicelab software, which uses parselmouth to access praat from Python. I have spoken with the authors of Voice Sauce, and they agree the equation is wrong, but are done working on the software and won't change it.

Here's a link to the code in my software where you can measure energy using the same pitch-dependent window as voice sauce, but corrected and actually calculates RMS energy: https://github.com/Voice-Lab/VoiceLab/blob/main/voicelab/src/Voicelab/toolkits/Voicelab/MeasureEnergyNode.py

kirbyj commented 7 months ago

Thanks for the suggestion @leihgajeun and for the pointer to Voicelab @drfeinberg. We'll put this in the TODO as we are thinking about the best way to incorporate new measures like this, as well as how best to access the underlying Praat functions.