void launchTurnDetectionProcess(Config & config){ String outputFilesPath=config.getParam("outputFilesPath"); String inputListFileName = config.getParam("listFileToSegment"); //file including the list of files to segment XLine classToAnalyse; //Array of labels to analyze classToAnalyse.reset(); if(verbose){ cout << "*********** Current Configuration ***************" << endl; for(unsigned long i=0; i<config.getParamCount(); i++){ cout << config.getParamName(i) << " => " << config.getParamContent(i) << endl; } cout << "*************************************************" << endl; } try{ XList listLabel; XList listFileName; try{ listFileName.load(inputListFileName,config); } catch(FileNotFoundException& e){ cout<<"There is no files to segment !"<<endl; exit(-1); } listFileName.rewind(); XLine *filep; while ((filep=listFileName.getLine()) != NULL){ // For each stream of audio data (in several files in the same line) const XLine & listFile=filep->getElements(); // One or several files, as several part of the same stream MixtureServer ms(config); StatServer ss(config, ms); SegServer Resultat; FeatureServer fs(config,listFile); // Reading the features (one or more files) SegServer segmentsServer; // Create the segment server for managing the segments/clusters LabelServer labelServer; // Create the lable server, for indexing the segments/clusters initializeClusters(listFile,segmentsServer,labelServer,config); // Reading the segmentation files for each feature input file verifyClusterFile(segmentsServer,fs,config); // Verify if the segments ending before the end of the feature files String fileInit=listFile.getElement(0); config.setParam("fileSize", String::valueOf(fs.getFeatureCountOfASource(fileInit))); if(config.existsParam("fileRefPath")){ // assumption: all the segments in the segment server come from the same source file !!! displayAllSegmentsFromRef(config, fileInit, fs.getFeatureCountOfASource(fileInit)); } for(unsigned long icluster=0;icluster<segmentsServer.getClusterCount();icluster++){ // for each cluster SegCluster& cluster=segmentsServer.getCluster(icluster); SegServer segOutputServer; TurnDetection(config,cluster,segOutputServer,ss,fs,ms,labelServer); displayAllSegments(config,segOutputServer); for(unsigned long i=0;i<segOutputServer.getSegCount();i++){ Seg& segment=segOutputServer.getSeg(i); Resultat.createSeg(segment.begin(),segment.length(),segment.labelCode(),segment.string(),segment.sourceName()); } }//for icluster saveSegmentation(config,Resultat,fs,outputFilesPath,1); }// while } // end try catch (Exception& e){ cout << e.toString().c_str() << endl; } }//launchTurnDetectionProcess