# parameters file for the isip decoder
#

# define function mode
# - forced_alignment: time align a set of known transcriptions using a 
#   Viterbi DP
# - lattice_rescoring: perform an acoustic rescoring of lattice files
#   the language model scores are taken from the lattice file
# - ngram_decoding: decode using an n-gram language model. note that for
#   most applications this is very memory intensive
# - lattice_generation: generate a lattice representing a narrowed
#   search space. typically we use an n-gram language model to generate
#   the lattice and then run with a stronger n-gram language model and 
#   stronger acoustic models in "lattice_verification" mode
# - lattice_verification: performs language model and acoustic model 
#   rescoring of lattice files. this is typically the followup stage to
#   running in lattice_generation mode
# - lattice_to_lattice: generate a lattice from a lattice. similar to 
#   lattice_generation mode but uses an existing lattice as the initial
#   search space rather than the n-gram search space
# - lattice_error_rate: calculates the error rate in the lattice by doing
#   a DP alignment of a reference transcription to the lattice
#
# function = forced_alignment
# function = lattice_rescoring
# function = ngram_decoding
# function = lattice_generation
# function = lattice_verification
# function = lattice_to_lattice
# function = lattice_error_rate
function = lattice_rescoring
   
# define input acoustic feature file list. this parameter is required
# in all modes but lattice_error_rate
#
# mfcc_list = 

# define the output hypothesis file list. this list should match one-to-one
# with the mfcc_list. this parameter is required in all modes which 
# generate hypotheses: forced_alignment, lattice_rescoring, ngram_decoding,
# lattice_generation, lattice_verification, lattice_to_lattice
#
output_list = $ISIP_DEVEL/util/demo/isip_demo_data/speaker_verification/models/imposter/decode/hypo.out

# define input lattice list. this list should match one-to-one with the
# mfcc_list. this parameter is required in all modes which accept lattices
# as input: lattice_rescoring, lattice_verification, lattice_to_lattice,
# lattice_error_rate
#
input_lattice_list = $ISIP_DEVEL/util/demo/isip_demo_data/speaker_verification/models/imposter/decode/grammar.lat

# define transcription file. this list should match one-to-one with the 
# input lists. this parameter is required only in lattice_error_rate mode
# and forced_alignment mode
#
transcription_file = 

# define lattice_error_rate output file. this parameter is required
# only in lattice_error_rate mode
#
lattice_wer_file = 

# define output lattice list. this list should match one-to-one with the
# mfcc_list. this parameter is required in any mode which generates a 
# lattice: lattice_generation, lattice_to_lattice
#
output_lattice_list = 

# define grammar list file. this is a list of defined grammars in the 
# dynamic language models. 
#
grammar_list_file = 

# define the file containing the list of context-independent models.
# required for all modes but lattice_error_rate
#
monophones_file = $ISIP_DEVEL/util/demo/isip_demo_data/speaker_verification/models/imposter/models/monophones.text

# define the model definition file
# required for all modes but lattice_error_rate
#
models_file = $ISIP_DEVEL/util/demo/isip_demo_data/speaker_verification/models/imposter/models/models.text

# define phone mapping file created by create_triphone_map
# required for all modes but lattice_error_rate
#
phones_file = $ISIP_DEVEL/util/demo/isip_demo_data/speaker_verification/models/imposter/models/phones.text
  
# define lexicon file
# required for all modes but lattice_error_rate
#
lexicon_file = $ISIP_DEVEL/util/demo/isip_demo_data/speaker_verification/models/imposter/decode/lexicon.text

# define the input states file
# required for all modes but lattice_error_rate
#
states_file = $ISIP_DEVEL/util/demo/isip_demo_data/speaker_verification/models/imposter/models/states.bin

# define the input transitions file
# required for all modes but lattice_error_rate
#
transitions_file = $ISIP_DEVEL/util/demo/isip_demo_data/speaker_verification/models/imposter/models/transitions.text

# define the output alignment mode (word, model, state). this parameter
# determines how detailed the hypothesis alignments are. in state mode
# the alignments are a state-frame mapping. beware that in state mode,
# more information is stored by the decoder so the memory consumption
# may be greater. also note that align_mode must be set to word when 
# doing n-best generation. this parameter is required for all modes
# which produce hypothesis output: forced_alignment, lattice_rescoring,
# ngram_decoding, lattice_generation, lattice_verification,
# lattice_to_lattice
#
align_mode = word

# define an n-gram backoff language model and relevant n-gram parameters:
# - lm_file: the language model file is in ARPA n-gram backoff format
# - ngram_order: N >= 1. 1=unigram, 2=bigram, 3=trigram
# - lm_scale: is a prescaling factor used to scale the n-gram score before
#   incorporating it into the likelihood function during the search
# - word_penalty: is a factor to add to any hypothesis which arrives at a 
#   word end. this has the effect of discouraging the hypothesis of a long
#   string of short duration words (common in LVCSR systems)
# these parameters should be defined for any mode which uses an n-gram
# language model: ngram_decoding, lattice_generation, lattice_verification
#
lm_file = 
ngram_order = 
lm_scale = 
word_penalty = 

# define number of history paths and n-best paths to preserve (N > 0)
# - history_paths defines the number of n-best paths to keep at each 
#   point in the search space. note that the history_paths should be set
#   to 1 in n-gram decoding mode. this is required for modes where lattices
#   are generated: lattice_generation, lattice_to_lattice and for 
#   ngram_decoding mode
# - nbest_paths defines the number of final sentence hypotheses to output.
#   this parameter is required for any mode which produces a hypothesis:
#   lattice_rescoring, ngram_decoding, lattice_generation,
#   lattice_verification, lattice_to_lattice
#
history_paths = 1000
nbest_paths = 10

# define input acoustic feature file format (ascii or binary). note
# that the states file should always be in binary mode. this parameter
# is required for all modes which use acoustic feature file input: 
# forced_alignment, lattice_rescoring, ngram_decoding, lattice_generation,
# lattice_verification, lattice_to_lattice
#
input_format = binary

# define context mode (monophone, word_internal, or cross_word). this 
# parameter is required for all modes
#
context_mode = monophone

# define pruning thresholds
# - beam_pruning specifies the beam pruning thresholds (state, model, word)
# - mapmi_limit specifies the maximum number of active phone instances
# - num_allowed_words specifies the maximum number of hypothesized word ends
#   which are allowed to be extended at any time frame
# these parameters are required for all modes which perform acoustic
# decoding: forced_alignment, lattice_rescoring, ngram_decoding, 
# lattice_generation, lattice_verification, lattice_to_lattice
# 
beam_pruning = 800 800 800
mapmi_limit = 1000
num_allowed_words = 100

# define parameter file for frontend
#
frontend_params = /cavs/hse/data2/isip/data/exp/cavs/exp_073/app/communicator/kb/AsrModels/fe_params.text
