[Julius-cvs 351] CVS update: julius4/libjulius/include/julius

アーカイブの一覧に戻る

sumom****@users***** sumom****@users*****
2008年 12月 12日 (金) 16:14:57 JST


Index: julius4/libjulius/include/julius/extern.h
diff -u julius4/libjulius/include/julius/extern.h:1.10 julius4/libjulius/include/julius/extern.h:1.11
--- julius4/libjulius/include/julius/extern.h:1.10	Sun Nov 16 21:28:03 2008
+++ julius4/libjulius/include/julius/extern.h	Fri Dec 12 16:14:57 2008
@@ -12,7 +12,7 @@
  * @author Akinobu LEE
  * @date   Mon Mar  7 23:19:14 2005
  *
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
  * 
  */
 /*
@@ -147,12 +147,12 @@
 int mfcc_go(Recog *recog, int (*ad_check)(Recog *));
 
 /* word_align.c */
-void word_align(WORD_ID *words, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r);
-void phoneme_align(WORD_ID *words, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r);
-void state_align(WORD_ID *words, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r);
-void word_rev_align(WORD_ID *revwords, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r);
-void phoneme_rev_align(WORD_ID *revwords, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r);
-void state_rev_align(WORD_ID *revwords, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r);
+void word_align(WORD_ID *words, short wnum, HTK_Param *param, SentenceAlign *align, RecogProcess *r);
+void phoneme_align(WORD_ID *words, short wnum, HTK_Param *param, SentenceAlign *align, RecogProcess *r);
+void state_align(WORD_ID *words, short wnum, HTK_Param *param, SentenceAlign *align, RecogProcess *r);
+void word_rev_align(WORD_ID *revwords, short wnum, HTK_Param *param, SentenceAlign *align, RecogProcess *r);
+void phoneme_rev_align(WORD_ID *revwords, short wnum, HTK_Param *param, SentenceAlign *align, RecogProcess *r);
+void state_rev_align(WORD_ID *revwords, short wnum, HTK_Param *param, SentenceAlign *align, RecogProcess *r);
 void do_alignment_all(RecogProcess *r, HTK_Param *param);
 
 /* m_usage.c */
@@ -290,6 +290,8 @@
 
 /* recogmain.c */
 int adin_cut_callback_store_buffer(SP16 *now, int len, Recog *recog);
+SentenceAlign *result_align_new();
+void result_align_free(SentenceAlign *a);
 void result_sentence_malloc(RecogProcess *r, int num);
 void result_sentence_free(RecogProcess *r);
 void clear_result(RecogProcess *r);
Index: julius4/libjulius/include/julius/recog.h
diff -u julius4/libjulius/include/julius/recog.h:1.5 julius4/libjulius/include/julius/recog.h:1.6
--- julius4/libjulius/include/julius/recog.h:1.5	Fri Nov 14 04:44:09 2008
+++ julius4/libjulius/include/julius/recog.h	Fri Dec 12 16:14:57 2008
@@ -70,7 +70,7 @@
  * @author Akinobu Lee
  * @date   Fri Feb 16 13:42:28 2007
  *
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
  * 
  */
 /*
@@ -294,6 +294,24 @@
 } GMMCalc;
 
 /**
+ * Alignment result, valid when forced alignment was done
+ * 
+ */
+typedef struct __sentence_align__ {
+  int num;                    ///< Number of units
+  short unittype;             ///< Unit type (one of PER_*)
+  WORD_ID *w;                 ///< word sequence by id (PER_WORD)
+  HMM_Logical **ph;     ///< Phone sequence (PER_PHONEME, PER_STATE)
+  short *loc; ///< sequence of state location in a phone (PER_STATE)
+  boolean *is_iwsp;           ///< TRUE if PER_STATE and this is the inter-word pause state at multipath mode
+  int *begin_frame;           ///< List of beginning frame
+  int *end_frame;             ///< List of ending frame
+  LOGPROB *avgscore;          ///< Score averaged by frames
+  LOGPROB allscore;           ///< Re-computed acoustic score
+  struct __sentence_align__ *next; ///< data chain pointer
+} SentenceAlign;
+
+/**
  * Output result structure
  * 
  */
@@ -305,27 +323,7 @@
   LOGPROB score_lm;             ///< Language model likelihood (scaled) for N-gram
   LOGPROB score_am;             ///< Acoustic model likelihood for N-gram
   int gram_id;                  ///< The grammar ID this sentence belongs to for DFA
-
-  /**
-   * Alignment result, valid when forced alignment was done
-   * 
-   */
-  struct {
-    boolean filled;             ///< True if has data
-    int num;                    ///< Number of units
-    short unittype;             ///< Unit type (one of PER_*)
-
-    WORD_ID *w;                 ///< word sequence by id (PER_WORD)
-    HMM_Logical **ph;     ///< Phone sequence (PER_PHONEME, PER_STATE)
-    short *loc; ///< sequence of state location in a phone (PER_STATE)
-    boolean *is_iwsp;           ///< TRUE if PER_STATE and this is the inter-word pause state at multipath mode
-
-    int *begin_frame;           ///< List of beginning frame
-    int *end_frame;             ///< List of ending frame
-    LOGPROB *avgscore;          ///< Score averaged by frames
-   
-    LOGPROB allscore;           ///< Re-computed acoustic score
-  } align;
+  SentenceAlign *align;
 
 } Sentence;
 


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