Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Set window shape in extract_part

12 views
Skip to first unread message

Helen Wright

unread,
Aug 31, 2023, 9:13:02 AM8/31/23
to Parselmouth
Hi there,
I see that the sound.extract_part() function has a parameter for the shape of the window to be used. The default is set to RECTANGULAR. Is it possible to change this? And, if so, what options are available? Thanks in advance

yannick...@gmail.com

unread,
Aug 31, 2023, 9:22:06 AM8/31/23
to Parselmouth
Hi

It's rather strange that the docs do not have the type highlighted as a link, but here it is, with all the options: https://parselmouth.readthedocs.io/en/stable/api_reference.html#parselmouth.WindowShape

These are the same options as in Praat, but I cannot find any Praat documentation on the exact shape of these windows:
Screenshot from 2023-08-31 15-18-10.png

But you could have a look here for the programmatic definition of all these windows: https://github.com/YannickJadoul/Parselmouth/blob/4485336c7c5ea017fc5a02657990d0c791f4ee9f/praat/fon/Sound.cpp#L1016-L1093
Or of course just try out on an all-1 sound fragment, that should also work.

Kind regards
Yannick

Helen Wright

unread,
Sep 6, 2023, 9:59:10 AM9/6/23
to Parselmouth
Hi Yannick,

Thanks very much for the help - greatly appreciated :-)

Reply all
Reply to author
Forward
0 new messages