フィルターのクリア

pauses in audio data

3 ビュー (過去 30 日間)
Mengjia Lyu
Mengjia Lyu 2021 年 1 月 6 日
回答済み: Kiran Felix Robert 2021 年 2 月 12 日
Dear community,
Is there a way to insert timed pauses (say 1s pause) into an audio array in MATLAB?

回答 (1 件)

Kiran Felix Robert
Kiran Felix Robert 2021 年 2 月 12 日
Hi Mengjia,
You can use array concatenation to introduce pauses into an audio array.
Assuming you need to have a 1s pause and you will have Fs number of samples in one second (Fs is the sampling frequency), refer the following script for an example,
load gong.mat
% Fs -> Sampling Frequency
% y -> Audio data
% A 1 second pause, in one second you will have Fs number of samples
pause = zeros(Fs,1);
% New array Y
Y = [y(1:4201);pause;y(4202:end)]; % Array concatenation
sound(Y)

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by