[Julius-cvs 874] CVS update: julius4/julius

アーカイブの一覧に戻る

sumom****@users***** sumom****@users*****
2013年 12月 18日 (水) 12:55:20 JST


Index: julius4/julius/main.c
diff -u julius4/julius/main.c:1.6 julius4/julius/main.c:1.7
--- julius4/julius/main.c:1.6	Fri Jun 21 02:14:18 2013
+++ julius4/julius/main.c	Wed Dec 18 12:55:20 2013
@@ -12,7 +12,7 @@
  * @author Akinobu Lee
  * @date   Wed May 18 15:02:55 2005
  *
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
  * 
  */
 /*
@@ -178,7 +178,7 @@
   /* if -outfile option specified, callbacks for file output will be
      regitered */
   if (outfile_enabled) {
-    if (jconf->input.speech_input == SP_MFCFILE || jconf->input.speech_input == SP_RAWFILE) {
+    if (jconf->input.speech_input == SP_MFCFILE || jconf->input.speech_input == SP_RAWFILE || jconf->input.speech_input == SP_OUTPROBFILE) {
       setup_output_file(recog, NULL);
     } else {
       fprintf(stderr, "Warning: -outfile works only for file input, disabled now\n");
Index: julius4/julius/recogloop.c
diff -u julius4/julius/recogloop.c:1.6 julius4/julius/recogloop.c:1.7
--- julius4/julius/recogloop.c:1.6	Fri Jun 21 02:14:18 2013
+++ julius4/julius/recogloop.c	Wed Dec 18 12:55:20 2013
@@ -12,7 +12,7 @@
  * @author Akinobu Lee
  * @date   Sun Sep 02 21:12:52 2007
  *
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
  * 
  */
 /*
@@ -35,13 +35,14 @@
   int ret;
   FILE *mfclist;
   static char speechfilename[MAXPATHLEN];	/* pathname of speech file or MFCC file */
+  char *p;
   
   jconf = recog->jconf;
 
   /* reset file count */
   file_counter = 0;
   
-  if (jconf->input.speech_input == SP_MFCFILE) {
+  if (jconf->input.speech_input == SP_MFCFILE || jconf->input.speech_input == SP_OUTPROBFILE) {
     if (jconf->input.inputlist_filename != NULL) {
       /* open filelist for mfc input */
       if ((mfclist = fopen(jconf->input.inputlist_filename, "r")) == NULL) { /* open error */
@@ -63,9 +64,16 @@
     /*********************/
     /* open input stream */
     /*********************/
-    if (jconf->input.speech_input == SP_MFCFILE) {
+    if (jconf->input.speech_input == SP_MFCFILE || jconf->input.speech_input == SP_OUTPROBFILE) {
       /* from MFCC parameter file (in HTK format) */
-      VERMES("### read analyzed parameter\n");
+      switch(jconf->input.speech_input) {
+      case SP_MFCFILE:
+	VERMES("### read analyzed parameter\n");
+	break;
+      case SP_OUTPROBFILE:
+	VERMES("### read output probabilities\n");
+	break;
+      }
       if (jconf->input.inputlist_filename != NULL) {	/* has filename list */
 	do {
 	  if (getl_fp(speechfilename, MAXPATHLEN, mfclist) == NULL) {
@@ -78,7 +86,15 @@
 	  }
 	} while (speechfilename[0] == '\0' || speechfilename[0] == '#');
       } else {
-	if (get_line_from_stdin(speechfilename, MAXPATHLEN, "enter MFCC filename->") == NULL) {
+	switch(jconf->input.speech_input) {
+	case SP_MFCFILE:
+	  p = get_line_from_stdin(speechfilename, MAXPATHLEN, "enter MFCC filename->");
+	  break;
+	case SP_OUTPROBFILE:
+	  p = get_line_from_stdin(speechfilename, MAXPATHLEN, "enter OUTPROB filename->");
+	  break;
+	}
+	if (p == NULL) {
 	  fprintf(stderr, "%d files processed\n", file_counter);
 #ifdef REPORT_MEMORY_USAGE
 	  print_mem();



Julius-cvs メーリングリストの案内
アーカイブの一覧に戻る