c# - 为什么 Aurio 无法比较我的音轨?
问题描述
我正在为合唱团构建一个网站,以便在他们被邀请参加试镜之前自动评估候选人。我正在维护一个候选人应该唱歌的音频片段数据库。
我正在尝试从这里使用 Aurio 代码: https ://github.com/protyposis/Aurio 。但我无法让它正确比较速度较慢或不同比例的音轨。
private int findMatchesWang(String file1, String file2)
{
// Setup the sources
var audioTrack1 = new AudioTrack(new FileInfo(file1));
var audioTrack2 = new AudioTrack(new FileInfo(file2));
var profile = Aurio.Matching.Wang2003.FingerprintGenerator.GetProfiles()[0];
var store = new Aurio.Matching.Wang2003.FingerprintStore(profile);
var gen = new Aurio.Matching.Wang2003.FingerprintGenerator(profile);
int hashCount = 0;
gen.SubFingerprintsGenerated += delegate (object sender, SubFingerprintsGeneratedEventArgs e)
{
store.Add(e);
hashCount += e.SubFingerprints.Count;
};
gen.Generate(audioTrack1);
gen.Generate(audioTrack2);
var matches = store.FindAllMatches();
return matches.Count;
}
当 file1 与 file2 相同时,该函数返回预期值(4686 个匹配项)。我尝试使用以下方法调用该函数:
file2 与 file1 是同一首歌曲,但播放速度较慢(参见文件“slow.wav”)。
file2 与 file1 是同一首歌曲,但以不同的比例播放(参见文件“不同的比例.wav”)。
在这两种情况下,函数都返回 0。请在此处找到文件:https ://drive.google.com/drive/folders/10vKdc6C3InWpVs0g877Yub3ddv267GSZ?usp=sharing
任何人都可以解释什么是错的?
解决方案
Aurio 中实现的算法并非旨在匹配具有不同速度或音高/比例的内容。它们只能处理这些维度中非常非常小的变化,例如由于回放和记录设备之间的采样时钟漂移而发生的变化(即,可测量,但人类听众无法察觉)。
(我是Aurio库的作者)
推荐阅读
- r - ROCR 中的预测错误“预测和标签的交叉验证运行次数必须相等。”
- node.js - 似乎无法在 AWS Lambda/Nodejs 中填充数组
- terminal - 我怎样才能把`gjslint`放回正确的路径?
- javascript - 在同一视图中获取模态输入 Laravel
- asp.net-core - Asp.net 核心中间件根据请求 url 运行逻辑
- python - 我们可以仅通过整数编码获得有效的结果吗?
- c# - 在 C# 中将日期参数作为 NpgsqlParameter 传递
- node.js - 将配置/设置保存到关系数据库(postgresql)
- python - Python 脚本立即结束,代码没有问题
- javascript - 如何将nodejs本机模块注入puppppeteer页面