#include <recog.h>
Data Fields | |
boolean(* | ad_standby )(int, void *) |
Pointer to function for device initialization (call once on startup). | |
boolean(* | ad_begin )() |
Pointer to function to open audio stream for capturing. | |
boolean(* | ad_end )() |
Pointer to function to close audio stream capturing. | |
boolean(* | ad_resume )() |
Pointer to function to begin / restart recording. | |
boolean(* | ad_pause )() |
Pointer to function to pause recording. | |
int(* | ad_read )(SP16 *, int) |
Pointer to function to read samples. | |
int | thres |
Input Level threshold (0-32767). | |
int | noise_zerocross |
Computed threshold of zerocross num in the cycle buffer. | |
int | nc_max |
Computed number of fragments for tail margin. | |
boolean | adin_cut_on |
TRUE if do input segmentation by silence. | |
boolean | silence_cut_default |
Device-dependent default value of adin_cut_on(). | |
boolean | strip_flag |
TRUE if skip invalid zero samples. | |
boolean | enable_thread |
TRUE if input device needs threading. | |
boolean | need_zmean |
TRUE if perform zmeansource. | |
int | c_length |
Computed length of cycle buffer for zero-cross, actually equals to head margin length. | |
int | c_offset |
Static data DC offset (obsolute, should be 0). | |
SP16 * | swapbuf |
Buffer for re-triggering in tail margin. | |
int | sbsize |
Size of swapbuf. | |
int | sblen |
Current length of swapbuf. | |
int | rest_tail |
Samples not processed yet in swap buffer. | |
ZEROCROSS | zc |
Work area for zero-cross computation. | |
pthread_mutex_t | mutex |
Lock primitive. | |
SP16 * | speech |
Unprocessed samples recorded by A/D-in thread. | |
int | speechlen |
Current length of speech. | |
boolean | transfer_online |
boolean | adinthread_buffer_overflowed |
TRUE if buffer overflow occured in adin thread. | |
boolean | ignore_speech_while_recog |
TRUE if ignore speech input between call, while waiting recognition process. | |
SP16 * | buffer |
Temporary buffer to hold input samples. | |
int | bpmax |
Maximum length of buffer. | |
int | bp |
Current point to store the next data. | |
int | current_len |
Current length of stored samples. | |
SP16 * | cbuf |
Buffer for flushing cycle buffer just after detecting trigger. | |
boolean | down_sample |
TRUE if perform down sampling from 48kHz to 16kHz. | |
SP16 * | buffer48 |
Another temporary buffer to hold 48kHz inputs. | |
int | io_rate |
frequency rate (should be 3 always for 48/16 conversion | |
boolean | is_valid_data |
TRUE if we are now triggered. | |
int | nc |
count of current tail silence segments | |
boolean | end_of_stream |
TRUE if we have reached the end of stream. | |
boolean | need_init |
if TRUE, initialize buffer on startup | |
DS_BUFFER * | ds |
Filter buffer for 48-to-16 conversion. | |
boolean | rehash |
TRUE is want rehash at rewinding on decoder-based VAD. |
Definition at line 319 of file recog.h.