PandA-2024.02
viterbi.h
Go to the documentation of this file.
1 /*
2 Based on:
3 Lawrence Rabiner. "A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition." Proc. IEEE, v77, #2. 1989.
4 */
5 
6 #include <stdlib.h>
7 #include <stdio.h>
8 #include <stdint.h>
9 #include <fcntl.h>
10 #include "support.h"
11 
12 #define TYPE double
13 typedef uint8_t tok_t;
14 typedef TYPE prob_t;
15 typedef uint8_t state_t;
16 typedef int32_t step_t;
17 
18 //#define N_STATES 5
19 //#define N_OBS 32
20 //#define N_TOKENS 9
21 #define N_STATES 64
22 #define N_OBS 140
23 #define N_TOKENS 64
24 
25 int viterbi( tok_t obs[N_OBS], prob_t init[N_STATES], prob_t transition[N_STATES*N_STATES], prob_t emission[N_STATES*N_TOKENS], state_t path[N_OBS] );
26 
28 // Test harness interface code.
29 
30 struct bench_args_t {
36 };
uint8_t tok_t
Definition: viterbi.h:13
TYPE prob_t
Definition: viterbi.h:14
int32_t step_t
Definition: viterbi.h:16
int viterbi(tok_t obs[N_OBS], prob_t init[N_STATES], prob_t transition[N_STATES *N_STATES], prob_t emission[N_STATES *N_TOKENS], state_t path[N_OBS])
Definition: viterbi.c:3
prob_t transition[N_STATES *N_STATES]
Definition: viterbi.h:33
prob_t emission[N_STATES *N_TOKENS]
Definition: viterbi.h:34
state_t path[N_OBS]
Definition: viterbi.h:35
void init(int bucket[BUCKETSIZE])
Definition: sort.c:42
prob_t init[N_STATES]
Definition: viterbi.h:32
#define N_OBS
Definition: viterbi.h:22
uint8_t state_t
Definition: viterbi.h:15
#define TYPE
Definition: viterbi.h:12
tok_t obs[N_OBS]
Definition: viterbi.h:31
#define N_STATES
Definition: viterbi.h:21
#define N_TOKENS
Definition: viterbi.h:23

Generated on Mon Feb 12 2024 13:02:50 for PandA-2024.02 by doxygen 1.8.13