segDecoder.c File Reference

Generic Viterbi-type decorder for segmental HMMs. More...

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "segCommon.h"
#include "segStdLib.h"
#include "segDecoder.h"

Data Structures

struct  node
 Node probability buffer storing SNPs and an ENP. More...
struct  StartNodeParameter
 Parameters realising rolling-SNP-array mechanism. More...

Defines

#define ALLOC_ERR   -2
 Function return value when memory allocation failed.
#define ERROR   -1
 Function return value when an error occurred.
#define NO_ERROR   0
 Function return value when the function was executed successfully.
#define PERMIT_BOTH   0x03
 Status for nodes that can be both start and end nodes (assigned by pre-cost partition).
#define PERMIT_START   0x02
 Status for nodes that can be only a start node (assigned by pre-cost partition).
#define PERMIT_END   0x01
 Status for nodes that can be only an end node (assigned by pre-cost partition).
#define NO_PERMIT   0x00
 Status for nodes that can be neither start nor end node (assigned by pre-cost partition).

Typedefs

typedef node NODE
 Node probability buffer storing SNPs and an ENP.
typedef StartNodeParameter SNP_PARAM
 Parameters realising rolling-SNP-array mechanism.

Functions

double segViterbiDecoder (SEG_DP_ITEM ***dpHist, SEG_SYNTAX *synt, double **spData, int *breakPt, int sT, int eT, int maxDur, SEG_DEC_PARAM *decParam)
 Generic Viterbi-type decorder for segmental HMMs.
int segFreeDecoder (SEG_DP_ITEM **dpHist, int numStates)
 Free memory space storing all the paths in the trellis.


Detailed Description

Generic Viterbi-type decorder for segmental HMMs.

Date:
09.06.2006, 21.06.2007 (revised)
Author:
Yoshinori Shiga @ CVSSP, University of Surrey
Note:
Introducing a concept of start and end node to M Russell & P Jackson's SEGVit ver.3 has achieved computationally- efficient decoding with effective pruning for segmental HMMs. This makes it possible to perform embedded recognition using context-sensitive (triphone) models, within a resonable time. A token-passing-style algorithm has been applied to reduce memory used.
Abbrev - SN: start node, EN: end node, SNP: start-node probability, ENP: end-node probability
Revision

Function Documentation

int segFreeDecoder ( SEG_DP_ITEM **  dpHist,
int  numStates 
)

Free memory space storing all the paths in the trellis.

Parameters:
[in] dpHist Paths in the trellis for back-tracing
[in] numStates Number of states
Return values:
NO_ERROR Successful execution
Author:
Yoshinori Shiga @ CVSSP, University of Surrey

double segViterbiDecoder ( SEG_DP_ITEM ***  dpHist,
SEG_SYNTAX synt,
double **  spData,
int *  breakPt,
int  sT,
int  eT,
int  maxDur,
SEG_DEC_PARAM decParam 
)

Generic Viterbi-type decorder for segmental HMMs.

Parameters:
[out] dpHist Paths in the trellis for back-tracing
[in] synt Syntax
[in] spData Acoustic feature vectors
[in] breakPt Break point attributes
[in] sT Utterance start time (frame #)
[in] eT Utterance end time (frame #)
[in] maxDur Maximal segment-duration (Dmax)
[in] decParam Decoder parameters
Return values:
RTN_ERROR Memory allocation error
Otherwise The best cost (minProb) computed
Author:
Yoshinori Shiga @ CVSSP, University of Surrey
Note:
The following functions are called internally: allocDpHistory(), initDecoder(), preCostPartition(), firstPropagator(), selector(), incSnpIdx(), propagator(), prunStartNode(), prunEndNode(), lastPropagator(), lastSelector(), and freeAllNode().
See also:
allocDpHistory(), initDecoder(), preCostPartition(), firstPropagator(), selector(), incSnpIdx(), propagator(), prunStartNode(), prunEndNode(), lastPropagator(), lastSelector() and freeAllNode().


Generated on Sun Aug 5 02:40:37 2007 for SEGRec Version 1.0 by  doxygen 1.5.1