필터 지우기
필터 지우기

How to read raw speech signal without header in MATLAB ?

조회 수: 5 (최근 30일)
Dipesh  Mudatkar
Dipesh Mudatkar 2017년 3월 6일
댓글: Dipesh Mudatkar 2017년 3월 6일
I tried this code
fid = fopen('File_name','r');
y = fread(fid,inf,'short');
y = doubel(y);
sound(y)
but sound is not same as recorded.
  댓글 수: 2
Stephen23
Stephen23 2017년 3월 6일
편집: Stephen23 2017년 3월 6일
Where is the fclose ? If you use fopen then you need to use fclose.
Dipesh  Mudatkar
Dipesh Mudatkar 2017년 3월 6일
Yes it's necessary, but it will work without any problem.

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

채택된 답변

Walter Roberson
Walter Roberson 2017년 3월 6일
Try these two variations and see which one works for you:
fid = fopen('File_name','r');
ybe = fread(fid, inf, 'short=>double', 'ieee-be');
fclose(fid)
disp('Big Ended')
sound(ybe)
pause(5)
fid = fopen('File_name','r');
yle = fread(fid, inf, 'short=>double', 'ieee-le');
fclose(fid)
disp('Little Ended')
sound(yle)
  댓글 수: 6
Walter Roberson
Walter Roberson 2017년 3월 6일
I trust audioplayer() more than I would trust sound()
Dipesh  Mudatkar
Dipesh Mudatkar 2017년 3월 6일
Thank you, Finally, the problem got solved with audioplayer().

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by