in speech editing i am receiving an error using sound. ??? Error using ==> playsnd Data must have one or two columns. Error in ==> sound at 58 playsnd(y,fs,bits); is there any problem with sound function?

조회 수: 4 (최근 30일)
yfirst= y(1:24000);
ysecond=y(24001:48000);
save anjali ysecond yfirst -ascii
load anjali -ascii
t=0:1/fs:length(anjali)/fs-1/fs;
pause(2)
sound(anjali,fs);

채택된 답변

Walter Roberson
Walter Roberson 2013년 4월 8일
I suspect that if you check, you will find that anjali is either 24000 or 48000 columns, possibly with two rows. sound() requires that it be either one or two columns.
If you are trying to use those values as two channels, then you should just be using
anjali = reshape( y(1:48000), 24000, 2 );
sound(anjali, fs);
with none of that save and load.
  댓글 수: 5
anjali parashar
anjali parashar 2013년 4월 8일
편집: Walter Roberson 2013년 4월 8일
[y,fs,nbits]=wavread('C:\Users\HP\Desktop\angel_48k_stereo.wav');
sound(y,fs)
t=0:1/fs:length(y)/fs-1/fs;
i want that first i can listen this voice then after silence of 2 seconds i can listen back this voice.
Walter Roberson
Walter Roberson 2013년 4월 8일
silence = zeros(2 * fs, size(y,2)); %2 seconds
anjali = [y; silence; y];
sound(anjali, fs);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio 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