comparison src/Main/aimc.cc @ 8:fcbf85ce59fb

- Lots of changes to make cpplint happy. It still complains about header guards, but that's pretty much it now.
author tomwalters
date Thu, 18 Feb 2010 21:12:41 +0000
parents 8c859ef1fb75
children 2a5354042241
comparison
equal deleted inserted replaced
7:1a1988ec40e7 8:fcbf85ce59fb
14 // GNU General Public License for more details. 14 // GNU General Public License for more details.
15 // 15 //
16 // You should have received a copy of the GNU General Public License 16 // You should have received a copy of the GNU General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>. 17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 18
19 #include <stdlib.h>
20
19 #include <string> 21 #include <string>
20
21 #include <stdlib.h>
22 22
23 #include "Modules/Input/ModuleFileInput.h" 23 #include "Modules/Input/ModuleFileInput.h"
24 #include "Modules/BMM/ModuleGammatone.h" 24 #include "Modules/BMM/ModuleGammatone.h"
25 #include "Modules/BMM/ModulePZFC.h" 25 #include "Modules/BMM/ModulePZFC.h"
26 #include "Modules/NAP/ModuleHCL.h" 26 #include "Modules/NAP/ModuleHCL.h"
27 #include "Modules/Strobes/ModuleParabola.h" 27 #include "Modules/Strobes/ModuleParabola.h"
28 #include "Modules/SAI/ModuleSAI.h" 28 #include "Modules/SAI/ModuleSAI.h"
29 //#include "Modules/SSI/ModuleSSI.h" 29 // #include "Modules/SSI/ModuleSSI.h"
30 //#include "Modules/Profile/ModuleProfile.h" 30 // #include "Modules/Profile/ModuleProfile.h"
31 #include "Modules/Features/ModuleGaussians.h" 31 #include "Modules/Features/ModuleGaussians.h"
32 #include "Modules/Output/FileOutputHTK.h" 32 #include "Modules/Output/FileOutputHTK.h"
33 33
34 int main (int argc, char* argv[]) { 34 int main(int argc, char* argv[]) {
35 aimc::Parameters params; 35 aimc::Parameters params;
36 aimc::ModuleFileInput input(&params); 36 aimc::ModuleFileInput input(&params);
37 //aimc::ModuleGammatone bmm(&params); 37 // aimc::ModuleGammatone bmm(&params);
38 aimc::ModulePZFC bmm(&params); 38 aimc::ModulePZFC bmm(&params);
39 aimc::ModuleHCL nap(&params); 39 aimc::ModuleHCL nap(&params);
40 aimc::ModuleParabola strobes(&params); 40 aimc::ModuleParabola strobes(&params);
41 aimc::ModuleSAI sai(&params); 41 aimc::ModuleSAI sai(&params);
42 //aimc::ModuleSSI ssi(&params); 42 // aimc::ModuleSSI ssi(&params);
43 //aimc::ModuleProfile profile(&params); 43 // aimc::ModuleProfile profile(&params);
44 aimc::ModuleGaussians features(&params); 44 aimc::ModuleGaussians features(&params);
45 aimc::FileOutputHTK output(&params); 45 aimc::FileOutputHTK output(&params);
46 46
47 std::string parameters_string = params.WriteString(); 47 std::string parameters_string = params.WriteString();
48 printf("%s", parameters_string.c_str()); 48 printf("%s", parameters_string.c_str());
50 input.AddTarget(&bmm); 50 input.AddTarget(&bmm);
51 bmm.AddTarget(&nap); 51 bmm.AddTarget(&nap);
52 nap.AddTarget(&strobes); 52 nap.AddTarget(&strobes);
53 strobes.AddTarget(&sai); 53 strobes.AddTarget(&sai);
54 sai.AddTarget(&features); 54 sai.AddTarget(&features);
55 //ssi.AddTarget(&profile); 55 // ssi.AddTarget(&profile);
56 //profile.AddTarget(&features); 56 // profile.AddTarget(&features);
57 features.AddTarget(&output); 57 features.AddTarget(&output);
58 58
59 output.OpenFile("test_output.htk", params.GetFloat("sai.frame_period_ms")); 59 output.OpenFile("test_output.htk", params.GetFloat("sai.frame_period_ms"));
60 if (input.LoadFile("test.wav")) { 60 if (input.LoadFile("test.wav")) {
61 input.Process(); 61 input.Process();