Mercurial > hg > aimc
view trunk/src/Main/aimc.cc @ 280:e55d0c225a57
- 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 | 5b8b9ea1218a |
children | 34993448961f |
line wrap: on
line source
// Copyright 2008-2010, Thomas Walters // // AIM-C: A C++ implementation of the Auditory Image Model // http://www.acousticscale.org/AIMC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. #include <stdlib.h> #include <string> #include "Modules/Input/ModuleFileInput.h" #include "Modules/BMM/ModuleGammatone.h" #include "Modules/BMM/ModulePZFC.h" #include "Modules/NAP/ModuleHCL.h" #include "Modules/Strobes/ModuleParabola.h" #include "Modules/SAI/ModuleSAI.h" // #include "Modules/SSI/ModuleSSI.h" // #include "Modules/Profile/ModuleProfile.h" #include "Modules/Features/ModuleGaussians.h" #include "Modules/Output/FileOutputHTK.h" int main(int argc, char* argv[]) { aimc::Parameters params; aimc::ModuleFileInput input(¶ms); // aimc::ModuleGammatone bmm(¶ms); aimc::ModulePZFC bmm(¶ms); aimc::ModuleHCL nap(¶ms); aimc::ModuleParabola strobes(¶ms); aimc::ModuleSAI sai(¶ms); // aimc::ModuleSSI ssi(¶ms); // aimc::ModuleProfile profile(¶ms); aimc::ModuleGaussians features(¶ms); aimc::FileOutputHTK output(¶ms); std::string parameters_string = params.WriteString(); printf("%s", parameters_string.c_str()); input.AddTarget(&bmm); bmm.AddTarget(&nap); nap.AddTarget(&strobes); strobes.AddTarget(&sai); sai.AddTarget(&features); // ssi.AddTarget(&profile); // profile.AddTarget(&features); features.AddTarget(&output); output.OpenFile("test_output.htk", params.GetFloat("sai.frame_period_ms")); if (input.LoadFile("test.wav")) { input.Process(); } else { printf("LoadFile failed"); } }