Filter löschen
Filter löschen

How to read raw speech signal without header in MATLAB ?

5 Ansichten (letzte 30 Tage)
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 Kommentare
Stephen23
Stephen23 am 6 Mär. 2017
Bearbeitet: Stephen23 am 6 Mär. 2017
Where is the fclose ? If you use fopen then you need to use fclose.
Dipesh  Mudatkar
Dipesh Mudatkar am 6 Mär. 2017
Yes it's necessary, but it will work without any problem.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 6 Mär. 2017
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 Kommentare
Walter Roberson
Walter Roberson am 6 Mär. 2017
I trust audioplayer() more than I would trust sound()
Dipesh  Mudatkar
Dipesh Mudatkar am 6 Mär. 2017
Thank you, Finally, the problem got solved with audioplayer().

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by