“ monMatch软件包中的'corMatch'函数导致错误消息[pkg-monitoR]

问题描述 投票:2回答:1

我已经完成了很棒的教程“使用monitoR进行声学模板匹配的简短介绍”

我现在正在尝试在30秒的采样字段记录中使用频谱互相关来检测呼叫。函数corMatch返回以下错误...

'!all.equal([email protected],t.step,公差= t.step / 10000)中的错误:无效的参数类型'

我做错了什么?

我使用了以下代码:

survey <- readWave('20180901_160000.wav', from = 64, to = 64.5, units='minutes')
mtemp1 <- readWave('mew.wav')
mtemp2 <- readWave('mew2.wav')
mtemp1.fp <- file.path(tempdir(), "mtemp1.wav")
writeWave(mtemp1, mtemp1.fp)
mtemp2.fp <- file.path(tempdir(), "mtemp2.wav")
writeWave(mtemp2, mtemp2.fp)
survey.fp <- file.path(tempdir(), "survey2018-09-01_160400_ACDT.wav")
writeWave(survey, survey.fp)
mt1 <- makeCorTemplate(mtemp1.fp, frq.lim=c(6,9), name='m1')
mt2 <- makeCorTemplate(mtemp2.fp, frq.lim=c(5.5,8.5), name='m2')
MewTemps <- combineCorTemplates(mt1, mt2)
MewTempScores <- corMatch(survey.fp, MewTemps)
r
1个回答
0
投票

根据https://github.com/jonkatz2/monitoR/issues/2-调查波文件的采样率与模板的采样率不匹配。

您可以使用seewave::resampmonitoR::changeSampRate重新采样以使其匹配

© www.soinside.com 2019 - 2024. All rights reserved.