it can open .wav file ,and then create TextGrid file after that cut file by TextGrid file intervals[]?
64 views
Skip to first unread message
Vegetable Chicken
unread,
Mar 1, 2021, 3:16:26 AM3/1/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Parselmouth
by praat visual tool ,we can open file and click Annotate-TextGrid(sentence) button to create TextGrid file ,then we can read TextGrid file's and use the interval of item[],to cut .wav file.
so ,up what i descriped,can finished by Parsemouth code???
yannick...@gmail.com
unread,
Mar 2, 2021, 5:33:26 AM3/2/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Parselmouth
Hello
You should be able to do something similar with Parselmouth, yes. The `TextGrid` API isn't very developed, yet, but you can use `text_grid.to_tgt()` to get a TextGridTools object (see https://textgridtools.readthedocs.io/en/stable/). Using that, you could e.g. use `Sound.extract_part(from_time=..., to_time=...)` to extract the different fragments.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Parselmouth
Hi, I'm trying to perform the same operation. Would really appreciate if you could share how you went about this on your python file! :)
yannick...@gmail.com
unread,
Feb 14, 2022, 11:02:42 AM2/14/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Parselmouth
Hi Meghna
I don't have the exact same code around and I don't know exactly what you're trying to do, but you can loop over the tiers in a TextGrid object from TextGridTools (https://textgridtools.readthedocs.io/en/stable/), loop over the intervals in the tier you're interested in, and then call `Sound.extract_part(from_time=..., to_time=...)` and `Sound.save("file.wav", 'WAV')`.
Without more context, there's not much more that I can say. I'd advise you have a read of TextGridTools, and just start playing around with it in a script.