44 #ifndef __POCKETSPHINX_INTERNAL_H__ 45 #define __POCKETSPHINX_INTERNAL_H__ 48 #include <sphinxbase/cmd_ln.h> 49 #include <sphinxbase/logmath.h> 50 #include <sphinxbase/fe.h> 51 #include <sphinxbase/feat.h> 52 #include <sphinxbase/profile.h> 78 char const *(*hyp)(
ps_search_t *search, int32 *out_score, int32 *out_is_final);
106 #define ps_search_base(s) ((ps_search_t *)s) 107 #define ps_search_config(s) ps_search_base(s)->config 108 #define ps_search_acmod(s) ps_search_base(s)->acmod 109 #define ps_search_dict(s) ps_search_base(s)->dict 110 #define ps_search_dict2pid(s) ps_search_base(s)->d2p 111 #define ps_search_dag(s) ps_search_base(s)->dag 112 #define ps_search_last_link(s) ps_search_base(s)->last_link 113 #define ps_search_post(s) ps_search_base(s)->post 114 #define ps_search_lookahead(s) ps_search_base(s)->pls 115 #define ps_search_n_words(s) ps_search_base(s)->n_words 117 #define ps_search_name(s) ps_search_base(s)->vt->name 118 #define ps_search_start(s) (*(ps_search_base(s)->vt->start))(s) 119 #define ps_search_step(s,i) (*(ps_search_base(s)->vt->step))(s,i) 120 #define ps_search_finish(s) (*(ps_search_base(s)->vt->finish))(s) 121 #define ps_search_reinit(s,d,d2p) (*(ps_search_base(s)->vt->reinit))(s,d,d2p) 122 #define ps_search_free(s) (*(ps_search_base(s)->vt->free))(s) 123 #define ps_search_lattice(s) (*(ps_search_base(s)->vt->lattice))(s) 124 #define ps_search_hyp(s,sc,final) (*(ps_search_base(s)->vt->hyp))(s,sc,final) 125 #define ps_search_prob(s) (*(ps_search_base(s)->vt->prob))(s) 126 #define ps_search_seg_iter(s,sc) (*(ps_search_base(s)->vt->seg_iter))(s,sc) 129 #define ps_search_silence_wid(s) ps_search_base(s)->silence_wid 130 #define ps_search_start_wid(s) ps_search_base(s)->start_wid 131 #define ps_search_finish_wid(s) ps_search_base(s)->finish_wid 175 #define ps_search_seg_next(seg) (*(seg->vt->seg_next))(seg) 176 #define ps_search_seg_free(s) (*(seg->vt->seg_free))(seg) ptmr_t perf
Performance counter for all of decoding.
Building triphones for a dictionary.
Base structure for search module.
dict_t * dict
Pronunciation dictionary.
int32 silence_wid
Silence word ID.
void ps_search_base_reinit(ps_search_t *search, dict_t *dict, dict2pid_t *d2p)
Re-initialize base structure with new dictionary.
acmod_t * acmod
Acoustic model.
Main header file for the PocketSphinx decoder.
ps_segfuncs_t * vt
V-table of seg methods.
int32 finish_wid
Finish word ID.
int32 lscr
Language model score.
int32 n_words
Number of words known to search (may be less than in the dictionary)
Operations on dictionary.
struct ps_searchfuncs_s ps_searchfuncs_t
V-table for search algorithm.
char const * mfclogdir
Log directory for MFCC files.
int refcount
Reference count.
void ps_search_init(ps_search_t *search, ps_searchfuncs_t *vt, cmd_ln_t *config, acmod_t *acmod, dict_t *dict, dict2pid_t *d2p)
Initialize base structure.
int32 prob
Log posterior probability.
char const * word
Word string (pointer into dictionary hash)
acmod_t * acmod
Acoustic model.
ps_search_t * search
Search object from whence this came.
ps_search_t * search
Currently active search module.
logmath_t * lmath
Log math computation.
int32 start_wid
Start word ID.
char * uttid
Utterance ID for current utterance.
dict2pid_t * d2p
Dictionary to senone mappings.
char const * rawlogdir
Log directory for audio files.
int32 ascr
Acoustic score.
cmd_ln_t * config
Configuration.
glist_t searches
List of search modules.
ps_search_t * phone_loop
Phone loop search for lookahead.
a structure for a dictionary.
Word graph structure used in bestpath/nbest search.
char const * senlogdir
Log directory for senone score files.
ps_searchfuncs_t * vt
V-table of search methods.
uint32 n_frame
Total number of frames processed.
dict2pid_t * d2p
Dictionary to senone mapping.
int32 post
Utterance posterior probability.
char * hyp_str
Current hypothesis string.
dict_t * dict
Pronunciation dictionary.
int32 frame_idx_t
Type for frame index values.
int32 lback
Language model backoff.
ps_latlink_t * last_link
Final link in best path.
V-table for search algorithm.
ps_search_t * pls
Phoneme loop for lookahead.
ps_lattice_t * dag
Current hypothesis word graph.
Acoustic model structures for PocketSphinx.
Base structure for hypothesis segmentation iterator.
cmd_ln_t * config
Configuration.
Acoustic model structure.
float32 lwf
Language weight factor (for second-pass searches)
Building composite triphone (as well as word internal triphones) with the dictionary.
void ps_search_deinit(ps_search_t *search)
De-initialize base structure.
uint32 uttno
Utterance counter.
frame_idx_t sf
Start frame.
int pl_window
Window size for phoneme lookahead.