Speech recognition separating words.
이전 댓글 표시
Good day, my task is to create a program that allows the user to record his/her voice and say a few words with pauses inbetween. I then have to create an algorithm to separate the words from that single audio file and save them into their own audio file. This is what I have so far:
Help would be VERY much appreciated. Thanks in advance
clear
r1 = audiorecorder(22050, 24, 1);
disp('Press Enter, then say 20 words that can be used to make multiple sentences');
pause;
recordblocking(r1,3); % speak into microphone & say the words
disp('Press Enter to listen to the recording');
pause;
p = play(r1); % listen to words
disp('Press Enter to save recording');
pause;
mySpeech1 = getaudiodata(r1, 'double'); % get data as int16 array
grid on;
disp('Press enter to save file'); % save the audio file (Change location for testing.
pause;
filename = 'C:\Users\leone\OneDrive\Desktop\Year 2\Semester 2\EERI 222\Practical1\Recording.wav';
audiowrite(filename, mySpeech1,22050);
[yn, fs] = audioread('Noise.wav');
yn=mean(yn); %Get the average noise
[y, fs] = audioread('Recording.wav'); %Remove the average noise
t = linspace(0, 1, size(y,1))/fs;
tTrans=transpose(t); %Time as x-values
disp('Press Enter to plot the recording');
pause;
y=y-yn;
plot(tTrans,y); %Plot the time vs Amplitude of sound
hold off;
pause;
%g = y(abs(y)>0.001); Attempt to only get the parts where the y-value is greater than 0.001 (Only the parts where words are said)
%hold off;
%plotv(g,'*'); Trying to plot only the words said.
댓글 수: 2
Izak Adendorff
2021년 9월 4일
I would suggest that you do your OWN EERI222 work and not copy the first answer that someone posts here. Best of luck!
Leon Ellis
2021년 9월 4일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Speech Recognition에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



