声纹验证和声纹识别中的AS-norm、Z-norm、T-norm、ZT-norm、 S-norm操作

在声纹验证及声纹识别任务中,注册语音和测试语音之间的得分受到环境差别、语义内容不同等因素的影响,为了更好的确定阈值,需要对得分进行标准化。以AS-norm为例(搞懂这个,其它的so easy),具体步骤如下:

  1. 构造冒认语音集,需要与注册语音及测试语音不同的speaker;
  2. 分别计算注册语音及测试语音与冒认语音集的余弦相似度score;
  3. 从两个score序列中分别选取topk个score并计算mean和std;
  4. 根据计算出的两个mean和std对注册语音和测试语音之间的score标准化;
    代码如下:
def AS_norm(score, enroll_embedding, test_embedding, cohort_embeddings, topk):
    # score 代表注册和测试语音的score;*_embedding 代表测试和注册语音;cohort__embeddings 代表冒认数据集 
    # 计算测试语音与冒认数据集的socre
    enroll_scores = torch.matmul(cohort_embeddings, enroll_embedding.T)[:,0] 
    enroll_scores = torch.topk(enroll_scores, topk, dim = 0)[0]
    enroll_mean = torch.mean(enroll_scores, dim = 0)
    enroll_std = torch.std(enroll_scores, dim = 0)
    # 计算注册语音与冒认数据集的socre
    test_scores = torch.matmul(cohort_embeddings, test_embedding.T)[:,0]
    test_scores = torch.topk(test_scores, topk, dim = 0)[0]
    test_mean = torch.mean(test_scores, dim = 0)
    test_std = torch.std(test_scores, dim = 0)
    # score norm
    score = 0.5 * (score - enroll_mean) / enroll_std  + 0.5 * (score - test_mean) / test_std
    return score

需要注意的点:
1). 冒认数据集需要与测试(注册)数据具有相似的分布,包括场景、语种、信道、性别等;
2). 冒认数据集中的每一个speaker尽可能只包含一个语音片段;
3). 可基于冒认数据集score的平均值设置一个从负到正4-5倍标准差的“安全”区间,消除/拒绝异常值分数;
参考文章:Analysis of Scnore Normalization in Multilingual Speaker Recognition(https://www.isca-speech.org/archive_v0/Interspeech_2017/pdfs/0803.PDF)

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值