YannickJadoul / Parselmouth

Praat in Python, the Pythonic way
https://parselmouth.readthedocs.io/
GNU General Public License v3.0
1.05k stars 116 forks source link

updated f0 algorithm in Praat #122

Open chenchenzi opened 5 months ago

chenchenzi commented 5 months ago

In the new version of Praat, there are two more algorithms of f0 tracking: To Pitch (filtered ac) and To Pitch (filtered cc). How could we call these using Parselmouth? I tried the following and it doesn't work.

from parselmouth.praat import call

sound = parselmouth.Sound(wave_file)
pitch = call(
      sound,
      "To Pitch (filtered ac)",
      0,
      f0min,
      f0max,
      15,
      "no",
      0.03,
      0.09,
      0.5,
      0.055,
      0.35,
      0.14,
 )

I'm on MacOS (Sonoma 14.2.1), Python 3.11.6, and Praat 6.4.01.

YannickJadoul commented 5 months ago

Hi, @chenchenzi. Parselmouth includes a version of Praat internally, by design. An external version of Praat does not help or change the features of Praat that Parselmouth has access to. Unfortunately, these two functions were added reasonably recently, and I haven't had the time lately to update Parselmouth. Once I do, Parselmouth will receive an update, which will include these versions. But for now, I'm afraid you unfortunately cannot access these two with Parselmouth.

chenchenzi commented 5 months ago

Thank you for the explanation. I look forward to the updates!