使用Parselmouth从声音获取点进程时出现问题

2024-04-27 17:05:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使用Parselmouth计算.wav文件的抖动,但PointProcess给我带来了麻烦

this之后,我会

sound = parselmouth.Sound(path) # path = path to .wav
pointProcess = parselmouth.praat.call(sound, "To PointProcess (periodic, cc)")

打算跟进

jitter = parselmouth.praat.call(pointProcess, "Get jitter (local)", 0, 0, 0.0001, 0.02, 1.3)

但在此之前,我得到了以下错误:

Command "To PointProcess (periodic, cc)" not available for given objects

Tags: 文件topathcallthisccwavperiodic
1条回答
网友
1楼 · 发布于 2024-04-27 17:05:28

我刚刚从Parselmouth的作者Yannick Jadoul那里得到了回复:

Yes, I think I know: the actual Praat action is "To PointProcess (periodic, cc)..." rather than "To PointProcess (periodic, cc)", because it takes arguments and would open a form in the Praat GUI.

When you add arguments to an action, Parselmouth will try to be nice and add "..." to the end of the action name, if it's not there (similar to what happens in Praat scripts). So either writing parselmouth.praat.call(sound, "To PointProcess (periodic, cc)...") or parselmouth.praat.call(sound, "To PointProcess (periodic, cc)", "BLAH") should result in a more useful error (something about the number or types of arguments you're passing), but you're case is a bit unlucky, where you have neither.

相关问题 更多 >