HTK file writing parameters problem

1 visualización (últimos 30 días)
Peter
Peter el 29 de Oct. de 2016
% Open file for writing:
fid = fopen(filename, 'w', 'ieee-be');
% Write the header information%
fwrite(fid, nSamples, 'int32'); % number of vectors in file (4 byteint)
fwrite(fid, sampPeriod, 'int32'); % sample period in 100ns units (4 byte int)
fwrite(fid, sampSize, 'int16'); % number of bytes per sample (2 byte int)
fwrite(fid, parmKind, 'int16'); % code for the sample kind (2 byte int)
% Write the data: one coefficient at a time:
for i = 1:nSamples
for j = 1:numVecHead
fwrite(fid, data(j, i), 'float32');
end
end
I have some given code about writing a HTK file, but I am not sure what is the parameter of it. Let's say I am using audiorecorder to record a sound.
r = audiorecorder(16000,16,1);
After I got a audio data (x) from r, what do I need to fill into the parameter of the code?
nSamples, sampPeriod, sampSize, parmKind, numVecHead
Thanks

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by