Copiste  0.1
 All Classes Functions Variables Enumerations Friends Pages
Public Member Functions
CorpusBuilder Class Reference

Creates a corpus from a set of audio files. More...

#include <corpusbuilder.h>

Inheritance diagram for CorpusBuilder:
SoundAnalyser

List of all members.

Public Member Functions

 CorpusBuilder ()
 Constructor.
 ~CorpusBuilder ()
 Destructor.
void setElementLength (int sec)
 Set what length (in seconds) should be used as training element length (0 : use the whole files)
void setComputingOffset (int sec)
 Set computing offset (the time at the beginning of each file we should forget)
bool setup (string fileName)
 Set up from an XML file.
bool write (Corpus *corpus)
 Write down the results.
void compute ()
 Compute.
void setVerbose (bool verbose)
 Sets verbosity.
bool setupPipeline (string filename)
 Mirror from SoundAnalyser.

Additional Inherited Members

- Private Member Functions inherited from SoundAnalyser
 SoundAnalyser (bool live=false)
 Sets up a new sound analyser.
 ~SoundAnalyser ()
 Destructor.
void resetExtractors ()
 Extractors management.
void cleanExtractors ()
 Clean the data in the extractors.
void registerExtractor (string name, FeatureExtractor *extr, bool used=true, bool drawLines=true)
 Adds a new extractor.
FeatureExtractorgetExtractor (string name)
 Find an extractor.
void setNormalization (float min, float max)
 Set up unified bounds for all features.
bool compute (string url)
 Compute the features of a given file.
void waitComputed ()
 Wait up to the end of the computation.
unsigned int nbFeatures ()
 Features management : sizes.
unsigned int nbElems (unsigned int n)
 Return the number of elements of the nth feature.
unsigned int nbSamples ()
 Return the number of sample we've been computing.
unsigned int dimension ()
 Get the dimension : sum of all the nbElems(i)
unsigned int realDimension ()
 Get the real dimension : sum of all the nbElems we care (the values which are actually used for detection)
double ** features (unsigned int n)
 Return the array of features for the nth sample.
void clearFeatures ()
 Clears the features.
void cleanOldFeatures (unsigned int newestCount)
 Removes the old features so that the newest remain.
bool isUsed (unsigned int index)
 Features management : individual properties.
bool isDrawnWithLines (unsigned int index)
 Should this feature be drawn as a lines or a shade of grey ?
string name (unsigned int n)
 Get the name of the nth feature.
int getFeatureByName (string name)
 Get the id of the feature named so (-1 if not found)
void useBuffer ()
 Callbacks.
void sequenceEnds ()
 End the computation.
virtual void useFeatures ()
 Callback called when the buffer has been used (the features are ready to be used)
unsigned int samplingFrequency ()
 Mirrors.

Detailed Description

Creates a corpus from a set of audio files.


Constructor & Destructor Documentation

CorpusBuilder::CorpusBuilder ( )

Constructor.

Sets up a new corpus builder.


Member Function Documentation

void CorpusBuilder::compute ( )

Compute.

Compute the features.

bool CorpusBuilder::setup ( string  fileName)

Set up from an XML file.

Longue vie à boost::filesystem !


The documentation for this class was generated from the following files: