I was trying to do cross correlation. But I am not understanding some of the logic of few functions. Can anyone please explain it to me?
1 view (last 30 days)
Show older comments
function speechrecognition(filename)
voice=audioread(filename);
x=voice;
x=x';
x=x(1,:);
x=x';
y1=audioread('C:\Users\saika\OneDrive\Desktop\Train_Test data\Test data\T-1.mp3');
y1=y1';
y1=y1(1,:);
y1=y1';
z1=xcorr(x,y1);
m1=max(z1);
Here is my code.
So my main question is:
x=voice;
x=x';
x=x(1,:);
x=x';
Q: what does above four lines actually means in this code?
1 Comment
Sharmin Kibria
on 23 Sep 2022
I do not think the lines you mentioned have too much impact if x and y are column vectors. You are essentially converting a column vector to arow vector and then turning it back to column vectors. Even for matrices, these lines do not make any significant difference. If x is a matrix, you are essentially picking the first column of the matrix. In that case, you replace the lines by x = voice(:,1);
Answers (0)
See Also
Categories
Find more on Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!