How to segment a voice signal into frames of 256 samples?

 採用された回答

Honglei Chen
Honglei Chen 2013 年 2 月 25 日

1 投票

Do you mean something like this?
x = rand(1024,1);
y = buffer(x,256);

5 件のコメント

Anurag Pujari
Anurag Pujari 2013 年 2 月 25 日
編集済み: Honglei Chen 2013 年 2 月 25 日
windowsize = Fs/10;
trailingsamples = mod(length(YourSignal), windowsize);
sampleframes = reshape( YourSignal(1:end-trailingsamples), windowsize, []);
Is it the way to do so?
Honglei Chen
Honglei Chen 2013 年 2 月 25 日
You can do that too. Your command there (I edited it to show the format) requires only MATLAB. But you can use buffer command if you have Signal Processing Toolbox and you can achieve the same by simply say
sampleframes = buffer(YourSignal(:),windowsize)
Then if you really don't want the tail, you can remove the last column.
See the reference of buffer at
wafa  derouaz
wafa derouaz 2016 年 11 月 1 日
Please, can you tell me how to recover the original signal after using 'buffer'?
Walter Roberson
Walter Roberson 2019 年 9 月 9 日
Saad Rehman comments to Honglei Chen:
for matlab 2016a version FRAMING is done via BUFFER function. Thumbs up!
Walter Roberson
Walter Roberson 2019 年 9 月 9 日
To recover the original signal after using buffer, use the (:) operator
buffered_signal = buffer(inputsignal, length_of_buffer);
reconstructed_signal = buffered_signal(:);
This assumes that no padding was needed and that there was no overlap used. If padding was needed then to reconstruct the original you would need to know the length of the original.

サインインしてコメントする。

その他の回答 (2 件)

guada
guada 2014 年 3 月 16 日

0 投票

i think i also have a similar problem, could you also please help me with this: given a with 7.238 second duration and fs=16000, i need 25 msec per frame and overlaps 10 msec every succesive frame.
sufyan masood
sufyan masood 2018 年 7 月 23 日

0 投票

how to decompose audio signal in transfered domain ?

カテゴリ

ヘルプ センター および File ExchangeSignal Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by