EstimateDMatrixMain.cpp

Go to the documentation of this file.
00001 // EstimateDMatrix.cpp
00002 // 
00003 // This file is a part of Mistral Package and LIA Software 
00004 // LIA_SpkDet, based on Mistral_Ral toolkit 
00005 // LIA_SpkDet is a free, open tool for speaker recognition
00006 // LIA_SpkDet is a development project initiated and funded by the LIA lab.
00007 //
00008 // See mistral.univ-avignon.fr 
00009 // 
00010 // ALIZE is needed for LIA_SpkDet
00011 // for more information about ALIZE, see http://alize.univ-avignon.fr
00012 //
00013 // Copyright (C) 2004 - 2005 - 2006 - 2007 -2008
00014 //  Laboratoire d'informatique d'Avignon [www.lia.univ-avignon.fr]
00015 //  Jean-Francois Bonastre [jean-francois.bonastre@univ-avignon.fr]
00016 //      
00017 // Mistral is free software; you can redistribute it and/or
00018 // modify it under the terms of the GNU General Public
00019 // License as published by the Free Software Foundation; either
00020 // version 2.1 of the License, or (at your option) any later version.
00021 // This software is distributed in the hope that it will be useful,
00022 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024 // General Public License for more details.
00025 // You should have received a copy of the GNU General Public
00026 // License along with this library; if not, write to the Free Software
00027 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 //
00029 // The LIA team as well as the ALIZE project want to highlight the limits of voice authentication
00030 // in a forensic context. 
00031 // The following paper proposes a good overview of this point:
00032 // [Bonastre J.F., Bimbot F., Boe L.J., Campbell J.P., Douglas D.A., Magrin-chagnolleau I.,
00033 //  Person  Authentification by Voice: A Need of Caution,
00034 //  Eurospeech 2003, Genova]
00035 // The conclusion of the paper of the paper is proposed bellow:
00036 // [Currently, it is not possible to completely determine whether the
00037 //  similarity between two recordings is due to the speaker or to other
00038 //  factors, especially when: (a) the speaker does not cooperate, (b) there
00039 //  is no control over recording equipment, (c) recording conditions are not 
00040 //  known, (d) one does not know whether the voice was disguised and, to a
00041 //  lesser extent, (e) the linguistic content of the message is not
00042 //  controlled. Caution and judgment must be exercised when applying speaker
00043 //  recognition techniques, whether human or automatic, to account for these
00044 //  uncontrolled factors. Under more constrained or calibrated situations,
00045 //  or as an aid for investigative purposes, judicious application of these
00046 //  techniques may be suitable, provided they are not considered as infallible.
00047 //  At the present time, there is no scientific process that enables one to
00048 //  uniquely characterize a person=92s voice or to identify with absolute
00049 //  certainty an individual from his or her voice.]
00050 //
00051 // Contact Jean-Francois Bonastre (jean-francois.bonastre@lia.univ-avignon.fr) for
00052 // more information about the licence or the use of LIA_SpkDet
00053 // First version 15/07/2004
00054 // New version 23/02/2005
00055 // 
00056 // Last review 4 nov 2008
00057 //
00058 
00059 #include <iostream>
00060 #include <liatools.h>
00061 #include <EstimateDMatrix.h>
00062 
00063 using namespace alize;
00064 using namespace std;
00065 
00066 int main(int argc, char* argv[]) {
00067         ConfigChecker cc;
00068         try{
00069                 // Needed params
00070                 cc.addStringParam("ndxFilename",true,true,"NDX of multiple GMM speaker recordings");
00071                 cc.addStringParam("inputWorldFilename",true,true,"the world model file");
00072                 cc.addIntegerParam("nbIt",true,true,"number of ml it");
00073                 cc.addStringParam("saveMatrixFormat",true,true,"matrix format: DB (binary) or DT (ascii)");               
00074                 cc.addStringParam("loadMatrixFormat",true,true,"matrix format: DB (binary) or DT (ascii)");                             
00075 
00076                 // Optionnal
00077                 cc.addStringParam("initDMatrix",false,true,"init D Matrix");
00078                 cc.addBooleanParam("loadAccs",false,true,"if true do not compute UBM stats, load matrices");            
00079                 cc.addIntegerParam("computeLLK",false,true,"optional: nb of files where LLK is computed");      
00080                 
00081 
00082                 // Insertion of config compatibility rules
00083                 CmdLine cmdLine(argc, argv);
00084 
00085                 if (cmdLine.displayHelpRequired()){
00086                         cout << "****************************************" << endl;
00087                         cout << "********** EstimateDMatrix.exe ************" << endl;
00088                         cout << "****************************************" << endl;
00089                         cout << endl;
00090                         cout << "Evaluate D Matrix from sessions data" << endl;
00091                         cout <<endl<<cc.getParamList()<<endl;
00092                         return 0;  
00093                 }
00094                 if (cmdLine.displayVersionRequired()){
00095                         cout <<"Version 2.0 Mistral Package"<<endl;
00096                 } 
00097 
00098                 Config tmp;
00099                 cmdLine.copyIntoConfig (tmp);
00100                 Config config;
00101                 if (tmp.existsParam("config")) config.load(tmp.getParam("config"));
00102                 cmdLine.copyIntoConfig(config);
00103                 cc.check(config);
00104                 debug=config.getParam_debug();  
00105                 if (config.existsParam("verbose"))verbose=config.getParam("verbose").toBool();else verbose=false;
00106                 if (verbose) verboseLevel=1;else verboseLevel=0;
00107                 if (config.existsParam("verboseLevel"))verboseLevel=config.getParam("verboseLevel").toLong();
00108                 if (verboseLevel>0) verbose=true;               
00109                 if (cmdLine.displayHelpRequired()) {cout << cc.getParamList() << endl;} 
00110                 EstimateDMatrix(config);
00111         }
00112         catch (Exception& e) {cout << e.toString() << cc.getParamList() << endl;}
00113 if (debug) {
00114 }
00115 return 0;
00116 }