Isolating words in speech
조회 수: 5 (최근 30일)
이전 댓글 표시
Good day, my task is to say 20 words into my microphone on matlab and to create an algorithm of some sorts in order to take the words given and separate them into their own audio file. This is what I have so far:
clear
r1 = audiorecorder(22050, 24, 1);
disp('Press Enter, then say 20 words that can be used to make multiple sentences');
pause;
recordblocking(r1,12); % speak into microphone & say the words
disp('Press Enter to listen to the recording');
pause;
p = play(r1); % listen
disp('Press Enter to plot the recording');
pause;
mySpeech1 = getaudiodata(r1, 'double'); % get data as int16 array
grid on;
disp('Press enter to save file');
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');
t = linspace(0, 1, size(y,1))/fs;
tTrans=transpose(t); %Time's x-values
y=y-yn; %Remove the average noise
plot(tTrans,y);
hold off;
pause;
If possible could someone please provide an idea of what code i can use or direction I should look into. I've kindof been thrown into the task without resources provided that could help and I'm struggling to find. Thanks in advance!
댓글 수: 1
Walter Roberson
2021년 8월 21일
https://www.mathworks.com/matlabcentral/answers/?term=tag%3A%22silence+detection%22 might be a beginning.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio and Video Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!