Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

concat_unit.h

Go to the documentation of this file.
00001 /* concat_unit.h    $Revision: 1.2 $ $Date: 2005/12/10 20:33:54 $
00002    Copyright (C) 2003 University of Bonn.
00003    http://www.ikp.uni-bonn.de/boss
00004 
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU General Public License
00007    as published by the Free Software Foundation; either version 2
00008    of the License, or (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software
00017    Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA  02111-1307, USA.
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 //Used for debugging purposes
00058 //#define NOTVERB
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; // the raw unmanipulated signal vector of the selected unit + overlap;
00072   unsigned first; // the first sample value of the selected unit in the ORIGINAL signal file
00073   unsigned last; // the last sample value of the selected unit in the ORIGINAL signal file
00074   unsigned start; // the starting point of the unit in the signal
00075   unsigned end; // the last point of the unit in the signal
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); // Constructor for non-pause units
00083   CM_Unit(BOSS::Config & config, MySQL_Handler * db,
00084           xercesc::DOMNode * n, const string & t); // Constructor for pause units
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  // end of boss_concat group
00096 #endif
00097 

Generated on Tue Dec 20 23:14:38 2005 for BOSS by doxygen 1.3.6