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