[Julius-cvs 918] CVS update: julius4/libsent/src/wav2mfcc

Back to archive index

sumom****@users***** sumom****@users*****
2014年 1月 15日 (水) 14:31:08 JST


Index: julius4/libsent/src/wav2mfcc/wav2mfcc-pipe.c
diff -u julius4/libsent/src/wav2mfcc/wav2mfcc-pipe.c:1.11 julius4/libsent/src/wav2mfcc/wav2mfcc-pipe.c:1.12
--- julius4/libsent/src/wav2mfcc/wav2mfcc-pipe.c:1.11	Sun Jan  5 16:01:01 2014
+++ julius4/libsent/src/wav2mfcc/wav2mfcc-pipe.c	Wed Jan 15 14:31:08 2014
@@ -20,7 +20,7 @@
  * @author Akinobu LEE
  * @date   Thu Feb 17 18:12:30 2005
  *
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
  * 
  */
 /*
@@ -47,6 +47,8 @@
 #include <sent/mfcc.h>
 #include <sent/htk_param.h>
 
+#define MAXBUFLEN  4096		///< Maximum length of a line in the input
+
 /***********************************************************************/
 /** 
  * Allocate a new delta cycle buffer.
@@ -533,9 +535,9 @@
     int d, dv, len;
 
     jlog("Stat: wav2mfcc-pipe: reading HTK-format cepstral vectors\n");
-    buf = (char *)mymalloc(MAXLINELEN);
+    buf = (char *)mymalloc(MAXBUFLEN);
     mode = 0;
-    while(getl(buf, MAXLINELEN, fp) != NULL) {
+    while(getl(buf, MAXBUFLEN, fp) != NULL) {
       for (p = mystrtok_quote(buf, "<> \t\r\n"); p; p = mystrtok_quote(NULL, "<> \t\r\n")) {
 	switch(mode){
 	case 0:
@@ -666,15 +668,14 @@
   /* unlike HTK, full mean will be written for variance estimation */
   fprintf(fp, "<MEAN> %d\n", c->veclen);
   for(d=0;d<c->veclen;d++) {
-    fprintf(fp, " %e", c->cmean_init[d]);
+    fprintf(fp, " %e\n", c->cmean_init[d]);
   }
   if (c->var) {
-    fprintf(fp, "\n<VARIANCE> %d\n", c->veclen);
+    fprintf(fp, "<VARIANCE> %d\n", c->veclen);
     for(d=0;d<c->veclen;d++) {
-      fprintf(fp, " %e", c->cvar_init[d]);
+      fprintf(fp, " %e\n", c->cvar_init[d]);
     }
   }
-  fprintf(fp, "\n");
 
   fclose_writefile(fp);
 



Julius-cvs メーリングリストの案内
Back to archive index