Extracting f0 data using filtered autocorrelation

8 views
Skip to first unread message

Mei Ying Ki

unread,
Dec 2, 2025, 2:54:57 PM (3 days ago) Dec 2
to Parselmouth

Hi Yannick, 

I need to extract some f0 data using filtered autocorrelation, and I'm wondering whether filtered autocorrelation is the default algorithm. If not, what is the default, and how can I specify filtered autocorrelation? Fwiw, I'm using Parselmouth 0.4.7, and here's a snippet of my code:

audio = parselmouth.Sound(audio_filename)
pitch = call(audio, "To Pitch", 0.0, 75, 500)
# Find the F0 peak, and the corresponding timepoint
f0_peak = call(pitch, "Get maximum", start_time, end_time, "Hertz", "None")     f0_peak_timepoint = call(pitch, "Get time of maximum", start_time, end_time, "Hertz", "None")

(I can see a relevant discussion here, but I still have no clue, I'm sorry :( https://groups.google.com/g/parselmouth/c/BjyImWG9nZQ/m/9G56gmOYBQAJ)

Thank you very much in advance!

Best,
Mei Ying

yannick...@gmail.com

unread,
Dec 3, 2025, 7:11:59 AM (2 days ago) Dec 3
to Parselmouth
Hi Mei

Thanks for asking! :-)

Good news is: I know exactly what algorithm is running. It's the default "To Pitch" in Praat 6.1.38 (on which Parselmouht 0.4.7 is based; see e.g. `parselmouth.PRAAT_VERSION`), which directly corresponds to Praat's "To Pitch (ac)" (but with a couple of fewer arguments). I'll attach a screenshot from Praat documentation inside Praat 6.1.38  below.
This is the algorithm/functionality that got renamed to "raw ac" in later Praat versions: https://www.fon.hum.uva.nl/praat/manual/Sound__To_Pitch__ac____.html

Bad news is that I currently don't have a released version of Parselmouth with a newer version of Praat that includes the filtered autocorrelation algorithm. I know it's high time (and I actually hope/aim that over the holidays I will have some time together for this, cause it's getting urgent).
The only way to currently access this is to use the current development version of Parselmouth (which is what you found in the other discussion). It's not tested as well, but it should work.

If you really need to use the filtered one and want to use the development version, I can help you to install that development version of Parselmouth. The short version of how to do this is to go here, and find the latest build: https://github.com/YannickJadoul/Parselmouth/actions/workflows/wheels.yml?query=branch%3Amasterµ
Then, scroll to the bottom and download the files for your operating system (Linux/macOS/Windows) and architecture (64/32 bit Intel, or ARM/Apple Silicon, or...). Probably wheels-win_amd64 or wheels-macosx_arm64 or wheels-manylinux_x86_64. This should download a zip with a bunch of `.whl` files inside.
One of those wheels should have the Python version in the name. E.g. for Python 3.13, it will be `cp313`. Then you will want to install that file. For example, for Python 3.13 on Windows 64-bit: `pip install praat_parselmouth-0.5.0.dev0-cp313-cp313-win_amd64.whl`

But if this is confusing and if you tell me (either here, or in a private email) which system and Python version etc you have, I can also just send you the exact file that you need and/or send more detailed instructions! :-)


Kind regards
Yannick



Screenshot from 2025-12-03 13-01-02.png
Reply all
Reply to author
Forward
0 new messages