i am trying a code on speech recognition
조회 수: 1 (최근 30일)
이전 댓글 표시
clc;
close all;
clear all;
figure(2)
fs=44100;
[y, fs]=audioread('oil.wav'); % Read wave file
%sound(y, fs); % Playback
left=y(:,1); % Left channel
right=y(:,2); % Right channel
subplot(3,1,1),
h=((1:length(left))/fs);
plot(h,left)
subplot(3,1,2),
h1=((1:length(right))/fs);
plot(h1,right)
h3=[h h1];
subplot(3,1,3)
plot(h3)
figure(3)
recObj = audiorecorder
disp('Start speaking.')
recordblocking(recObj, 3);
disp('End of Recording.');
y10 = getaudiodata(recObj);
left1=y10(:,1); % Left channel
right1=y10(:,2); % Right channel
subplot(4,1,1),
h2=((1:length(left1))/fs);
plot(h2,left1)
subplot(4,1,2),
h4=((1:length(right1))/fs);
plot(h4,right1)
h5=[h2 h4];
subplot(4,1,3)
plot(h5)
sound(y10)
figure(4)
z=xcorr(h3,h5)
plot(z)
if (h5<=z)
disp('oil')
else
disp('wrong')
end
i am trying to recognize a word oil and the error is Index exceeds matrix dimensions.
kindly help me if any already have real time speech recognition code thanx in advance.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Speech Recognition에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!