Mercurial > hg > aimc
view wiki/AIMCDataFormat.wiki @ 705:be2b68ced23d
Make the C++ SAI match the Matlab implementation.
- Fix syntax error which caused a linear window to be used instead of the correct sine window.
- Correct off-by-one indexing errors to compensate for 1-based indexing in Matlab.
- Enable test to verify that the C++ output matches Matlab with high precision.
author | ronw@google.com |
---|---|
date | Tue, 16 Jul 2013 19:56:16 +0000 |
parents | bc75da283e83 |
children |
line wrap: on
line source
#summary AIM-C simple data file format. The module [http://code.google.com/p/aimc/source/browse/trunk/src/Modules/Output/FileOutputAIMC.cc FileOutputAIMC] provides data in a simple format which can be read by other programs. The data is stored as 32-bit floats with the native byte-ordering of the machine the file was written on. Before the data, there is a simple header. == Header format == The first 20 bytes of the file contain the following fields: * 32-bit unsigned integer: frame count - total number of frames in the file (these can be SAIs, filterbank output frames or other things (eg. features), but all frames in the file are of the same type) * 32-bit float: frame period (the interval between adjacent frames in milliseconds) (TODO(tom): this is currently not set properly). * 32-bit unsigned integer: channel count (number of frequency channels in the output) * 32-bit unsigned integer frame length (length of each frame in samples) * 32-bit float: sample rate (audio sample rate in Hz) == Reading the files using MATLAB == Use [http://code.google.com/p/aimc/source/browse/trunk/matlab/AIMCread.m the MATLAB AIMCread function] to read the files.