00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #include <iostream>
00056 #include <alize.h>
00057 #include <liatools.h>
00058
00059 #include <EigenVoice.h>
00060
00061 using namespace alize;
00062 using namespace std;
00063
00064 int main(int argc, char* argv[]) {
00065 ConfigChecker cc;
00066 try{
00067
00068 cc.addStringParam("ndxFilename",true,true,"NDX of multiple GMM speaker recordings");
00069 cc.addStringParam("inputWorldFilename",true,true,"the world model file");
00070 cc.addIntegerParam("nbIt",true,true,"number of ml it");
00071 cc.addStringParam("eigenVoiceMatrix",true,true,"filename to save EigenVoice Matrix ");
00072 cc.addIntegerParam("eigenVoiceNumber",true,true,"final rank of EigenVoice matrix");
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
00077 cc.addStringParam("initEigenVoiceMatrix",false,true,"name of the EigenVoice Matrix used for initialisation");
00078 cc.addBooleanParam("loadInitEigenVoiceMatrix",false,true,"if true load an EigenVoiceMatrix for initialisation");
00079 cc.addBooleanParam("loadAccs",false,true,"if true do not compute UBM stats, load matrices");
00080 cc.addBooleanParam("checkLLK",false,true,"if true do compute the likelihood of training data after each iteration");
00081 cc.addBooleanParam("saveInitEigenVoiceMatrix",false,true,"if true save the matrix used for initialisation");
00082 cc.addBooleanParam("saveAllEVMatrices",false,true,"if true save the matrices after each iteration");
00083 cc.addIntegerParam("computeLLK",false,true,"optional: nb of files where LLK is computed");
00084
00085
00086 CmdLine cmdLine(argc, argv);
00087
00088 if (cmdLine.displayHelpRequired()){
00089 cout << "****************************************" << endl;
00090 cout << "********** EigenVoice.exe ************" << endl;
00091 cout << "****************************************" << endl;
00092 cout << endl;
00093 cout << "Evaluate EigenVoice Matrix from speakers data" << endl;
00094 cout <<endl<<cc.getParamList()<<endl;
00095 return 0;
00096 }
00097 if (cmdLine.displayVersionRequired()){
00098 cout <<"Version 2.0 Mistral Package"<<endl;
00099 }
00100
00101 Config tmp;
00102 cmdLine.copyIntoConfig (tmp);
00103 Config config;
00104 if (tmp.existsParam("config")) config.load(tmp.getParam("config"));
00105 cmdLine.copyIntoConfig(config);
00106 cc.check(config);
00107 debug=config.getParam_debug();
00108 if (config.existsParam("verbose"))verbose=config.getParam("verbose").toBool();else verbose=false;
00109 if (verbose) verboseLevel=1;else verboseLevel=0;
00110 if (config.existsParam("verboseLevel"))verboseLevel=config.getParam("verboseLevel").toLong();
00111 if (verboseLevel>0) verbose=true;
00112 if (cmdLine.displayHelpRequired()) {cout << cc.getParamList() << endl;}
00113 EigenVoice(config);
00114 }
00115 catch (Exception& e) {cout << e.toString() << cc.getParamList() << endl;}
00116 if (debug) {
00117 }
00118 return 0;
00119 }