本文整理汇总了C++中SegServer::getSeg方法的典型用法代码示例。如果您正苦于以下问题:C++ SegServer::getSeg方法的具体用法?C++ SegServer::getSeg怎么用?C++ SegServer::getSeg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SegServer
的用法示例。
在下文中一共展示了SegServer::getSeg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: launchTurnDetectionProcess
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