13 int main(
int argc,
char ** argv)
17 std::cout <<
"denoise file: " << argv[1] << std::endl;
18 std::string file = argv[1];
19 std::cout <<
"audio source: " << argv[2] << std::endl;
20 std::string type = argv[2];
21 std::cout <<
"denoise user: " << argv[3] << std::endl;
22 std::string user = argv[3];
23 std::string token =
"my_token";
26 std::shared_ptr<rapp::object::audio> audio;
28 if (type ==
"microphone_wav")
29 audio = std::make_shared<rapp::object::microphone_wav>(file);
30 else if (type ==
"nao_single_channel_wav")
31 audio = std::make_shared<rapp::object::nao_single_channel_wav>(file);
32 else if (type ==
"nao_quad_channel_wav")
33 audio = std::make_shared<rapp::object::nao_quad_channel_wav>(file);
34 else if (type ==
"ogg")
35 audio = std::make_shared<rapp::object::ogg>(file);
37 throw std::runtime_error(
"uknown audio source");
40 ctrl.
run_job(std::make_shared<rapp::cloud::set_denoise_profile>(audio, user, token));
44 std::cerr <<
"incorrect params" << std::endl;
Main class that controllers RAPP Services.
int main(int argc, char **argv)
void run_job(const std::shared_ptr< asio_socket > job)
Run one service job.