How to open a headerless wav file?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Martin
am 1 Okt. 2013
Beantwortet: Prernna Bhatnagar
am 23 Feb. 2017
Hi!
I have some files here, which have a special file format, but are actually just headerless wav files with a sample rate of 16000.
I wanted to do some fft plotting of the wav file like so
plot(abs(fft(audioread(wav_file))));
However, I get the The file type is not supported message.
Is there a way to open those files or do I have to save them was wav files first?
EDIT:
To clearify, the files mentioned are indeed raw binaries. As I haven't recorded those datas myself, I can only guess about the internal structure. I can analyze the file just fine with these import settings in Wavesurfer:
Sample rate: 16kHz
Encoding: Lin16
Channels: Mono
Byte Order: Little Endian
Read Offset: 0
Frequency: It will probably be something between 0-8kHz, since I was suppose to sample with 16kHz (right?)
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 2 Okt. 2013
Bearbeitet: Walter Roberson
am 2 Okt. 2013
You use fopen() to open them, and fread() to read them, and you apply your knowledge of the internal structure of .wav files to decode what you read in.
But you will likely find it to be much less coding to write out a temporary copy of the file with the missing header pre-pended and use audioread() on the result.
Your you sure they are in .wav format, and not raw binary data ?
Weitere Antworten (2)
Jan
am 2 Okt. 2013
As far as I know, there are no "headerless WAV files". The header is mandatory for the WAV format.
Most likely you have simple binary files with raw data. But now you have to know the number of channels, the format of the single values (single, double, int16?), the frequency and for multiple channels, if the signal is stored in time or channel order. If you provide the required information, we can suggest a method to import the file.
Prernna Bhatnagar
am 23 Feb. 2017
Can anyone tell me how to open .adc files in matlan and then plot them? These filescontain EMG Signals.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Audio I/O and Waveform Generation finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!