PocketSphinx  5prealpha
pocketsphinx_internal.h File Reference

Internal implementation of PocketSphinx decoder. More...

#include <sphinxbase/cmd_ln.h>
#include <sphinxbase/fe.h>
#include <sphinxbase/feat.h>
#include <sphinxbase/hash_table.h>
#include <sphinxbase/logmath.h>
#include <sphinxbase/profile.h>
#include "pocketsphinx.h"
#include "acmod.h"
#include "dict.h"
#include "dict2pid.h"

Go to the source code of this file.

Data Structures

struct  ps_searchfuncs_s
 V-table for search algorithm. More...
 
struct  ps_search_s
 Base structure for search module. More...
 
struct  ps_segfuncs_s
 
struct  ps_seg_s
 Base structure for hypothesis segmentation iterator. More...
 
struct  ps_decoder_s
 Decoder object. More...
 
struct  ps_search_iter_s
 

Macros

#define PS_DEFAULT_SEARCH   "_default"
 
#define PS_DEFAULT_PL_SEARCH   "_default_pl"
 
#define PS_SEARCH_TYPE_KWS   "kws"
 
#define PS_SEARCH_TYPE_FSG   "fsg"
 
#define PS_SEARCH_TYPE_NGRAM   "ngram"
 
#define PS_SEARCH_TYPE_ALLPHONE   "allphone"
 
#define PS_SEARCH_TYPE_STATE_ALIGN   "state_align"
 
#define PS_SEARCH_TYPE_PHONE_LOOP   "phone_loop"
 
#define ps_search_base(s)   ((ps_search_t *)s)
 
#define ps_search_config(s)   ps_search_base(s)->config
 
#define ps_search_acmod(s)   ps_search_base(s)->acmod
 
#define ps_search_dict(s)   ps_search_base(s)->dict
 
#define ps_search_dict2pid(s)   ps_search_base(s)->d2p
 
#define ps_search_dag(s)   ps_search_base(s)->dag
 
#define ps_search_last_link(s)   ps_search_base(s)->last_link
 
#define ps_search_post(s)   ps_search_base(s)->post
 
#define ps_search_lookahead(s)   ps_search_base(s)->pls
 
#define ps_search_n_words(s)   ps_search_base(s)->n_words
 
#define ps_search_type(s)   ps_search_base(s)->type
 
#define ps_search_name(s)   ps_search_base(s)->name
 
#define ps_search_start(s)   (*(ps_search_base(s)->vt->start))(s)
 
#define ps_search_step(s, i)   (*(ps_search_base(s)->vt->step))(s,i)
 
#define ps_search_finish(s)   (*(ps_search_base(s)->vt->finish))(s)
 
#define ps_search_reinit(s, d, d2p)   (*(ps_search_base(s)->vt->reinit))(s,d,d2p)
 
#define ps_search_free(s)   (*(ps_search_base(s)->vt->free))(s)
 
#define ps_search_lattice(s)   (*(ps_search_base(s)->vt->lattice))(s)
 
#define ps_search_hyp(s, sc)   (*(ps_search_base(s)->vt->hyp))(s,sc)
 
#define ps_search_prob(s)   (*(ps_search_base(s)->vt->prob))(s)
 
#define ps_search_seg_iter(s)   (*(ps_search_base(s)->vt->seg_iter))(s)
 
#define ps_search_silence_wid(s)   ps_search_base(s)->silence_wid
 
#define ps_search_start_wid(s)   ps_search_base(s)->start_wid
 
#define ps_search_finish_wid(s)   ps_search_base(s)->finish_wid
 
#define ps_search_seg_next(seg)   (*(seg->vt->seg_next))(seg)
 
#define ps_search_seg_free(s)   (*(seg->vt->seg_free))(seg)
 

Typedefs

typedef struct ps_search_s ps_search_t
 Search algorithm structure.
 
typedef struct ps_searchfuncs_s ps_searchfuncs_t
 V-table for search algorithm.
 
typedef struct ps_segfuncs_s ps_segfuncs_t
 

Functions

void ps_search_init (ps_search_t *search, ps_searchfuncs_t *vt, const char *type, const char *name, cmd_ln_t *config, acmod_t *acmod, dict_t *dict, dict2pid_t *d2p)
 Initialize base structure.
 
void ps_search_base_free (ps_search_t *search)
 Free search.
 
void ps_search_base_reinit (ps_search_t *search, dict_t *dict, dict2pid_t *d2p)
 Re-initialize base structure with new dictionary.
 

Detailed Description

Internal implementation of PocketSphinx decoder.

Author
David Huggins-Daines dhugg.nosp@m.ins@.nosp@m.cs.cm.nosp@m.u.ed.nosp@m.u

Definition in file pocketsphinx_internal.h.