julius/output_module.c File Reference

Output recoginition result via module socket. More...

#include "app.h"
#include <time.h>

Go to the source code of this file.

Functions

static void status_process_online (Recog *recog, void *dummy)
 Called when it becomes ready to recognize the input.
static void status_process_offline (Recog *recog, void *dummy)
 Called when process paused and recognition is stopped.
void decode_output_selection (char *str)
 Setup which word information to be output as a recognition result.
static void msock_word_out1 (WORD_ID w, RecogProcess *r)
 Subroutine to output information of a recognized word at 1st pass.
static void msock_word_out2 (WORD_ID w, RecogProcess *r)
 Subroutine to output information of a recognized word at 2nd pass.
static void status_pass1_begin (Recog *recog, void *dummy)
 1st pass: output when recognition begins (will be called at input start).
static void result_pass1_current (Recog *recog, void *dummy)
 1st pass: output current result while search (called periodically while 1st pass).
static void result_pass1_final (Recog *recog, void *dummy)
 1st pass: output final result of the 1st pass (will be called just after the 1st pass ends and before the 2nd pass begins, and will not if search failed).
static void status_pass1_end (Recog *recog, void *dummy)
 1st pass: end of output (will be called at the end of the 1st pass).
static void result_pass2 (Recog *recog, void *dummy)
 2nd pass: output a sentence hypothesis found in the 2nd pass.
static void result_graph (Recog *recog, void *dummy)
 Output the whole word graph.
static void status_recready (Recog *recog, void *dummy)
 Output when ready to recognize and start waiting speech input.
static void status_recstart (Recog *recog, void *dummy)
 Output when input starts.
static void status_recend (Recog *recog, void *dummy)
 Output when input ends.
static void status_param (Recog *recog, void *dummy)
 Output input parameter status such as length.
static void result_gmm (Recog *recog, void *dummy)
 Send the result of GMM computation to module client.
void send_gram_info (RecogProcess *r)
 Send current list of grammars to module client.
void setup_output_msock (Recog *recog, void *data)
 Register output functions to enable module output.

Variables

int module_sd
boolean separate_score_flag
static char * hookstr [] = {"", "delete", "activate", "deactivate"}
 Grammar status to be processed in the next reload timing.
static boolean out1_word = FALSE
static boolean out1_lm = FALSE
static boolean out1_phone = FALSE
static boolean out1_score = FALSE
static boolean out2_word = TRUE
static boolean out2_lm = TRUE
static boolean out2_phone = TRUE
static boolean out2_score = TRUE
static boolean out1_never = TRUE
static boolean out2_never = FALSE


Detailed Description

Output recoginition result via module socket.

Author:
Akinobu Lee
Date:
Tue Sep 06 14:46:49 2005
Revision
1.1.1.1

Definition in file output_module.c.


Function Documentation

void decode_output_selection ( char *  str  ) 

Setup which word information to be output as a recognition result.

Parameters:
str [in] output selection string (part of "WLPSCwlps")

Definition at line 93 of file output_module.c.

static void msock_word_out1 ( WORD_ID  w,
RecogProcess r 
) [static]

Subroutine to output information of a recognized word at 1st pass.

Parameters:
w [in] word ID
winfo [in] word dictionary

Definition at line 143 of file output_module.c.

Referenced by result_pass1_current(), and result_pass1_final().

static void msock_word_out2 ( WORD_ID  w,
RecogProcess r 
) [static]

Subroutine to output information of a recognized word at 2nd pass.

Parameters:
w [in] word ID
winfo [in] word dictionary

Definition at line 183 of file output_module.c.

Referenced by result_graph(), and result_pass2().

static void result_pass1_current ( Recog recog,
void *  dummy 
) [static]

1st pass: output current result while search (called periodically while 1st pass).

Parameters:
t [in] current time frame
seq [in] current best word sequence at time t.
num [in] length of seq.
score [in] accumulated score of the current best sequence at t.
LMscore [in] confidence score of last word on the sequence
winfo [in] word dictionary

Definition at line 251 of file output_module.c.

Referenced by setup_output_msock().

static void result_pass1_final ( Recog recog,
void *  dummy 
) [static]

1st pass: output final result of the 1st pass (will be called just after the 1st pass ends and before the 2nd pass begins, and will not if search failed).

Parameters:
seq [in] word sequence of the best hypothesis at the 1st pass.
num [in] length of seq.
score [in] accumulated hypothesis score of seq.
LMscore [in] language score in score.
winfo [in] word dictionary.

Definition at line 316 of file output_module.c.

Referenced by setup_output_msock().

static void result_pass2 ( Recog recog,
void *  dummy 
) [static]

2nd pass: output a sentence hypothesis found in the 2nd pass.

Parameters:
hypo [in] sentence hypothesis to be output
rank [in] rank of hypo
winfo [in] word dictionary

Definition at line 386 of file output_module.c.

Referenced by setup_output_msock().

static void result_graph ( Recog recog,
void *  dummy 
) [static]

Output the whole word graph.

Parameters:
root [in] pointer to the first element of graph words
winfo [in] word dictionary

Definition at line 501 of file output_module.c.

Referenced by setup_output_msock().

static void status_param ( Recog recog,
void *  dummy 
) [static]

Output input parameter status such as length.

Parameters:
param [in] input parameter structure

Definition at line 604 of file output_module.c.

Referenced by setup_output_msock().

static void result_gmm ( Recog recog,
void *  dummy 
) [static]

Send the result of GMM computation to module client.

(for "-result msock" option)

Definition at line 636 of file output_module.c.

Referenced by setup_output_msock().


Generated on Tue Dec 18 15:59:57 2007 for Julius by  doxygen 1.5.4