julius/word_align.c File Reference

Do Viterbi alignment per word / phoneme/ state. More...

#include <julius.h>

Include dependency graph for word_align.c:

Go to the source code of this file.

Defines

#define PER_WORD   1
#define PER_PHONEME   2
#define PER_STATE   3

Functions

static HMM_Logical ** make_phseq (WORD_ID *wseq, short num, int *num_ret, int **end_ret, int per_what)
static void do_align (WORD_ID *words, short wnum, HTK_Param *param, int per_what)
void word_align (WORD_ID *words, short wnum, HTK_Param *param)
void word_rev_align (WORD_ID *revwords, short wnum, HTK_Param *param)
void phoneme_align (WORD_ID *words, short num, HTK_Param *param)
void phoneme_rev_align (WORD_ID *revwords, short num, HTK_Param *param)
void state_align (WORD_ID *words, short num, HTK_Param *param)
void state_rev_align (WORD_ID *revwords, short num, HTK_Param *param)


Detailed Description

Do Viterbi alignment per word / phoneme/ state.

Author:
Akinobu Lee
Date:
Sat Sep 24 16:09:46 2005
This file defines functions for performing forced alignment of recognized words. The forced alignment is implimented in Julius/Julian to get the best matching segmentation of recognized word sequence upon input speech. Word-level, phoneme-level and HMM state-level alignment can be obtained.

Julius/Julian performs the forced alignment as a post-processing of recognition process. Recomputation of Viterbi path on the recognized word sequence toward input speech will be done after the recognition to get better alignment.

Revision
1.3

Definition in file word_align.c.


Function Documentation

static HMM_Logical** make_phseq ( WORD_ID wseq,
short  num,
int *  num_ret,
int **  end_ret,
int  per_what 
) [static]

Make the whole sentence HMM from given word sequence by connecting each phoneme HMM.

Parameters:
wseq [in] word sequence to align
num [in] number of wseq
num_ret [out] number of HMM contained in the generated sentence HMM
end_ret [out] sequence of state location as alignment unit
per_what [in] specify the alignment unit (word / phoneme / state)
Returns:
newly malloced HMM sequences.

Definition at line 77 of file word_align.c.

Referenced by do_align().

static void do_align ( WORD_ID words,
short  wnum,
HTK_Param param,
int  per_what 
) [static]

Build sentence HMM, call viterbi_segment() and output result.

Parameters:
words [in] word sequence of the sentence
wnum [in] number of words in words
param [in] input parameter vector
per_what [in] specify the alignment unit (word / phoneme / state)

Definition at line 187 of file word_align.c.

Referenced by phoneme_align(), phoneme_rev_align(), state_align(), state_rev_align(), word_align(), and word_rev_align().

void word_align ( WORD_ID words,
short  wnum,
HTK_Param param 
)

Do forced alignment per word for the given word sequence.

Parameters:
words [in] word sequence
wnum [in] length of words
param [in] input parameter vectors

Definition at line 381 of file word_align.c.

void word_rev_align ( WORD_ID revwords,
short  wnum,
HTK_Param param 
)

Do forced alignment per word for the given word sequence (reversed order).

Parameters:
revwords [in] word sequence in reversed direction
wnum [in] length of revwords
param [in] input parameter vectors

Definition at line 403 of file word_align.c.

Referenced by result_reorder_and_output().

void phoneme_align ( WORD_ID words,
short  num,
HTK_Param param 
)

Do forced alignment per phoneme for the given word sequence.

Parameters:
words [in] word sequence
num [in] length of words
param [in] input parameter vectors

Definition at line 430 of file word_align.c.

void phoneme_rev_align ( WORD_ID revwords,
short  num,
HTK_Param param 
)

Do forced alignment per phoneme for the given word sequence (reversed order).

Parameters:
revwords [in] word sequence in reversed direction
num [in] length of revwords
param [in] input parameter vectors

Definition at line 452 of file word_align.c.

Referenced by result_reorder_and_output().

void state_align ( WORD_ID words,
short  num,
HTK_Param param 
)

Do forced alignment per HMM state for the given word sequence.

Parameters:
words [in] word sequence
num [in] length of words
param [in] input parameter vectors

Definition at line 479 of file word_align.c.

void state_rev_align ( WORD_ID revwords,
short  num,
HTK_Param param 
)

Do forced alignment per state for the given word sequence (reversed order).

Parameters:
revwords [in] word sequence in reversed direction
num [in] length of revwords
param [in] input parameter vectors

Definition at line 501 of file word_align.c.

Referenced by result_reorder_and_output().


Generated on Tue Dec 26 16:17:01 2006 for Julius by  doxygen 1.5.0