Speech recognition separating words.
Afficher commentaires plus anciens
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 commentaires
Izak Adendorff
le 4 Sep 2021
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
le 4 Sep 2021
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Speech Recognition dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



