#! @TCL@ -f
#
# file: dec_globals.tcl
#

# global environment
#
global env

# define and set the display variables
#
global p
global word_height
global phone_height
global canvas_width
global tr_width
global tr_height

set p ".p"
set word_height 250
set phone_height 100
set canvas_width 560
set tr_height 90

# define colors
#
global black_color
global blue_color
global red_color
global green_color
set black_color black
set blue_color blue
set red_color red
set green_color green

# define fonts
#
global font_0
global font_1
global font_2
global font_3
set font_0 "*-times-medium-r-normal--*-100-*"
set font_1 "*-times-bold-r-normal--*-120-*"
set font_2 "*-times-bold-r-normal--*-140-*"
set font_3 "-adobe-times-bold-i-normal--*-180-75-75-p-98-iso8859-1"

# define the row and column spacings
#
global row_space
global col_space
set row_space 60
set col_space 120

global x_off
global y_off
set x_off 24
set y_off 16

global trace_off
set trace_off 100

# define the application title
#
global decoder_title
set decoder_title "ISIP Decoder"

# define separater strings
#
global dir_sep
set dir_sep "\/"
global env_sep
set env_sep "\$"

# define default paramters
#

# define the function mode
#
global function_mode
set function_mode "lattice_rescoring"

# define the filenames to access
#
global gui_dir
set gui_dir "$env(ISIP_PROTO)/lib/scripts/tcl/isip_decoder_demo"

global data_dir
set data_dir "$gui_dir/data"

global debug_file 
set debug_file [open "$data_dir/debug.out" "w"]

global monophones_file
set monophones_file "$data_dir/models/monophones.text"

global transitions_file
set transitions_file "$data_dir/models/transitions.text"

global states_file
set states_file "$data_dir/models/states.bin"

global models_file
set models_file "$data_dir/models/models.text"

global phones_file
set phones_file "$data_dir/models/phones.text"

global lexicon_file
set lexicon_file "$data_dir/models/lexicon.text"

global lattice_file
set lattice_file "$data_dir/lattices/ah_416a.lat"

global lm_file
set lm_file "$data_dir/models/trigram_lm.text"

global mfcc_file
set mfcc_file "$data_dir/mfcc/ah_416a.mfc"

global wordlist_file
set wordlist_file "$data_dir/tmp/ah_416a.out"

global nbest_file
set nbest_file "$data_dir/tmp/161a.out.nbest"

global transcription_file
set transcription_file "$data_dir/trans/ah_416a.trans"

global tmp_dir
set tmp_dir "$data_dir/tmp"

global params_file
set params_file "$tmp_dir/params.text"
global tmp_outfile
set tmp_outfile "$tmp_dir/isip_out_list.text"
global tmp_outnbestfile
set tmp_outnbestfile "$tmp_dir/isip_out_nbest_list.text"
global tmp_infile
set tmp_infile "$tmp_dir/isip_mfcc_list.text"
global tmp_latfile
set tmp_latfile "$tmp_dir/isip_lat_list.text"
global tmp_lmfile
set tmp_lmfile "$tmp_dir/isip_lm_list.text"

global dec_factor
set dec_factor 1

global ph_context_size
set ph_context_size 3

global mfcc_format
set mfcc_format "binary"

global gram_size
set gram_size 3

global align_mode
set align_mode "model"

global lm_scale
set lm_scale 12.0

global word_penalty
set word_penalty -10

global context_mode
set context_mode "monophone"

global stop_flag
set stop_flag 0

# define the list of word hypotheses to display
#
global hyp_list
global phone_list

# time index for the decoder
#
global current_frame
set current_frame -1

# define the parameters to run the Viterbi trace projector decoder
#
global num_n_best
global history_paths
global num_frames
set num_n_best 5
set history_paths 5
set num_frames 500

global st_beam
global ph_beam
global wd_beam
global mapmi
set st_beam 300
set ph_beam 200
set wd_beam 200
set mapmi 5000

global old_num_n_best
set old_num_n_best 5

global traces_new
global traces_del
global traces_tot
set traces_new 0
set traces_del 0
set traces_tot 0

# time
#
global old_modt
global modt
set old_modt 1
set modt 0

# define limits on values
#
global min_n_best
global max_n_best
set min_n_best 1
set max_n_best 10000

global max_traces
set max_traces 20000

global beam_step
set beam_step 50
global beam_min
set beam_min 0

global mat_step
set mat_step 100
global mat_min
set mat_min 0

global num_step
set num_step 1

global pause_time
set pause_time 600

# set important directories
#
global trace_bmp
set trace_bmp "$data_dir/images"

# define the executable to run the Viterbi trace projector decoder
#
global decoder_pipe
global pipe_flag
set pipe_flag 0
global decoder_exe

set decoder_exe $env(ISIP_PROTO)/bin/$env(ISIP_BINARY)/trace_projector

#
# end of file
