00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00031 #ifndef BOSS_CM_UNIT_H
00032 #define BOSS_CM_UNIT_H
00033
00034 #include "boss_utility/boss_exceptions.h"
00035 #include "boss_utility/boss_utility.h"
00036 #include "boss_utility/boss_config.h"
00037 #include "boss_utility/dom_userdata.h"
00038 #include "boss_utility/dom_tools.h"
00039 #include <xercesc/dom/DOM.hpp>
00040 #include "boss_mysql/boss_mysql_handler.h"
00041 #include "tdsp/dsp_vector.h"
00042 #include "tdsp/dsp_weight_window.h"
00043 #include <string>
00044 #include <vector>
00045 #include <algorithm>
00046 #include <sstream>
00047 #include <fstream>
00048 #include "boss_conman/conman_unit.h"
00049
00050 #define BOSS_PAUSE_SYMBOL "$p"
00051 #define DEFAULT_PAUSE 8000
00052 #define DEFAULT_PAUSE_STRING "8000"
00053 #define MAXIMAL_PAUSE 32000
00054 #define LEFTRIGHTOL 500
00055 #define SMOODIST 17 // the size of 1/4 of a hanning window for smoothing
00056
00057
00058
00059 #define BREAKPOINT cerr << "Bis hier" << endl;
00060 #ifndef NOTVERB
00061 #define PRINT(X) cerr << (#X) << ": " << (X) << endl;
00062 #endif
00063 #ifdef NOTVERB
00064 #define PRINT(X) ;
00065 #endif
00066
00067 typedef dsp::vector< short > t_Signal;
00068
00069 class CM_Unit: public ConmanUnit {
00070 public:
00071 t_Signal signal;
00072 unsigned first;
00073 unsigned last;
00074 unsigned start;
00075 unsigned end;
00076 CM_Unit(BOSS::Config & config,
00077 MySQL_Handler * db,
00078 xercesc::DOMNode * n,
00079 const string & t,
00080 const string & p,
00081 const string & i,
00082 const string & s);
00083 CM_Unit(BOSS::Config & config, MySQL_Handler * db,
00084 xercesc::DOMNode * n, const string & t);
00085 CM_Unit & CM_Unit::operator=(const CM_Unit & other);
00086 protected:
00087 string getSentenceFileName(const string & inventory);
00088 void loadFromFile(const string & file_name,
00089 unsigned loadbegin,
00090 unsigned loadend,
00091 const unsigned & leftOL,
00092 const unsigned & rightOL);
00093 };
00094
00096 #endif
00097