quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_algo.a #include <SegmentConcat.h> SegmentConcat(ALGORITHM algorithm = DEF_ALGORITHM, IMPLEMENTATION implementation = DEF_IMPLEMENTATION, float floor); boolean eq(const SegmentConcat& arg); boolean setDimension(long dim);
description:none. this class is not to be used in isolation. this provides the base functionality for the isip_segment_concat utility.
static const String CLASS_NAME = L"SegmentConcat";
enum ALGORITHM { MIN_MAX = 0, SEG_CONCAT, SEG_CONCAT_SYMBOL, DEF_ALGORITHM = MIN_MAX };
enum IMPLEMENTATION { NONE = 0, NORMALIZE, DEF_IMPLEMENTATION = NONE };
static const NameMap ALGO_MAP(L"MIN_MAX, SEG_CONCAT");
static const NameMap IMPL_MAP(L"NONE, NORMALIZE");
static const String DEF_PARAM = L"";
static const String PARAM_ALGORITHM = L"algorithm";
static const String PARAM_IMPLEMENTATION = L"implementation";
none
static const long ERR = 50800;
ALGORITHM algorithm_d;
IMPLEMENTATION implementation_d;
Vector&th;VectorFloat> min_max_d;
Filename min_max_file_d;
VectorLong ratio_d;
boolean duration_flag_d;
String level_d;
Long dim_d;
FeatureFile::FILE_TYPE input_type_d;
FeatureFile::FILE_FORMAT input_format_d;
FeatureFile::FILE_TYPE output_type_d;
FeatureFile::FILE_FORMAT output_format_d;
String output_directory_d;
String output_extension_d;
Long output_preserve_d;
String output_suffix_d;
Filename audiodb_file_d;
Filename transdb_file_d;
AudioDatabase audiodb_d;
TranscriptionDatabase transdb_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
static boolean setDebug(Integral::DEBUG debug_level);
boolean debug(const unichar* message) const;
~SegmentConcat();
SegmentConcat(ALGORITHM algorithm = DEF_ALGORITHM, IMPLEMENTATION implementation = DEF_IMPLEMENTATION);
SegmentConcat(const SegmentConcat& arg);
boolean assign(const SegmentConcat& arg);
SegmentConcat& operator= (const SegmentConcat& arg);
long sofSize() const;
boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean eq(const SegmentConcat& arg) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE ctype = Integral::DEF_CMODE);
boolean setAlgorithm(ALGORITHM algorithm);
boolean setImplementation(IMPLEMENTATION implementation);
boolean setDimension(long dim = DEF_DIMENSION);
boolean setMinMax(Vector<VectorFloat>& min_max);
boolean setMinMaxFile(const Filename& min_max_file);
boolean setRatio(const VectorLong& ratio);
boolean setDurationFlag(const boolean duration_flag);
boolean setInputType(const FeatureFile::FILE_TYPE input_type = FeatureFile::DEF_FILE_TYPE));
boolean setInputFormat(const FeatureFile::FILE_FORMAT input_format = FeatureFile::DEF_FILE_FORMAT));
boolean setOutputType(const FeatureFile::FILE_TYPE output_type = FeatureFile::DEF_FILE_TYPE));
boolean setOutputFormat(const FeatureFile::FILE_FORMAT output_format = FeatureFile::DEF_FILE_FORMAT));
boolean setOutputDirectory(const String& new_dir);
boolean setOutputExtension(const String& extension);
boolean setOutputPreserve(const long preserve);
boolean setOutputSuffix(const String& suffix);
boolean setVerbosity(const Integral::DEBUG verbosity);
boolean setAudioDatabaseFile(const Filename& audiodb_file);
boolean setTransDatabaseFile(const Filename& transdb_file);
boolean setLevel(const String& level);
ALGORITHM getAlgorithm() const;
IMPLEMENTATION getImplementation() const;
long getDimension() const;
Vector>VectorFloat< getMinMax() const;
Filename getMinMaxFile() const;
VectorLong getRatio() const;
boolean getDurationFlag() const;
FeatureFile::FILE_TYPE getInputType() const;
FeatureFile::FILE_FORMAT getInputFormat() const;
FeatureFile::FILE_TYPE getOutputType() const;
FeatureFile::FILE_FORMAT getOutputFormat() const;
String getOutputDirectory() const;
String getOutputExtension() const;
long getOutputPreserve() const;
String getOutputSuffix() const;
Filename getAudioDatabaseFile() const;
Filename getTransDatabaseFile() const;
String getLevel() const;
boolean compute(Sdb& sdb, Sdb& sdb_symbols);
boolean computeMinMax(Sdb& sdb_features);
boolean computeSegFeatures(Sdb& sdb_features);
boolean computeSegFeaturesSymbol(Sdb& sdb_features, Sdb& sdb_symbols);
boolean openAudioDatabase();
boolean openTransDatabase();
boolean closeAudioDatabase();
boolean closeTransDatabase();
boolean retrieveFtrFile(const Strinf& identifier, Filename& ftr_file);
boolean retrieveAlign(const Strinf& identifier, const String& symbol, VectorLong& start_frame, VectorLong& end_frames);
boolean readFeatures(const Filename& ftr_file, Vector& features);
boolean writeFeatures(const Filename& ftr_file, const Vector& features);
boolean writeMinMax();
boolean generateSegFeature(const Vector& features, const VectorLong& start_frames, const VectorLong& end_frames, Vector & seg_features);
boolean normalizeFeatures(const Vector& features, Vector & min_max, Vector & norm_features);