RASIK KUMAR
Newbie level 2
HI I HV WRITN THE CODE FOR TAKING THE INPUT FORM A MIC....
NOW I HAVE TO WRITE...A CODE FOR RECOGNITION OF THE INPUT.......
MATCH THEM.....AND SEND THE OUTPUT TO PRTS.........
THE CODE IS AS FOLOWS..........
clear all;
clc;
Fs = 22000; % Sampling Frequency (Hz)
n = 10000; % Number of filters (frequency bands)
Nseconds = 3; % Length of speech signal
% List of words (you can add more words to this list but make sure
% each word has five characters (if less then pad it with spaces)
words = [' up';
' down';
% ' left';
% 'right'
];
% Matrix to store features for each word (rows correspond to words)
x = [];
j=zeros(10000,1);
fprintf('You will get one second to say each word.\n\n');
% For each word, get the word from microphone and compute its features
for i=1:size(words,1)
fprintf('Hit enter and say immediately ''%s'':',words(i,);
% pause for enter key
junk=input('');
% get a word from microphone
y = wavrecord(Nseconds*Fs, Fs, 'double');
y= cat(1,y,j);
x=[x y];
% Calculate the features of the word
% Save them in the features matrix
% abs(f)
% plot(1:Fs,fft);
end
% Save features matrix to a file (this file will be loaded into Matlab during speech recognition)
save words_bof.mat Fs n words x;
AFTER RUNNING///// USE
WAVRECORD(X,FS,N,'UNTITLED.WAVE')
IT WL B STORED IN WORK OF MATLAB....
PLZ DO REPLY ....
NOW I HAVE TO WRITE...A CODE FOR RECOGNITION OF THE INPUT.......
MATCH THEM.....AND SEND THE OUTPUT TO PRTS.........
THE CODE IS AS FOLOWS..........
clear all;
clc;
Fs = 22000; % Sampling Frequency (Hz)
n = 10000; % Number of filters (frequency bands)
Nseconds = 3; % Length of speech signal
% List of words (you can add more words to this list but make sure
% each word has five characters (if less then pad it with spaces)
words = [' up';
' down';
% ' left';
% 'right'
];
% Matrix to store features for each word (rows correspond to words)
x = [];
j=zeros(10000,1);
fprintf('You will get one second to say each word.\n\n');
% For each word, get the word from microphone and compute its features
for i=1:size(words,1)
fprintf('Hit enter and say immediately ''%s'':',words(i,);
% pause for enter key
junk=input('');
% get a word from microphone
y = wavrecord(Nseconds*Fs, Fs, 'double');
y= cat(1,y,j);
x=[x y];
% Calculate the features of the word
% Save them in the features matrix
% abs(f)
% plot(1:Fs,fft);
end
% Save features matrix to a file (this file will be loaded into Matlab during speech recognition)
save words_bof.mat Fs n words x;
AFTER RUNNING///// USE
WAVRECORD(X,FS,N,'UNTITLED.WAVE')
IT WL B STORED IN WORK OF MATLAB....
PLZ DO REPLY ....