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

boss_ola.h

Go to the documentation of this file.
00001 /* boss_conman.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 
00021 #ifndef BOSS_OLA_H
00022 #define BOSS_OLA_H
00023 
00029 #include "boss_mysql/boss_mysql_handler.h"
00030 #include "boss_utility/dom_userdata.h"
00031 #include "boss_utility/dom_tools.h"
00032 #include "boss_utility/boss_exceptions.h"
00033 #include "boss_utility/boss_utility.h"
00034 #include "boss_utility/boss_module.h"
00035 #include "boss_utility/boss_config.h"
00036 #include <string>
00037 #include <vector>
00038 #include <map>
00039 #include <fstream>
00040 #include <sstream>
00041 #include <xercesc/dom/DOM.hpp>
00042 #include "boss_conman/boss_conman.h"
00043 #include "ola_unit.h"
00044 
00052 typedef vector< OLA_Unit > OLA_UnitVector;
00053 
00058 class BOSS_OLA : public BOSS_ConMan {
00059   bool preemph_flag;
00060 //  map<string,string> phones;
00061 //  map<string,string>::const_iterator pmi;
00062   void getOLA_Units(xercesc::DOMNode * node,OLA_UnitVector & cv);
00063   void preEmph(t_Signal & res);
00064 
00065    bool selfCheck(OLA_UnitVector & units );
00066    void writeSignalToDisk(xercesc::DOMNode * sentence, t_Signal & signal);
00067    void writeSignalToXML(t_Signal & signal, xercesc::DOMNode * sentence);
00068    void getNewF0Contour(OLA_UnitVector & units, vector<Phone> & phones, PitchContour & contour);
00069    void calculateProsody(vector<Phone> & phones);
00070   
00071  public:
00072 
00073   BOSS_OLA(BOSS::Config & __config, MySQL_Handler * __database);
00074   virtual string getDescription();
00075   virtual void operator () (xercesc::DOMNode * sentence);
00076 };
00077 
00078 extern "C" BOSS_OLA * create(BOSS::Config config, MySQL_Handler * database) {
00079         return new BOSS_OLA(config, database);
00080 }
00081 
00082 extern "C" void destroy(BOSS_OLA * cm) {
00083         delete cm;
00084 }
00085  //end of boss_ola group
00087 
00088 #endif
00089 

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