error in speech recogniion
Mostrar comentarios más antiguos
I am working on speech recognition. I have completed the training session and created the database. Now for the testing session my code is giving the error
??? Index exceeds matrix dimensions.
Error in ==> readnewfile at 28
display(words(index,:))*
The code is as follows
clc
clear all
close all
load ('Database.mat')
% load ('AudioList.mat')
Datasize=size(Dataset);
[s1,fs] = wavread('wh1.wav'); % Reading new file x1.wav
B = [1 -0.95];
s1 = filter(B,1,s1);
[c]=melcepst(s1,fs);
n=corrcoef(c) ;% Finds the correlation coefficients
n=n(:);
n=n';
distance=zeros(1,5);
word1='Transmit';
word2='What ';
word3='Colour ';
word4='Computer';
words=vertcat(word1,word2,word3,word4);
for i=1:Datasize(1)
distance(1,i)=sqrt(sum((Dataset(i,:)-n(1,:)).^2));
end
[mindistance,index]=min(distance);
display('Detected word is ')
display(words(index,:))
Can someone plz guide me?
2 comentarios
Geoff Hayes
el 3 de Jul. de 2016
aliha - the error seems to suggest that index is greater than the number of rows in your matrix. What are the dimensions for words and for Dataset?
aliha wasim
el 3 de Jul. de 2016
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Speech Recognition en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!