I have got a duration of speech signal of 3.2 sec how can i split this into 3 equal parts??
2 次查看(过去 30 天)
显示 更早的评论
I have got a duration of speech signal of 3.2 sec how can i split this into 3 equal parts?? can any1 help me with matlab code plss!!!
0 个评论
采纳的回答
Walter Roberson
2013-4-29
firstthird = floor(length(YourSignal)/3);
secondthird = firstthird + floor((length(YourSignal) - firstthird)/2);
part1 = YourSignal(1:firstthird,:);
part2 = YourSignal(firstthird+1:secondthird,:);
part3 = YourSignal(secondthird+1:end, :);
Note that it is possible that the signal is not exactly divisible into 3 pieces. For example, if it were 17 samples then you cannot get 5 2/3 samples per part, and instead need to break it up into 5/5/7 or 5/6/6 or any permutation of those possibilities. The above code would choose 5/6/6 in that case.
3 个评论
Walter Roberson
2013-4-30
Your question was about "equal parts", and equal parts can easily end up with split sounds.
You may want to search the forum for "detect silence".
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!