【问题标题】:Get the pronounciation correctness of two audio files using MFCC and DTW使用 MFCC 和 DTW 获取两个音频文件的发音正确性
【发布时间】:2022-07-26 20:58:38
【问题描述】:

首先,我真的不知道我在用这段代码做什么。我只是想比较两个 .wav 文件并检查发音正确性。我搜索了互联网,发现这可以使用 MFCC 和 DWT 来完成。我有一个示例代码,它工作正常。但我想得到两个声音之间的距离百分比。有人可以帮我解决这个问题吗?以及如何读取这个结果,0.0 表示原始文件和测试文件,两者都是一样的。这意味着数字越低越好对吗?

import librosa
from dtw import dtw
from numpy.linalg import norm

y1, sr1 = librosa.load('original.wav')
y2, sr2 = librosa.load('testing_file.wav')

mfcc1 = librosa.feature.mfcc(y1, sr1)
mfcc2 = librosa.feature.mfcc(y2, sr2)

dist, cost, acc_cost, path = dtw(mfcc1.T, mfcc2.T, dist=lambda x, y: norm(x - y, ord=1))
print ('Normalized distance between the two sounds:', dist)
#Normalized distance between the two sounds: 52367.556983947754

【问题讨论】:

    标签: python audio similarity mfcc dwt


    【解决方案1】:

    你有答案吗?我也想要

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-07-16
      • 2020-01-31
      • 2012-03-02
      • 2018-07-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-17
      相关资源
      最近更新 更多