sphinx: better logging and verbosity handling
[profile/ivi/speech-recognition.git] / src / plugins / speech-to-text / sphinx / sphinx-plugin.h
1 #ifndef __SRS_POCKET_SPHINX_PLUGIN_H__
2 #define __SRS_POCKET_SPHINX_PLUGIN_H__
3
4 #include <stdint.h>
5 #include <stdbool.h>
6
7 #include "srs/daemon/plugin.h"
8 #include "srs/daemon/recognizer.h"
9
10 typedef enum utterance_processor_e  utterance_processor_t;
11
12 typedef struct context_s            context_t;
13 typedef struct plugin_s             plugin_t;
14 typedef struct options_s            options_t;
15 typedef struct options_decoder_s    options_decoder_t;
16 typedef struct context_s            context_t;
17 typedef struct decoder_set_s        decoder_set_t;
18 typedef struct decoder_s            decoder_t;
19 typedef struct utternace_s          utterance_t;
20 typedef struct candidate_s          candidate_t;
21 typedef struct word_s               word_t;
22 typedef struct filter_buf_s         filter_buf_t;
23 typedef struct input_buf_s          input_buf_t;
24 typedef struct pulse_interface_s    pulse_interface_t;
25
26 enum utterance_processor_e {
27     UTTERANCE_PROCESSOR_UNKNOWN = 0,
28     UTTERANCE_PROCESSOR_ACOUSTIC,
29     UTTERANCE_PROCESSOR_FSG,
30 };
31
32 struct context_s {
33     plugin_t *plugin;
34     options_t *opts;
35     decoder_set_t *decset;
36     filter_buf_t *filtbuf;
37     input_buf_t *inpbuf;
38     pulse_interface_t *pulseif;
39     bool verbose;
40 };
41
42
43 int32_t plugin_utterance_handler(context_t *ctx, srs_srec_utterance_t *utt);
44 mrp_mainloop_t *plugin_get_mainloop(plugin_t *plugin);
45
46 #endif /* __SRS_POCKET_SPHINX_PLUGIN_H__ */
47
48 /*
49  * Local Variables:
50  * c-basic-offset: 4
51  * indent-tabs-mode: nil
52  * End:
53  *
54  */