generated from alpaca-core/tpl-ac-local-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
39 lines (29 loc) · 914 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <ac/local/Model.hpp>
#include <ac/local/ModelAssetDesc.hpp>
#include <ac/local/Instance.hpp>
#include <ac/local/Lib.hpp>
#include <ac/jalog/Instance.hpp>
#include <ac/jalog/sinks/DefaultSink.hpp>
#include <iostream>
#ifdef HAVE_ACLP_OUT_DIR
#include "aclp-out-dir.h"
#endif
int main() try {
ac::jalog::Instance jl;
jl.setup().add<ac::jalog::sinks::DefaultSink>();
#ifdef HAVE_ACLP_OUT_DIR
ac::local::Lib::addPluginDir(ACLP_OUT_DIR);
#endif
ac::local::Lib::loadAllPlugins();
auto model = ac::local::Lib::loadModel({
.type = "foo",
.name = "foo-synthetic"
}, {});
auto instance = model->createInstance("general", {});
auto opResult = instance->runOp("run", {{"input", {"The", "song", "goes:"}}, {"splice", false}});
std::cout << opResult << "\n";
}
catch (std::exception& e) {
std::cerr << "exception: " << e.what() << "\n";
return 1;
}