フィルターのクリア

how to tokenize a wave ?

2 ビュー (過去 30 日間)
huda farooqui
huda farooqui 2018 年 2 月 13 日
i did silence removal by the following code.
% Step 1 - break the signal into frames of 0.1 sec
[ip,fs]=audioread('E:\MATLAB\R2017a\examples\audio\respect.wav');
fs = 11025;
frame_duration= 0.1;
frame_len = frame_duration* fs;
N=length(ip);
num_frames= floor (N/frame_len);
new_sig = zeros(N,1);
count=0;
for i=1:num_frames
frame=ip((i-1)* frame_len+1:frame_len*i);
%step 2 = identify non silent frames by finding frames with max
%amplitude than 0.5
max_val=max(frame);
min_val=min(frame);
if(max_val>0.07)
%this frame is not silent
count= count +1
new_sig((count-1)*frame_len+1:frame_len*count)=frame
end
end
new_sig(24300:end)=[];
subplot(2,2,1)
plot(new_sig)
title('new')
subplot(2,2,2)
plot(ip)
title('old')
t=frame(:)
subplot(2,2,3)
plot(t)
sound(new_sig,fs)
my audio file is 'i respect your bold artistic vision' ,now i want to break my this sentence into 'I' then 'respect' 'bold' 'artistic' 'vision' ... so the point is i want to split my wave as same as we tokenize our string.

回答 (0 件)

カテゴリ

Help Center および File ExchangeHolidays / Seasons についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by