/*
   HARK Library
   Copyright (C) 2021 Honda Research Institute Japan Inc.
 */

#include "hark-lib/node/SpeechRecognitionClient.h"

namespace hark
{
namespace node
{
    SpeechRecognitionClient::SpeechRecognitionClient():
        NodeDef("SpeechRecognitionClient")
    {
        *this
            << Terminal::in("FEATURES")
            << Terminal::in("MASKS")
            << Terminal::in("SOURCES")
            << Terminal::in("MFM_ENABLED").def(true)
            << Terminal::in("HOST").def("127.0.0.1")
            << Terminal::in("PORT").def(5530)
            << Terminal::in("SOCKET_ENABLED").def(true)
            >> Terminal::out("OUTPUT");
    }

    void
    SpeechRecognitionClient::reset()
    {
    }

    bool
    SpeechRecognitionClient::operator () (size_t count, InputDataBundle &input, OutputDataBundle &output)
    {
        output["OUTPUT"].push(input["FEATURES"].last());
        return true;
    }
}
}

/* end of file */
