Praat 脚本删除特定边界
我想知道是否有任何 Praat 脚本可以消除特定层中两个特定段之间的边界。
例如,如果 Tier1 包含诸如 cars
之类的单词,并且 Tier2 包含相应的句段 |k|ɑː|r|z|
。如何删除相应目录中所有 TextGrid 文件中的例如 r|z
之间的边界?
先感谢您!
I'm wondering if there is any Praat script available that removes boundaries between two specific segments in a specific Tier.
For example, if Tier1 contains a word such as cars
, and Tier2 contains the corresponding segments |k|ɑː|r|z|
. How can I remove the boundary between, say, r|z
in all TextGrid files in the respective directory?
Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
欢迎来到SO。如果您向我们提供一个示例,说明您一直在做什么以及为什么目前不起作用,那么我们会更容易提供帮助。
每个 TextGrid 是否只包含一个单词?如果是这样,请将其添加到循环遍历文件的脚本中。我在一个玩具示例中使用了这个,但是如果包含该组合的单词数量未知,就会出现问题,因为您将更改正在循环的边界数量,并最终尝试读取一个间隔不再存在。
您还需要在循环到下一个之前保存 TextGrid:
'soundname endif endfor您还需要在循环到下一个之前保存 TextGrid:
.TextGrid Remove endif endfor您还需要在循环到下一个之前保存 TextGrid:
welcome to SO. It would be easier to help if you gave us an example of what you have been working on, and why it is currently not working.
Does every TextGrid only contain one word? If so, add this to the script that loops through the files. I got this to work on a toy example, but a problem will arise if there are an unknown number of words that contain the combination, because you will be changing the number of boundaries that you are looping through and eventually try and read an interval that no longer exists.
You will also need to save the TextGrid before looping to the next one:
'soundname endif endforYou will also need to save the TextGrid before looping to the next one:
.TextGrid Remove endif endforYou will also need to save the TextGrid before looping to the next one: