#include <julius/julius.h>
Go to the source code of this file.
Functions | |
void | callback_init (Recog *recog) |
Initialize callback management area. | |
static int | callback_add_core (Recog *recog, int code, void(*func)(), void *data) |
Core function to register a function to a callback registory. | |
int | callback_add (Recog *recog, int code, void(*func)(Recog *recog, void *data), void *data) |
Register a function to a callback registory. | |
int | callback_add_adin (Recog *recog, int code, void(*func)(Recog *recog, SP16 *buf, int len, void *data), void *data) |
Register a function to the A/D-in type callback registory. | |
void | callback_exec (int code, Recog *recog) |
Execute all functions assigned to a callback registory. | |
void | callback_exec_adin (int code, Recog *recog, SP16 *buf, int len) |
Execute all functions assigned to a A/D-in callback. | |
boolean | callback_exist (Recog *recog, int code) |
Check if at least one function has been registered to a callback repository. | |
boolean | callback_delete (Recog *recog, int id) |
Delete an already registered function from callback. |
This file contains functions for handling callback functions. User should use callback_add() (and callback_add_adin() for A/D-in related callbacks) to regist user function to the callback repository. Then, Julius will call the registered functions at apropriate timimg while search.
More than one function can be assigned to a callback, in which case all functions will be called in turn.
Definition in file callback.c.
void callback_init | ( | Recog * | recog | ) |
Initialize callback management area.
recog | [i/o] engine instance |
Definition at line 53 of file callback.c.
Referenced by j_recog_new().
static int callback_add_core | ( | Recog * | recog, | |
int | code, | |||
void(*)() | func, | |||
void * | data | |||
) | [static] |
Core function to register a function to a callback registory.
recog | [i/o] engine instance | |
code | [in] code in which the function will be registered | |
func | [in] function | |
data | [in] user-specified argument to be passed when the function is called inside Julius |
Definition at line 77 of file callback.c.
Referenced by callback_add(), and callback_add_adin().
void callback_exec | ( | int | code, | |
Recog * | recog | |||
) |
Execute all functions assigned to a callback registory.
code | [in] callback code | |
recog | [in] engine instance. |
Definition at line 183 of file callback.c.
Referenced by adin_cut(), callback_check_in_adin(), decode_proceed(), get_back_trellis(), gmm_end(), RealTimeParam(), RealTimePipeLine(), and RealTimeResume().
Execute all functions assigned to a A/D-in callback.
code | [in] callbcak code | |
recog | [in] engine instance | |
buf | [in] buffer that holds the current input speech which will be passed to the functions | |
len | [in] length of buf |
Definition at line 214 of file callback.c.
Referenced by adin_cut().