Euclidian distance for speaker recognition system

2 ビュー (過去 30 日間)
Antonio Argentieri
Antonio Argentieri 2020 年 8 月 23 日
回答済み: Shubham Rawat 2020 年 8 月 26 日
Hi guys.
I'm new in Matlab and now I have a problem for the implementation of a simple speaker recognition system using PNCC and MFFC.
My problem is on matrix dimension in fact, when I run my program, it give me this error:
Matrix dimensions must agree.
Error in disteu (line 43)
d(n,:) = sum((x(:, n+copies) - y) .^2, 1);
Error in test (line 22)
d = disteu(v, code{l});
Error in main (line 4)
test('C:\Users\Antonio\Documents\MATLAB\test\',5, code);
Just for the sake of clarity I have attached my code.
Could anyone help me please?

回答 (1 件)

Shubham Rawat
Shubham Rawat 2020 年 8 月 26 日
Hi Antonio,
Here in the disteu file (line 43)
d(n,:) = sum((x(:, n+copies) - y) .^2, 1);
dimensions of x(:,n+copies) and y do not match, rows in x are 21+M whereas rows in y are 0+M2.
  • You may refer the padarray doc.
  • You may replace your code from line 21 to 34 in disteu file by this:
if (M < M2)
x = padarray(x,M2-M,0,'post');
[M, N] = size(x)
else
y = padarray(y,M-M2,0,'post');
[M2, P] = size(y)
end

カテゴリ

Help Center および File ExchangeText Analytics Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by