Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Real-time Pitch detection with Parselmouth ?

113 views
Skip to first unread message

Dr. Fabio

unread,
Jan 12, 2023, 12:52:18 PM1/12/23
to Parselmouth
Hello 

I am wondering if real-time pitch detection can be implemented using Parselmouth module in Python? Have anyone ever tried to do it?

yannick...@gmail.com

unread,
Mar 23, 2023, 6:02:33 PM3/23/23
to Parselmouth
Hi Fabio!

I somehow never saw/got this email; apologies for the late answer.

I have done sort of this, but it's not straightforward. More specifically, there are two things in the way Praat calculates pitch that makes it hard/impossible to calculate completely in real-time:
1) The sound is windowed: see "Pitch floor" parameter, https://www.fon.hum.uva.nl/praat/manual/Sound__To_Pitch__ac____.html. This makes it that you need some margins, and some can't immediately calculate the pitch of the last millisecond.
2) A smooth pitch track is optimized afterwards (see that same link), which means previous and following audio has an effect on the pitch estimate. So the picked estimate might jump up and down according to what is recorded after.

That being said, nothing should stop you from e.g. repeatedly, every 50 or 100 ms or so, taking the last 2 seconds of recorded audio, calling Praat/Parselmouth's pitch analysis, and plotting it.


Did this answer your question?

Kind regards
Yannick
Reply all
Reply to author
Forward
0 new messages