# HOWTO         #
# version 1.0   #

1\ Main scripts options

There are five main options for otmedia scripts.
-h : for help
-D : Debug mode
-v n : Verbose mode 1 low to 3 high
-c : Check results
-r : force to rerun a script, without deleting work already done

2\ Main scripts
    ----------------- do speaker diarization and transcription of an audio file. Convert it into wav format if not already done (16000Hz, 16 bits, mono).
    If a .SRT file is present in the same directory of the audio file it will copy it.

    $> [options] 110624FR2_20002100.wav result_directory

    -f n : number of forks for speeral

    Output : result_directory/110624FR2_20002100/res_p1/
            and .ctm, .trs and .txt files.

    ------------------ do speaker adaptation and transcriptions base on the first pass.

    $> [options] result_directory/110624FR2_20002100/

    -f n : number of forks for speeral

    Output : result_directory/110624FR2_20002100/res_p2/
            and .ctm, .trs and .txt files.

    ---------------- do confidence measure using the second or third pass.

    $> [options] result_directory/110624FR2_20002100/ <res_p2|res_p3>

    Output : result_directory/110624FR2_20002100/conf/res_p2/scored_ctm/
            and result_directory/110624FR2_20002100.usf file


    It exploits confidence pass measure to :
    - boost confidente zone
    - find alternative in non confidente zone (using SOLR DB)
    - extend the lexicon

    $> [options] result_directory/110624FR2_20002100

    Output :   result_directory/110624FR2_20002100/trigg/speeral
    ------------------ do transcriptions using SecondPass speaker adaptation and ExploitConfidencePass trigg files and new lexicon.
    $> [options] result_directory/110624FR2_20002100/

    Options :
    -f n : number of forks for speeral

    Output : result_directory/110624FR2_20002100/conf/res_p3
            and .ctm, .trs and .txt files.
    -------------------- copy results that missing in ThirsPass from the Second and First Pass.

    $> [options] result_directory/110624FR2_20002100/

    Output : result_directory/110624FR2_20002100/res_all
            and .ctm, .trs and .txt files.
    ------------------ run differents scoring tools to score the results using SRT file if exists.

    $> [options] result_directory/110624FR2_20002100/

    Output : result_directory/110624FR2_20002100/scoring
    -------------------- parse results directories to synthesize works already done.

    $> [options] result_directory

    Output : "Directory name      #plp    #res_p1 #treil_p2   #treil_p3   usf_p2  usf_p3"
            #plp number of plp files
            #res_p1 number of .res files at first pass
            #treil_p2 number of .treil files at second pass
            #treil_p3 number of .treil files at third pass
            usf_p2 usf file from confidence pass result on second pass (OK|ERR|NAN)
            usf_p3 usf file from confidence pass result on third pass (OK|ERR|NAN)


    The script to do all OTMEDIA LIA pass in one call.

    $> [options] 110624FR2_20002100.wav result_directory 

    Options : (default options are availables)
    -a Do every pass
    -1 Do First pass
    -2 Do Second pass
    -3 Do Third pass
    -C Do Confidence pass
    -e Do Exploit Confidence pass
    -R Do Recompose pass
    -s Do Scoring pass

4\ Modify configuration

    Most of the main scripts got a configuration file (cfg/ directory).
    You can change script behaviour and data used.
    Speeral configuration file can be also change (tools/Speeral/CFG/ directory)

    4.1\ Scripts configurations

        In scripts configuration files (OTMEDIA_HOME/cfg/) you can change default options as architecture, verbose ...
        Scripts using Speeral got information on binaries, models path and name, and the configuration file for speeral.

    4.2\ Speeral configurations

        Speeral configuration files are in OTMEDIA_HOME/tools/Speeral/CFG directory.
        The .tmp files are use to generate .xml file from
        You can modify .xml files for your needs, but most of data informations are pass through arguments at speeral call in scripts.

5\ Modify binaries

    Binaries can be find in bin and tools directory.
    Some binaries are compiled in 32 and 64 bits. By default all binaries are compiled in 32 bits.
    You can update binaries as you need.

    To modify tools binaries, you need to download a compatible version.
        lia_ltbox can be found in /labo/Tools/
        Speeral (binaries) can be compiled from the git remote . Do not modify Speeral data from OTMEDIA (unless you know what you do).
        In PACKAGES_MESURES_V1.0 you can update icsiboost binary (in bin) from the projet page :
        For QUOTE_FINDER and SIGMUND please contact support.

Good Luck ! Luke !
And the force be with you !