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