Results 1 to 1 of 1
Thread: HTK files from Java problem.
- 12-17-2010, 11:15 PM #1
Member
- Join Date
- Dec 2010
- Posts
- 3
- Rep Power
- 0
HTK files from Java problem.
Hi!
I am making a Java application that uses HTK recognition.
I need Java to create feature files in HTK format from
certain data that the program handles. So, I need from
Java to create new files and add data to them. I have
a MatLab function that does this I want:
function escribeHTK(file,d,fp,tc)
fid = fopen(file,'w','b');
[nf,nv] = size(d);
fwrite(fid,nf,'long'); % write frame count
fwrite(fid,round(fp*1.E7),'long'); % write frame period (in 100 ns units)
nby = nv * 4;
fwrite(fid,nby,'short'); % write byte count
fwrite(fid,tc,'short'); % write type code
fwrite(fid,d.','float'); % write data array
fclose(fid);
But I need to do that in Java. The function above generates
a file whose data format is IEEE754 floating-point big-endian.
Then, the function adds a header and append the features, where
every variable has its own precission.
I have tried to deploy the function above in Java defining
every variable correspondingly (short, long...) and after,
writing in an output stream the header and features using
the method "floatToIntBits" from "Float" class. This
did not work because HTk does not recognize the resulting files
(as if the file does not have the correct format).
I do not want to use MatLab Builder JA so, what can I do?
Anybody knows how can I deploy it?
Thanks a lot.
Regards.
Similar Threads
-
jar files problem
By ron2794 in forum JDBCReplies: 7Last Post: 12-16-2010, 07:58 AM -
Convert avi, mpeg, wmv media files to .flv files in java code
By vinay1497 in forum New To JavaReplies: 8Last Post: 07-30-2010, 05:47 PM -
problem communication between 2 files
By Questionmark in forum AWT / SwingReplies: 6Last Post: 07-30-2009, 11:23 AM -
conversion of java .class files to .java files
By kotturupraveen in forum New To JavaReplies: 2Last Post: 06-09-2008, 12:58 PM -
problem with viewing .java files when Visual J# 2005 Express Edition exist
By unhurt in forum New To JavaReplies: 3Last Post: 11-03-2007, 01:58 PM
Bookmarks